summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* update docs and HISTORY datespre-releaseGiampaolo Rodola2021-12-292-1/+5
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* try againGiampaolo Rodola2021-12-292-4/+3
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* try againGiampaolo Rodola2021-12-291-2/+3
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* try to fix appveyorGiampaolo Rodola2021-12-291-1/+3
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* HISTORY.rst add hyperlinks pointing to psutil API doc (#2042)Giampaolo Rodola2021-12-294-1156/+2278
|
* add sponsorhips / supporters @indeedeng and @PySimpleGUI; thanks a lot! ;)Giampaolo Rodola2021-12-282-0/+5
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* assert scripts have +x bitGiampaolo Rodola2021-12-153-12/+14
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* git pre commit hook: use shlex.split()Giampaolo Rodola2021-12-151-6/+4
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* Automatically sort imports (isort CLI tool) (#2033)Giampaolo Rodola2021-12-1462-169/+264
|
* fix missing arg passed to C psutil_debug()Giampaolo Rodola2021-11-301-1/+1
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* Fix CI tests / wheels / workflow (#2024)Giampaolo Rodola2021-11-2911-31/+75
| | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* fix #2023 [Linux] cpu_freq() return order is wrong on systems with > 9 CPUs.Giampaolo Rodola2021-11-252-3/+5
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* Handle missing dependencies on MidnightBSD (#2019)Lucas Holt2021-11-191-1/+4
|
* appveyor: add support for Python 3.10 (#2012) (#2015)Shannon Pamperl2021-11-141-0/+10
|
* give credits to @odormond for #1956 and #2011Giampaolo Rodola2021-11-103-2/+6
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* [macOS / M1] cpu_times(): convert mach tick units to nsecs (fixes #1956) (PR ↵Olivier Dormond2021-11-103-2/+32
| | | | | #2011) Signed-off-by: Olivier Dormond <olivier.dormond@pix4d.com>
* c / win: get rid of psutil_load_globals() and move it into psutil_setup() funGiampaolo Rodola2021-11-043-31/+19
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* PSUTIL_DEBUG: print file + line number for C ext modules (#2005)Giampaolo Rodola2021-10-2620-61/+98
|
* update HISTORY to include #1981, CREDIT @PetrPospisil, fix C linter warningsGiampaolo Rodola2021-10-183-6/+13
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* Fix WOW64 issue: NtQuerySystemInformation does not set ↵PetrPospisil2021-10-181-7/+39
| | | | | | | ImageName.MaximumLength (#1981) * fix WOW64 issue when the NtQuerySystemInformation does not set ImageName.MaximumLength when STATUS_INFO_LENGTH_MISMATCH is returned Signed-off-by: Petr Pospíšil <petr.pospisil@safetica.com>
* Changes to debug() function:Giampaolo Rodola2021-10-143-1/+53
| | | | | | | | | | * use str() if exception derives from OSError / EnvironmentError. This way we will print the file name (if it exists). * use repr() for any other exception * add tests for debug() function * backport contextlib.redirect_stderr Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* add debug() prints in a couple of placesGiampaolo Rodola2021-10-144-4/+10
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* [Linux] convert /dev/root device to real path (fixes #1999) (#2000)Giampaolo Rodola2021-10-143-0/+142
| | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* remove dead windows codeGiampaolo Rodola2021-10-141-14/+0
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* tests: move per-module imports at the top of the file(s)Giampaolo Rodola2021-10-144-12/+17
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* give CREDITS to @ilius for #1996 + update docGiampaolo Rodola2021-10-123-1/+7
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* add support for MidnightBSD (#1996)Saeed Rasooli2021-10-121-1/+1
| | | Signed-off-by: Saeed Rasooli <saeed.gnu@gmail.com>
* Use assertEqual instead of assertEquals for Python 3.11 compatibility. (#1995)Karthikeyan Singaravelan2021-10-081-1/+1
|
* move/rename tests re. to #1955Giampaolo Rodola2021-10-052-23/+14
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* Handle ENAMETOOLONG on Linux (#1940) (#1955)Nikita Radchenko2021-10-054-1/+48
| | | | | | | | | | | | | | | When resolving process file descriptors symlinks in procfs (/proc/PID/fd/FD), the kernel can only deal with file paths no longer than PAGE_SIZE (which usually equals to PATH_MAX). https://elixir.bootlin.com/linux/v5.12/source/fs/proc/base.c#L1759 Resolving fd symlink that corresponds to a file with a path longer than PATH_MAX with readlink(2) would result in ENAMETOOLONG error (see details in #1940). We can do nothing to fix this in userspace; therefore these errors should be ignored.
* [macOS] dynamic set buffer size for process connections/fds (fixes #1901) ↵Giampaolo Rodola2021-10-055-111/+102
| | | | (#1903)
* fix #1965 / win / users() / critical: Py_INCREF(Py_None) before setting None ↵Giampaolo Rodola2021-10-052-0/+3
| | | | | | object in C Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* use ThreadTask as a ctx managerGiampaolo Rodola2021-10-051-5/+1
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* expand Process.threads() doc (take inspiration from #1989)Giampaolo Rodola2021-10-041-3/+11
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* Merge branch 'master' of github.com:giampaolo/psutilGiampaolo Rodola2021-10-031-1/+1
|\
| * Typo fixed (#1930)Daniel Asztalos2021-10-031-1/+1
| | | | | | Signed-off-by: asztalosdani <asztalosdani@gmail.com>
* | fix #1919 / Linux: sensors_battery() may raise TypeError on PureOSGiampaolo Rodola2021-10-033-2/+5
| | | | | | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* | update doc re. to exception classesGiampaolo Rodola2021-10-031-10/+16
|/ | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* Improve custom error tracebacks and messages (#1992)Giampaolo Rodola2021-10-036-82/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removal of duplicated `psutil.NoSuchProcess` text. Before: ``` psutil.NoSuchProcess: psutil.NoSuchProcess process no longer exists (pid=4651, name="python") psutil.ZombieProcess: psutil.ZombieProcess process no longer exists and it's a zombie (pid=4651, name="python") psutil.AccessDenied: psutil.AccessDenied (pid=4651, name="python") psutil.TimeoutExpired: psutil.TimeoutExpired timeout after 5 seconds (pid=4651, name="python") ``` Now: ``` psutil.NoSuchProcess: process no longer exists (pid=4651, name="python") psutil.ZombieProcess: process no longer exists and it's a zombie (pid=4651, name="python") psutil.AccessDenied: (pid=4651, name="python") psutil.TimeoutExpired: timeout after 5 seconds (pid=4651, name="python") ``` --- More info if process PID has been reused: Before: ``` psutil.NoSuchProcess: psutil.NoSuchProcess process no longer exists (pid=465148) ``` Now: ``` psutil.NoSuchProcess: process no longer exists and its PID has been reused (pid=465148) ``` --- Before: ``` psutil.NoSuchProcess: psutil.NoSuchProcess no process found with pid 666 ``` Now: ``` psutil.NoSuchProcess: process PID not found (pid=666) ``` --- Before: ``` >>> psutil.NoSuchProcess(212, name="python") psutil.NoSuchProcess process no longer exists (pid=212, name='python') ``` Now: ``` >>> psutil.NoSuchProcess(212, name="python") psutil.NoSuchProcess(pid=212, name='python', msg='process no longer exists') ```
* Fix #1991: process_iter() raise TypeError with multi threads.Giampaolo Rodola2021-10-032-39/+41
| | | | | | | | When entering the function, use a copy() of the global dict, and do operations on that instead of the global object, then update the global object on function exit. Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* give credits to @XuehaiPan for #1948, #1949Giampaolo Rodola2021-10-023-4/+12
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* Fix thread safety of cached functions lock-freely (#1949)Xuehai Pan2021-10-021-1/+6
| | | | Signed-off-by: XuehaiPan <XuehaiPan@pku.edu.cn>
* [Windows] fix service handle leak in start service (#1990)Wilfried Goesgens2021-10-021-0/+1
| | | Signed-off-by: Wilfried Goesgens <willi@arangodb.com>
* try to fix CI not running for PRsGiampaolo Rodola2021-10-021-1/+1
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* Merge branch 'master' of github.com:giampaolo/psutilGiampaolo Rodola2021-09-266-4/+17
|\
| * Minor typo fix (#1982)Michael Dudyak2021-08-201-1/+1
| |
| * [Windows] Reset `mp_flag` after each drive on `psutil.disk_partitions()` (#1961)Pablo Baeyens2021-08-053-0/+7
| |
| * Fix typos in documentation (#1970)Dmitry Gorbunov2021-07-243-3/+9
| |
* | give CREDITS to @scoutapm-sponsorships and Alexey Vazhnov for sponsorshipGiampaolo Rodola2021-09-262-0/+4
| | | | | | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* | top.py: report mem usage in GBGiampaolo Rodola2021-09-101-4/+6
|/ | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>