One of the less fun aspects of process management on POSIX systems is waiting for a process to terminate. The standard library's subprocess module has relied on a busy-loop polling approach since the timeout parameter was added to...
Blog posts tagged "psutil"
Memory leaks in Python are usually straightforward to diagnose. Just look at RSS, track Python object counts, follow reference graphs, etc. But leaks inside C extension modules are another story. Traditional memory metrics such as RSS and VMS...
With the release of psutil 7.1.2, wheels for free-threaded Python are now available. This milestone was achieved largely through a community effort, as several internal refactorings to the C code were required to make it possible (see #2565)....
Preface: the migration to pytest Last year, after 17 years of unittest, I started adopting pytest in psutil (see #2446). The two advantages I cared about most were plain assert statements and pytest-xdist's free parallelism. Tests still inherit...
About dropping Python 2.7 support in psutil, 3 years ago I stated (#2014): Not a chance, for many years to come. [Python 2.7] currently represents 7-10% of total downloads, meaning around 70k / 100k downloads per day. Only 3 years later, and to...
psutil 5.6.2 is out. It implements an emulation of os.getloadavg() on Windows, kindly contributed by Ammar Askar, who originally implemented it for CPython's test suite. This idea has been floating around for quite a while. The first proposal...
psutil 5.6.0 is out. Highlights: a new Process.parents() method, several important Windows improvements, and the removal of Process.memory_maps() on macOS. Process.parents() The new method returns the parents of a process as a list of Process...
This is part of the psutil 5.6.0 release (see the full release notes). As of 5.6.0, Process.memory_maps() is no longer defined on macOS. The bug #1291: on macOS, Process.memory_maps() would either raise OSError: [Errno 22] Invalid argument or...
After a long wait psutil finally supports a new exotic platform: AIX! Honestly I'm not sure how many AIX Python users are out there (probably not many), but here it is. For this we have to thank Arnon Yaari, who started working on the port a...
psutil 5.3.0 is finally out. This release is a major one, bigger than any release before it in terms of improvements and bugfixes. It is interesting to notice how huge the diff between 5.2.2 and 5.3.0 is. This is because I've been travelling quite …
This one took a while. Adding proper Unicode support to psutil took four months of auditing, design decisions, and rewriting nearly every API that returned a string. The full journey is documented in #1040, and what follows is a summary. This can...
This is part of the psutil 5.3.0 release (see the changelog for the full list of changes). The old pattern Iterating over processes and collecting attributes requires more boilerplate than it should. A process returned by process_iter() may...
psutil 5.1.0 is out. This release introduces new APIs to retrieve hardware temperatures, battery status, and CPU frequency information. Temperatures You can now retrieve hardware temperatures (PR-962). This is currently available on Linux only....
Starting from psutil 5.0.0 you can query multiple Process fields around twice as fast as before (see #799 and Process.oneshot()). It took 7 months, 108 commits, and a massive refactoring of psutil internals (PR-937), and I think it's one of the...
OK, another psutil release. The headline of 4.4.0 is more accurate memory metrics on Linux, plus a pile of macOS fixes I'd been sitting on for years. Linux virtual memory People had been complaining for a while that virtual_memory() didn't match...