Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | BSD big refact: move proc funcs in new proc.c file | Giampaolo Rodola | 2023-04-19 | 1 | -1001/+11 |
| | |||||
* | C refact: remove useless cmdline / cwd / environ layers. Call direct functions | Giampaolo Rodola | 2023-04-18 | 1 | -16/+0 |
| | |||||
* | [NetBSD] move files / refactoring of C files (#2232) | Giampaolo Rodola | 2023-04-14 | 1 | -1/+4 |
| | |||||
* | OpenBSD: rewrite net_connections() from scratch (#2230) | Giampaolo Rodola | 2023-04-13 | 1 | -4/+3 |
| | |||||
* | [POSIX] psutil.users() loses precision for "started" attribute #2225 (#2226) | Giampaolo Rodola | 2023-04-12 | 1 | -2/+2 |
| | |||||
* | [POSIX] psutil.users() loses precision for "started" attribute #2225 (#2226) | Giampaolo Rodola | 2023-04-11 | 1 | -2/+2 |
| | |||||
* | FreeBSD files refactoring (#2059) | Giampaolo Rodola | 2022-01-16 | 1 | -7/+4 |
| | |||||
* | Remove docstrings from C function definitions (#2058) | Giampaolo Rodola | 2022-01-16 | 1 | -70/+34 |
| | |||||
* | OpenBSD: add support for CPU frequency (#2057) | Giampaolo Rodola | 2022-01-16 | 1 | -3/+4 |
| | |||||
* | OpenBSD files refactoring (#2056) | Giampaolo Rodola | 2022-01-16 | 1 | -1/+4 |
| | |||||
* | PSUTIL_DEBUG: print file + line number for C ext modules (#2005) | Giampaolo Rodola | 2021-10-26 | 1 | -2/+2 |
| | |||||
* | FreeBSD: move CPU C functions in their own cpu.c module | Giampaolo Rodola | 2020-12-24 | 1 | -2/+3 |
| | |||||
* | Rename cpu_count_physical() to cpu_count_cores() | Giampaolo Rodola | 2020-12-21 | 1 | -2/+2 |
| | | | | | | | | | | This has always been cause of confusion, e.g. see: https://github.com/giampaolo/psutil/pull/1727#issuecomment-698934643 Removed the reference to "physical" from dostrings, functions and test. I still left it in the doc though, as it's more explanatory. Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com> | ||||
* | [macOS, UNIX] prefer _SC_PAGESIZE over (partially) deprecated getpagesize() ↵ | Giampaolo Rodola | 2020-12-17 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | (#1891) Add a reusable `psutil_getpagesize()` utility common to all UNIXes. Related to #1885 (`getpagesize()` is deprecated on recent macOS, POSIX.1-2001 and possibly other UNIXes). The problem emerged on macOS but `getpagesize()` is also used in FreeBSD, NetBSD, OpenBSD and AIX, so it makes sense to do this in one place only, similarly to Windows which also provide a `psutil_getpagesize()` utility. Follow cPython's `mmapmodule.c` and `resourcemodule.c` lead and rely on `sysconf(_SC_PAGESIZE)` instead, but leave `getpagesize()` in place as last resort/attempt for systems where it's not deprecated and/or they still legitimately rely on it. Also provide a python wrapper so we can test the return value of this C function against Python's stdlib modules. Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com> | ||||
* | [Windows] #1877: turn OpenProcess -> ERROR_SUCCESS into AD or NSP (#1887) | Giampaolo Rodola | 2020-12-14 | 1 | -3/+3 |
| | | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com> | ||||
* | disk_partitions() maxfile and maxpath (#1863) | Giampaolo Rodola | 2020-10-24 | 1 | -5/+0 |
| | |||||
* | [FreeBSD] process resource limits (#1859) (#809) | Giampaolo Rodola | 2020-10-23 | 1 | -0/+4 |
| | |||||
* | Implement Process.environ() on *BSD family (#1800) (patch by Armin Gruner) | Armin Gruner | 2020-08-13 | 1 | -1/+149 |
| | |||||
* | Properly handle PID type in C (#1672) | Giampaolo Rodola | 2020-01-29 | 1 | -23/+40 |
| | |||||
* | OpenBSD fixes (#1673) | Giampaolo Rodola | 2020-01-27 | 1 | -11/+3 |
| | |||||
* | get rid of globals.c; move stuff in _psutil_common.c | Giampaolo Rodola | 2020-01-06 | 1 | -5/+1 |
| | |||||
* | Fix Process on FreeBSD 12.0+ i386 (#1646) | Po-Chuan Hsieh | 2019-12-21 | 1 | -1/+5 |
| | | | | | FreeBSD 12.0+ change ki_tdev from 32 bits to 64 bits. Reference: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242543 | ||||
* | release gil around users()/BSD (#1425) | Giampaolo Rodola | 2019-11-20 | 1 | -0/+2 |
| | |||||
* | Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616) | Riccardo Schirone | 2019-11-13 | 1 | -15/+15 |
| | | | | | | | | | | | | | | These files contain loops that convert system data into python objects and during the process they create objects and dereference their refcounts after they have been added to the resulting list. However, in case of errors during the creation of those python objects, the refcount to previously allocated objects is dropped again with Py_XDECREF, which should be a no-op in case the paramater is NULL. Even so, in most of these loops the variables pointing to the objects are never set to NULL, even after Py_DECREF is called at the end of the loop iteration. This means, after the first iteration, if an error occurs those python objects will get their refcount dropped two times, resulting in a possible double-free. | ||||
* | Fix _psutil_bsd.c compile error on OpenBSD (#1619) | Nathan Houghton | 2019-11-12 | 1 | -1/+1 |
| | |||||
* | Refactor C modules init (#1603) | Giampaolo Rodola | 2019-10-21 | 1 | -87/+76 |
| | |||||
* | Implement psutil_proc_cwd for NetBSD (#1530) | Kamil Rytarowski | 2019-06-12 | 1 | -1/+1 |
| | | | | Pick KERN_PROC_CWD that is available in 8.99.43 and fallback for older versions to readlink("/proc/$PID/cwd"). | ||||
* | NetBSD fixes (#1526) | Kamil Rytarowski | 2019-06-11 | 1 | -0/+2 |
| | | | | | | | | | | | | | | | | | | | * Fix psutil_get_cmd_args() for NetBSD Do not overallocate the buffer prompting for KERN_ARGMAX. It also fixes the code as KERN_ARGMAX was received into a size_t type, while kernel returned int. It caused argmax to contain garbage and allocation was randomly crashing with new jemalloc in the basesystem. New code prompts for exact buffer size before allocation and stores argv[] inside it. Bug investigated by Leonardo Taccari. * Stop including sys/user.h for NetBSD This header was removed from the OS as it was empty. | ||||
* | #1411 / BSD / Process() init: use Py_INCREF() around process name pyobj and ↵ | Giampaolo Rodola | 2019-02-25 | 1 | -4/+2 |
| | | | | avoid segfault | ||||
* | #1428 in case of error, show the C syscall which caused it | Giampaolo Rodola | 2019-02-24 | 1 | -1/+1 |
| | |||||
* | Add CPU frequency support for FreeBSD (#1369) | Alex Manuskin | 2018-12-01 | 1 | -0/+2 |
| | | | | Add CPU frequency support for FreeBSD (patch by @amanusk) | ||||
* | FreeBSD adding temperature sensors (WIP) (#1350) | Alex Manuskin | 2018-11-03 | 1 | -0/+2 |
| | | | FreeBSD: add temperature sensors | ||||
* | Rename OSX to macOS (#1298) | Giampaolo Rodola | 2018-06-26 | 1 | -1/+1 |
| | | | rename OSX to macOS | ||||
* | 1173 debug mode (#1176) | Giampaolo Rodola | 2017-11-14 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | | | * implement PSUTIL_DEBUG from C module * update doc * add psutil_debug() utility function * update doc * enable PSUTIL_DEBUG for tests * update appveyor.yml * change psutil_debug() signature so that it can accept variable num of args * provide DEBUG info in psutil_raise_for_pid() * properly print debug message * do not print too much | ||||
* | define a setup() function which is called on import by all C modules | Giampaolo Rodola | 2017-11-12 | 1 | -0/+2 |
| | |||||
* | refactor PSUTIL_TESTING C APIs | Giampaolo Rodola | 2017-11-12 | 1 | -3/+1 |
| | |||||
* | get rid of PSUTIL_TESTING env var: it must be necessarily set from cmdline, ↵psutil-test-flag | Giampaolo Rodola | 2017-11-11 | 1 | -2/+4 |
| | | | | hence 'python -m psutil.tests' won't work out of the box | ||||
* | PSUTIL_TESTING env var (#1083) | Giampaolo Rodola | 2017-05-18 | 1 | -1/+5 |
| | | | | | | | | | | | | | | * Introduce PSUTIL_TESTING env var ...so that we can make stricter assertions in C and py code during tests only. * define a C function in _common.c which returns whether the var is set * set PSUTIL_TESTING from the Makefile * cache psutil_testing() result * winmake: set PSUTIL_TESTING env var for tests | ||||
* | Freebsd socks refactoring (#1073) | Giampaolo Rodola | 2017-05-16 | 1 | -1/+2 |
| | | | | | | | | * freebsd: split socks.c into 2 separate files * remove unused h files * freebsd: split socks.c into 2 separate files | ||||
* | BSD: mv arch C files (#1072) | Giampaolo Rodola | 2017-05-16 | 1 | -5/+5 |
| | | | | | | | | | | * move freebsd C arch files * rename C file * move openbsd C arch files * move netbsd C arch files | ||||
* | fix #1069 / freebsd: cpu_num() may return 255; now returns -1 | Giampaolo Rodola | 2017-05-14 | 1 | -3/+4 |
| | |||||
* | fix #1065: cmdline() on OpenBSD may raise SystemError; also set a limit of ↵ | Giampaolo Rodola | 2017-05-13 | 1 | -5/+2 |
| | | | | retries to realloc() the space to store the cmdline to max 8k so that it won't loop forever | ||||
* | fix failing tests on netbsd | Giampaolo Rodola | 2017-05-13 | 1 | -1/+0 |
| | |||||
* | refactor ifdefs | Giampaolo Rodola | 2017-05-12 | 1 | -6/+2 |
| | |||||
* | fix compilation err on netbsd | Giampaolo Rodola | 2017-05-12 | 1 | -3/+3 |
| | |||||
* | freebsd: fix memory leak in open_files() | Giampaolo Rodola | 2017-05-12 | 1 | -3/+3 |
| | |||||
* | broken links: also inspect C and H files | Giampaolo Rodola | 2017-05-12 | 1 | -5/+5 |
| | |||||
* | merge from master | Giampaolo Rodola | 2017-05-02 | 1 | -1/+9 |
|\ | |||||
| * | #1022 / users(): PID cannot be determined on OpenBSD so we set it to None | Giampaolo Rodola | 2017-05-01 | 1 | -1/+9 |
| | | |||||
* | | #1040: add replacement for PyUnicode_DecodeFSDefaultAndSize on Python 2; ↵ | Giampaolo Rodola | 2017-05-01 | 1 | -11/+11 |
| | | | | | | | | also get rid of the pstuil_ prefix and use the original Python names |