Changelog

8.0.0 (IN DEVELOPMENT)

Note

psutil 8.0 introduces breaking API changes. See the migration guide if upgrading from 7.x.

Enhancements

Doc improvements (#2761, #2757, #2760, #2745, #2763, #2764, #2767, #2768, #2769, #2771, #2774, #2775, #2781, #2787, #2739, #2790, #2797, #2801, #2803, #2808, #2819, #2820, #2823, #2826, #2828, #2829)

  • Split docs from a single HTML file into multiple new sections:

    • /about (linked from footer) list all keyboard shortcuts

    • /adoption: notable software using psutil

    • /alternatives: list of alternative Python libraries and tools that overlap with psutil.

    • /api-overview: show entire API via REPL usage examples

    • /credits: list contributors and donors (was old CREDITS in root dir)

    • /faq: extended FAQ section

    • /funding: list funding methods and current sponsors

    • /genindex: a general index

    • /glossary: core concepts explained

    • /install: (was old INSTALL.rst in root dir)

    • /migration: explain how to migrate to newer psutil versions that break backward compatibility

    • /performance: how to use psutil efficiently

    • /platform: summary of OSes and architectures support

    • /recipes: code samples

    • /shell-equivalents: maps each psutil API to native CLI commands

    • /stdlib-equivalents: maps psutil’s Python API to the closest equivalent in the Python standard library

  • Blog:

    • #2825: new blog at /blog, built via the ablog Sphinx extension, with 20 posts imported from https://gmpy.dev, covering psutil topics from 2014 to 2026. Includes Atom feed. Posts are searchable. Use OpenGraph for nice preview when posts are shared on social media.

  • Theming:

    • Renewed, modern, custom theme.

    • Top bar

    • Toggable dark theme (Shift+D keyboard shortcut).

    • Show “last updated” and external icons in the footer.

    • Show icon for external URLs.

    • Use Monokai theme for code snippets.

  • Usability:

    • Right TOC sidebar.

    • Improved overall doc clarity and shortened long sentences.

    • Show a clickable COPY button to copy code snippets.

    • Show psutil. prefix for all APIs.

    • Search: Ctrl+K to focus the search box (replaces /).

    • Search: Up/Down arrow keys navigate results; Enter opens the selected result.

    • Search results are styled as cards with subtle borders and shadows (no longer rely on RTD).

    • Identifiers in code blocks (e.g. psutil.Process(), p.cpu_percent()) are now clickable and link to their API reference entry on click, via sphinx-codeautolink.

  • Testing:

    • Replace rstcheck with sphinx-lint for RST linting.

    • Add custom script to detect dead reference links in .rst files.

    • Use sphinx extension to validate Python code snippets syntax at build-time.

    • New make test-docs with sanity checks for built HTML docs.

  • RTD:

  • Misc:

    • Build doc as part of CI process (fails on error).

    • All .rst files are now wrapped to 79 characters via https://github.com/giampaolo/rstwrap.

    • Add /sitemap.xml to help search engine discovery.

    • Custom 404 page. Hovering over the © copyright in the footer reveals an easter egg. Clicking it takes you to the 404 page containing a joke.

Type hints / enums:

  • #1946: Add inline type hints to all public APIs in psutil/__init__.py. Type checkers (mypy, pyright, etc.) can now statically verify code that uses psutil. No runtime behavior is changed; the annotations are purely informational.

  • #2751: Convert all named tuples from collections.namedtuple() to typing.NamedTuple classes with type annotations. This makes the classes self-documenting, effectively turning this module into a readable API reference.

  • #2753: Introduce enum classes (ProcessStatus, ConnectionStatus, ProcessIOPriority, ProcessPriority, ProcessRlimit) grouping related constants. The individual top-level constants (e.g. STATUS_RUNNING) remain the primary API, and are now aliases for the corresponding enum members.

New APIs:

Others:

  • #2747: the field order of the named tuple returned by cpu_times() has been normalized on all platforms, and the first 3 fields are now always user, system, idle. See compatibility notes below.

  • #2754: standardize sensors_battery()’s percent so that it returns a float instead of int on all systems, not only Linux.

  • #2765: add a PR bot that uses Claude to summarize PR changes and update changelog.rst and credits.rst when commenting with /changelog.

  • #2766: remove remaining Python 2.7 compatibility shims from setup.py, simplifying the build infrastructure.

  • #2772, [Windows]: cpu_times() interrupt field renamed to irq to match the field name used on Linux and BSD. interrupt still works but raises DeprecationWarning. See migration guide.

  • #2776, [Windows]: virtual_memory() now includes cached and wired fields.

  • #2780, [Windows]: disk_usage() now can accept a file path (not only a directory path).

  • #2784: process_iter(): when attrs is specified, the pre-fetched values are now cached directly on the Process instance. Subsequent method calls (e.g. p.name(), p.status()) return the cached values instead of making new system calls. The p.info dict is deprecated. See migration guide.

  • #2788: git tags renamed from release-X.Y.Z to vX.Y.Z (e.g. release-7.2.2v7.2.2). Old tags are kept for backward compatibility.

  • #2799: Process.as_dict() now returns a dict with keys sorted alphabetically when attrs is not specified.

  • #2805, [BSD]: remove procfs dependency on NetBSD for cpu_stats() and virtual_memory(); values are now retrieved via the sysctl(9) and uvm(9) kernel APIs instead. (patch by Santhosh Raju)

  • #2816, [OpenBSD]: swap_memory() sin and sout are no longer set to 0.

Bug fixes

  • #1007, [Windows]: boot_time() no longer fluctuates by ~1 second across calls or across processes. It is now read atomically from the kernel via NtQuerySystemInformation(SystemTimeOfDayInformation), replacing the old time.time() - uptime() computation that sampled two counters from Python and produced sub-second differences.

  • #2411 [macOS]: Process.cpu_times() and Process.cpu_percent() calculation on macOS x86_64 (arm64 is fine) was highly inaccurate (41.67x lower).

  • #2715, [Linux]: wait_pid_pidfd_open() (from Process.wait()) crashes with EINVAL due to kernel race condition.

  • #2726, [macOS]: Process.num_ctx_switches() return an unusual high number due to a C type precision issue.

  • #2732, [Linux]: net_if_stats(): handle EBUSY from ioctl(SIOCETHTOOL).

  • #2770, [Linux]: fix cpu_count() (logical=False) raising ValueError on s390x architecture, where /proc/cpuinfo uses spaces before the colon separator instead of a tab.

  • #2744, [NetBSD]: fix possible double free() in swap_memory().

  • #2746, [FreeBSD]: Process.memory_maps(), rss and private fields are erroneously reported in memory pages instead of bytes. Other platforms (Linux, macOS, Windows) return bytes.

  • #2778, [UNIX]: net_if_addrs() skips interfaces with no addresses, which are typically virtual IPv4/IPv6 tunnel interfaces. Now they are included in the returned dict with family == socket.AF_UNSPEC and an empty list of addresses. Main reason: it creates an inconsistency with net_io_counters() and net_if_stats() which do return these interface names.

  • #2782, [FreeBSD]: cpu_count() logical=False return None on systems without hyper threading.

  • #2791, [FreeBSD]: relax psutil_sysctl() / psutil_sysctlbyname() to allow the kernel to return fewer bytes than the buffer (normal for variable-length sysctl data).

  • #2795, [FreeBSD]: fix cpu_freq() failing with RuntimeError: sysctlbyname('dev.cpu.0.freq_levels') size mismatch on some systems.

  • #2811, [OpenBSD]: virtual_memory() shared field returned pages instead of bytes, plus it was overvalued (summed shared virtual + real, now we only return real).

  • #2813, [OpenBSD]: virtual_memory() buffers was always 0. Now it returns a meaningful value, which is the same as cached. That’s because OpenBSD does not distinguish between the 2.

  • #2814, [NetBSD]: virtual_memory() cached is overvalued, since it includes anonymous pages.

  • #2815, [OpenBSD]: virtual_memory() shared was overvalued (summed shared virtual + real, now we only return real).

  • #2822, [BSD]: Process.cmdline() on NetBSD could raise OSError: [Errno 14] Bad address if the process about to exit. It now raises NoSuchProcess instead.

7.2.2 — 2026-01-28

Enhancements

  • #2705: [Linux]: Process.wait() now uses pidfd_open() + poll() (no busy loop). Requires Linux >= 5.3 and Python >= 3.9.

  • #2705: [macOS], [BSD]: Process.wait() now uses kqueue() (no busy loop).

Bug fixes

7.2.1 — 2025-12-29

Bug fixes

  • #2699, [FreeBSD], [NetBSD]: heap_info() does not detect small allocations (<= 1K). In order to fix that, we now flush internal jemalloc cache before fetching the metrics.

7.2.0 — 2025-12-23

Enhancements

  • #1275: new heap_info() and heap_trim() functions, providing direct access to the platform’s native C heap allocator (glibc, mimalloc, libmalloc). Useful to create tools to detect memory leaks.

  • #2403, [Linux]: publish wheels for Linux musl.

  • #2680: unit tests are no longer installed / part of the distribution. They now live under tests/ instead of psutil/tests.

Bug fixes

  • #2684, [FreeBSD], [critical]: compilation fails on FreeBSD 14 due to missing include.

  • #2691, [Windows]: fix memory leak in net_if_stats() due to missing Py_CLEAR.

Compatibility notes

  • #2680: import psutil.tests no longer works (but it was never documented to begin with).

7.1.3 — 2025-11-02

Enhancements

  • #2667: enforce clang-format on all C and header files. It is now the mandatory formatting style for all C sources.

  • #2672, [macOS], [BSD]: increase the chances to recognize zombie processes and raise the appropriate exception (ZombieProcess).

  • #2676, #2678: replace unsafe sprintf / snprintf / sprintf_s with str_format, and strlcat / strlcpy with str_copy / str_append. Unifies string handling across platforms.

Bug fixes

  • #2674, [Windows]: disk_usage() could truncate values on 32-bit platforms, potentially reporting incorrect total, free, used space for drives larger than 4GB.

  • #2675, [macOS]: Process.status() incorrectly returns STATUS_RUNNING for 99% of the processes.

  • #2677, [Windows]: fix MAC address string construction in net_if_addrs() (buffer overflow / misformat risk).

  • #2679, [OpenBSD], [NetBSD], [critical]: can’t build due to C syntax error.

7.1.2 — 2025-10-25

Enhancements

  • #2657: stop publishing prebuilt Linux and Windows wheels for 32-bit Python. 32-bit CPython is still supported, but psutil must now be built from source. #2565: produce wheels for free-thread cPython 3.13 and 3.14 (patch by Lysandros Nikolaou)

Bug fixes

Compatibility notes

  • #2657: stop publishing prebuilt Linux and Windows wheels for 32-bit Python.

7.1.1 — 2025-10-19

Enhancements

  • #2645, [SunOS]: dropped support for SunOS 10.

  • #2646, [SunOS]: add CI test runner for SunOS.

Bug fixes

Compatibility notes

  • #2645: SunOS 10 is no longer supported.

7.1.0 — 2025-09-17

Enhancements

  • #2581, [Windows]: publish ARM64 wheels. (patch by Matthieu Darbois)

  • #2571, [FreeBSD]: Dropped support for FreeBSD 8 and earlier. FreeBSD 8 was maintained from 2009 to 2013.

  • #2575: introduced dprint CLI tool to format .yml and .md files.

Bug fixes

Compatibility notes

  • #2571: dropped support for FreeBSD 8 and earlier.

7.0.0 — 2025-02-13

Enhancements

Bug fixes

Compatibility notes

6.1.1 — 2024-12-19

Enhancements

  • #2471: use Vulture CLI tool to detect dead code.

Bug fixes

6.1.0 — 2024-10-17

Enhancements

  • #2366, [Windows]: drastically speedup process_iter() by using process “fast” create time to determine process identity.

  • #2446: use pytest instead of unittest.

  • #2448: add make install-sysdeps target to install the necessary system dependencies (python-dev, gcc, etc.) on all supported UNIX flavors.

  • #2449: add make install-pydeps-test and make install-pydeps-dev targets. They can be used to install dependencies meant for running tests and for local development. They can also be installed via pip install .[test] and pip install .[dev].

  • #2456: allow running tests via python3 -m psutil.tests even if pytest is not installed.

Bug fixes

6.0.0 — 2024-06-18

Enhancements

Bug fixes

Porting notes

Version 6.0.0 introduces some changes which affect backward compatibility:

5.9.8 — 2024-01-19

Enhancements

  • #2343, [FreeBSD]: filter net_connections() in C instead of Python, ~4x faster. Only requested connection types are now retrieved.

  • #2342, [NetBSD]: same as above (#2343) but for NetBSD.

  • #2349: adopted black formatting style.

Bug fixes

5.9.7 — 2023-12-17

Enhancements

  • #2324: enforce Ruff rule raw-string-in-exception, which helps providing clearer tracebacks when exceptions are raised by psutil.

Bug fixes

  • #2325, [PyPy]: psutil did not compile on PyPy due to missing PyErr_SetExcFromWindowsErrWithFilenameObject cPython API.

5.9.6 — 2023-10-15

Enhancements

Bug fixes

5.9.5 — 2023-04-17

Enhancements

Bug fixes

5.9.4 — 2022-11-07

Enhancements

  • #2102: use Limited API when building wheels with CPython 3.6+ on Linux, macOS and Windows. (patch by Matthieu Darbois)

Bug fixes

5.9.3 — 2022-10-18

Enhancements

  • #2040, [macOS]: provide wheels for arm64 architecture. (patch by Matthieu Darbois)

Bug fixes

5.9.2 — 2022-09-04

Bug fixes

5.9.1 — 2022-05-20

Enhancements

Bug fixes

5.9.0 — 2021-12-29

Enhancements

  • #1851, [Linux]: cpu_freq() reads from /proc/cpuinfo instead of many files in /sys fs, faster on systems with many CPUs. (patch by marxin)

  • #1992: NoSuchProcess message now specifies if the PID has been reused. Error classes now have improved __repr__ and __str__.

  • #1996, [BSD]: add support for MidnightBSD. (patch by Saeed Rasooli)

  • #1999, [Linux]: disk_partitions(): convert /dev/root device (an alias used on some Linux distros) to real root device path.

  • #2005: PSUTIL_DEBUG mode now prints file name and line number of the debug messages coming from C extension modules.

  • #2042: rewrite HISTORY.rst to use hyperlinks pointing to psutil API doc.

Bug fixes

5.8.0 — 2020-12-19

Enhancements

  • #1863: disk_partitions() exposes 2 extra fields: maxfile and maxpath, which are the maximum file name and path name length.

  • #1872, [Windows]: added support for PyPy 2.7.

  • #1879: provide pre-compiled wheels for Linux and macOS (yey!).

  • #1880: switch CI from Travis/Cirrus to GitHub Actions (Linux, macOS, FreeBSD). AppVeyor still used for Windows.

Bug fixes

5.7.3 — 2020-10-23

Enhancements

Bug fixes

5.7.2 — 2020-07-15

Bug fixes

  • wheels for 2.7 were inadvertently deleted.

5.7.1 — 2020-07-15

Enhancements

  • #1729: parallel tests on POSIX (make test-parallel). They’re twice as fast!

  • #1741, [POSIX]: make build now runs in parallel on Python >= 3.6 and it’s about 15% faster.

  • #1747: Process.wait() return value is cached so that the exit code can be retrieved on then next call.

  • #1747, [POSIX]: Process.wait() on POSIX now returns an enum, showing the negative signal which was used to terminate the process. It returns something like <Negsignal.SIGTERM: -15>.

  • #1747: Process class provides more info about the process on str() and repr() (status and exit code).

  • #1757: memory leak tests are now stable.

  • #1768, [Windows]: added support for Windows Nano Server. (contributed by Julien Lebot)

Bug fixes

5.7.0 — 2020-02-18

Enhancements

Bug fixes

5.6.7 — 2019-11-26

Bug fixes

  • #1630, [Windows], [critical]: can’t compile source distribution due to C syntax error.

5.6.6 — 2019-11-25

Bug fixes

  • #1179, [Linux]: Process.cmdline() now handles processes that use inappropriate chars to separate args.

  • #1616, [critical]: use of Py_DECREF instead of Py_CLEAR will result in double free() and segfault (CVE-2019-18874). (patch by Riccardo Schirone)

  • #1619, [OpenBSD], [critical]: compilation fails due to C syntax error. (patch by Nathan Houghton)

5.6.5 — 2019-11-06

Bug fixes

  • #1615: remove pyproject.toml as it was causing installation issues.

5.6.4 — 2019-11-04

Enhancements

  • #1527, [Linux]: added Process.cpu_times() iowait counter, which is the time spent waiting for blocking I/O to complete.

  • #1565: add PEP 517/8 build backend and requirements specification for better pip integration. (patch by Bernát Gábor)

Bug fixes

5.6.3 — 2019-06-11

Enhancements

Bug fixes

5.6.2 — 2019-04-26

Enhancements

Bug fixes

5.6.1 — 2019-03-11

Bug fixes

  • #1329, [AIX]: psutil doesn’t compile on AIX 6.1. (patch by Arnon Yaari)

  • #1448, [Windows], [critical]: crash on import due to rtlIpv6AddressToStringA not available on Wine.

  • #1451, [Windows], [critical]: Process.memory_full_info() segfaults. NtQueryVirtualMemory is now used instead of QueryWorkingSet to calculate USS memory.

5.6.0 — 2019-03-05

Enhancements

  • #1379, [Windows]: Process.suspend() and Process.resume() now use NtSuspendProcess / NtResumeProcess instead of stopping / resuming all threads. Faster and more reliable.

  • #1420, [Windows]: in case of exception disk_usage() now also shows the path name.

  • #1422, [Windows]: DLL-loaded Windows APIs are now loaded once on startup instead of per function call, significantly faster.

  • #1426, [Windows]: PAGESIZE and number of processors is now calculated on startup.

  • #1428: in case of error, the traceback message now shows the underlying C function called which failed.

  • #1433: new Process.parents() method. (idea by Ghislain Le Meur)

  • #1437: pids() are returned in sorted order.

  • #1442: Python 3 is now the default interpreter used by Makefile.

Bug fixes

Incompatible API changes

5.5.1 — 2019-02-15

Enhancements

  • #1348, [Windows]: on Windows >= 8.1, Process.cmdline() falls back to NtQueryInformationProcess on ERROR_ACCESS_DENIED. (patch by EccoTheFlintstone)

Bug fixes

  • #1394, [Windows]: Process.exe() returns “[Error 0] The operation completed successfully” when Python process runs in “Virtual Secure Mode”.

  • #1402: psutil exceptions’ repr() show the internal private module path.

  • #1408, [AIX], [critical]: psutil won’t compile on AIX 7.1 due to missing header. (patch by Arnon Yaari)

5.5.0 — 2019-01-23

Enhancements

Bug fixes

5.4.8 — 2018-10-30

Enhancements

Bug fixes

5.4.7 — 2018-08-14

Enhancements

Bug fixes

5.4.6 — 2018-06-07

Bug fixes

5.4.5 — 2018-04-14

Bug fixes

  • #1268: setup.py’s extra_require parameter requires latest setuptools version, breaking quite a lot of installations.

5.4.4 — 2018-04-13

Enhancements

Bug fixes

Backward compatibility

  • #771, [Windows]: cpu_count() with logical=False on Windows XP and Vista is no longer supported and returns None.

5.4.3 — 2018-01-01

Enhancements

Bug fixes

5.4.2 — 2017-12-07

Enhancements

Bug fixes

5.4.1 — 2017-11-08

Enhancements

Bug fixes

  • #1150, [Windows]: when a process is terminated now the exit code is set to SIGTERM instead of 0. (patch by Akos Kiss)

  • #1151: python -m psutil.tests fail.

  • #1154, [AIX], [critical]: psutil won’t compile on AIX 6.1.0. (patch by Arnon Yaari)

  • #1167, [Windows]: net_io_counters() packets count now include also non-unicast packets. (patch by Matthew Long)

5.4.0 — 2017-10-12

Enhancements

Bug fixes

5.3.1 — 2017-09-10

Enhancements

Bug fixes

Compatibility notes

  • #1120: .exe files for Windows are no longer uploaded on PyPI as per PEP-527. Only wheels are provided.

5.3.0 — 2017-09-01

Enhancements

Bug fixes

Porting notes

5.2.2 — 2017-04-10

Bug fixes

5.2.1 — 2017-03-24

Bug fixes

5.2.0 — 2017-03-05

Enhancements

Bug fixes

5.1.3 — 2017-02-07

Bug fixes

5.1.2 — 2017-02-03

Bug fixes

5.1.1 — 2017-02-03

Enhancements

Bug fixes

5.1.0 — 2017-02-01

Enhancements

Bug fixes

  • #687, [Linux]: pid_exists() no longer returns True if passed a process thread ID.

  • #948: cannot install psutil with PYTHONOPTIMIZE=2.

  • #950, [Windows]: Process.cpu_percent() was calculated incorrectly and showed higher number than real usage.

  • #951, [Windows]: the uploaded wheels for Python 3.6 64 bit didn’t work.

  • #959: psutil exception objects could not be pickled.

  • #960: Popen wait() did not return the correct negative exit status if process is killed by a signal.

  • #961, [Windows]: WindowsService.description() method may fail with ERROR_MUI_FILE_NOT_FOUND.

5.0.1 — 2016-12-21

Enhancements

  • #939: tar.gz distribution went from 1.8M to 258K.

  • #811, [Windows]: provide a more meaningful error message if trying to use psutil on unsupported Windows XP.

Bug fixes

  • #609, [SunOS], [critical]: psutil does not compile on Solaris 10.

  • #936, [Windows]: fix compilation error on VS 2013 (patch by Max Bélanger).

  • #940, [Linux]: cpu_percent() and cpu_times_percent() was calculated incorrectly as iowait, guest and guest_nice times were not properly taken into account.

  • #944, [OpenBSD]: pids() was omitting PID 0.

5.0.0 — 2016-11-06

Note

psutil 5.0 introduces breaking API changes. See the migration guide if upgrading from 4.x.

Enhncements

  • #799: new Process.oneshot() context manager (+2x faster in general, +2x to +6x on Windows).

  • #943: better error message in case of version conflict on import.

Bug fixes

4.4.2 — 2016-10-26

Bug fixes

  • #931, [critical]: psutil no longer compiles on Solaris.

4.4.1 — 2016-10-25

Bug fixes

  • #927, [critical]: Popen __del__ may cause maximum recursion depth error.

4.4.0 — 2016-10-23

Enhancements

Bug fixes

4.3.1 — 2016-09-01

Enhancements

  • #881: make install now works also when using a virtual env.

Bug fixes

4.3.0 — 2016-06-18

Enhancements

Bug fixes

  • #810, [Windows]: Windows wheels are incompatible with pip 7.1.2.

  • #812, [NetBSD], [critical]: fix compilation on NetBSD-5.x.

  • #823, [NetBSD]: virtual_memory() raises TypeError on Python 3.

  • #829, [POSIX]: disk_usage() percent field takes root reserved space into account.

  • #816, [Windows]: fixed net_io_counters() values wrapping after 4.3GB in Windows Vista (NT 6.0) and above using 64bit values from newer win APIs.

4.2.0 — 2016-05-14

Enhancements

Bug fixes

4.1.0 — 2016-03-12

Enhancements

Bug fixes

4.0.0 — 2016-02-17

Enhancements

Bug fixes

3.4.2 — 2016-01-20

Enhancements

  • #728, [SunOS]: exposed PROCFS_PATH constant to change the default location of /proc filesystem.

Bug fixes

3.4.1 — 2016-01-15

Enhancements

Bug fixes

3.3.0 — 2015-11-25

Enhancements

  • #558, [Linux]: exposed PROCFS_PATH constant to change the default location of /proc filesystem.

  • #615, [OpenBSD]: added OpenBSD support. (contributed by Landry Breuil)

Bug fixes

3.2.2 — 2015-10-04

Bug fixes

  • #517, [SunOS]: net_io_counters() failed to detect network interfaces correctly on Solaris 10

  • #541, [FreeBSD]: disk_io_counters() r/w times were expressed in seconds instead of milliseconds. (patch by dasumin)

  • #610, [SunOS]: fix build and tests on Solaris 10

  • #623, [Linux]: process or system connections raises ValueError if IPv6 is not supported by the system.

  • #678, [Linux], [critical]: can’t install psutil due to bug in setup.py.

  • #688, [Windows]: compilation fails with MSVC 2015, Python 3.5. (patch by Mike Sarahan)

3.2.1 — 2015-09-03

Bug fixes

  • #677, [Linux], [critical]: can’t install psutil due to bug in setup.py.

3.2.0 — 2015-09-02

Enhancements

Bug fixes

3.1.1 — 2015-07-15

Bug fixes

3.1.0 — 2015-07-15

Enhancements

Bug fixes

3.0.1 — 2015-06-18

Bug fixes

  • #632, [Linux]: better error message if cannot parse process UNIX connections.

  • #634, [Linux]: Process.cmdline() does not include empty string arguments.

  • #635, [POSIX], [critical]: crash on module import if enum package is installed on Python < 3.4.

3.0.0 — 2015-06-13

Enhancements

Bug fixes

2.2.1 — 2015-02-02

Bug fixes

2.2.0 — 2015-01-06

Enhancements

Bug fixes

2.1.3 — 2014-09-26

  • #536, [Linux], [critical]: fix “undefined symbol: CPU_ALLOC” compilation error.

2.1.2 — 2014-09-21

Enhancements

  • #407: project moved from Google Code to Github; code moved from Mercurial to Git.

  • #492: use tox to run tests on multiple Python versions. (patch by msabramo)

  • #505, [Windows]: distribution as wheel packages.

  • #511: add scripts/ps.py.

Bug fixes

2.1.1 — 2014-04-30

Bug fixes

2.1.0 — 2014-04-08

Enhancements

Bug fixes

  • #421, [SunOS], [critical]: psutil does not compile on SunOS 5.10. (patch by Naveed Roudsari)

  • #489, [Linux]: disk_partitions() return an empty list.

2.0.0 — 2014-03-10

Enhancements

  • #424, [Windows]: installer for Python 3.X 64 bit.

  • #427: add cpu_count().

  • #447: wait_procs() timeout parameter is now optional.

  • #452: make Process instances hashable and usable with set() s.

  • #453: tests on Python < 2.7 require unittest2 module.

  • #459: add a Makefile for running tests and other repetitive tasks (also on Windows).

  • #463: make timeout parameter of cpu_percent* functions default to 0.0 ‘cause it’s a common trap to introduce slowdowns.

  • #468: move documentation to readthedocs.com.

  • #477: Process.cpu_percent() is about 30% faster. (suggested by crusaderky)

  • #478, [Linux]: almost all APIs are about 30% faster on Python 3.X.

  • #479: long deprecated psutil.error module is gone; exception classes now live in psutil namespace only.

Bug fixes

API changes

For the sake of consistency a lot of psutil APIs have been renamed. In most cases accessing the old names will work but it will cause a DeprecationWarning.

  • psutil.* module level constants have being replaced by functions:

    Old name

    Replacement

    psutil.NUM_CPUS

    psutil.cpu_count()

    psutil.BOOT_TIME

    psutil.boot_time()

    psutil.TOTAL_PHYMEM

    virtual_memory.total

  • Renamed psutil.* functions:

    Old name

    Replacement

    psutil.get_pid_list()

    psutil.pids()

    psutil.get_users()

    psutil.users()

    psutil.get_boot_time()

    psutil.boot_time()

  • All Process get_* methods lost the get_ prefix. E.g. get_ext_memory_info() was renamed to memory_info_ex(). Assuming p = psutil.Process():

    Old name

    Replacement

    p.get_children()

    p.children()

    p.get_connections()

    p.connections()

    p.get_cpu_affinity()

    p.cpu_affinity()

    p.get_cpu_percent()

    p.cpu_percent()

    p.get_cpu_times()

    p.cpu_times()

    p.get_ext_memory_info()

    p.memory_info_ex()

    p.get_io_counters()

    p.io_counters()

    p.get_ionice()

    p.ionice()

    p.get_memory_info()

    p.memory_info()

    p.get_memory_maps()

    p.memory_maps()

    p.get_memory_percent()

    p.memory_percent()

    p.get_nice()

    p.nice()

    p.get_num_ctx_switches()

    p.num_ctx_switches()

    p.get_num_fds()

    p.num_fds()

    p.get_num_threads()

    p.num_threads()

    p.get_open_files()

    p.open_files()

    p.get_rlimit()

    p.rlimit()

    p.get_threads()

    p.threads()

    p.getcwd()

    p.cwd()

  • All Process set_* methods lost the set_ prefix. Assuming p = psutil.Process():

    Old name

    Replacement

    p.set_nice()

    p.nice(value)

    p.set_ionice()

    p.ionice(ioclass, value=None)

    p.set_cpu_affinity()

    p.cpu_affinity(cpus)

    p.set_rlimit()

    p.rlimit(resource, limits=None)

  • Except for pid, all Process class properties have been turned into methods. This is the only case which there are no aliases. Assuming p = psutil.Process():

    Old name

    Replacement

    p.name

    p.name()

    p.parent

    p.parent()

    p.ppid

    p.ppid()

    p.exe

    p.exe()

    p.cmdline

    p.cmdline()

    p.status

    p.status()

    p.uids

    p.uids()

    p.gids

    p.gids()

    p.username

    p.username()

    p.create_time

    p.create_time()

  • timeout parameter of cpu_percent* functions defaults to 0.0 instead of 0.1.

  • long deprecated psutil.error module is gone; exception classes now live in “psutil” namespace only.

  • Process instances’ retcode attribute returned by wait_procs() has been renamed to returncode for consistency with subprocess.Popen.

1.2.1 — 2013-11-25

Bug fixes

  • #348, [Windows], [critical]: fixed “ImportError: DLL load failed” occurring on module import on Windows XP.

  • #425, [SunOS], [critical]: crash on import due to failure at determining BOOT_TIME.

  • #443, [Linux]: Process.cpu_affinity() can’t set affinity on systems with more than 64 cores.

1.2.0 — 2013-11-20

Enhancements

Bug fixes

  • #348, [Windows]: fix “ImportError: DLL load failed” occurring on module import on Windows XP / Vista.

1.1.3 — 2013-11-07

Bug fixes

  • #442, [Linux], [critical]: psutil won’t compile on certain version of Linux because of missing prlimit(2) syscall.

1.1.2 — 2013-10-22

Bug fixes

  • #442, [Linux], [critical]: psutil won’t compile on Debian 6.0 because of missing prlimit(2) syscall.

1.1.1 — 2013-10-08

Bug fixes

  • #442, [Linux], [critical]: psutil won’t compile on kernels < 2.6.36 due to missing prlimit(2) syscall.

1.1.0 — 2013-09-28

Enhancements

Bug fixes

API changes

  • #408: turn STATUS_* and CONN_* constants into plain Python strings.

1.0.1 — 2013-07-12

Bug fixes

1.0.0 — 2013-07-10

Enhancements

  • #18, [SunOS]: add Solaris support (yay!) (thanks Justin Venus)

  • #367: Process.connections() status strings are now constants.

  • #380: test suite exits with non-zero on failure. (patch by floppymaster)

  • #391: introduce unittest2 facilities and provide workarounds if unittest2 is not installed (Python < 2.7).

Bug fixes

API changes

0.7.1 — 2013-05-03

Bug fixes

0.7.0 — 2013-04-12

Enhancements

  • #233: code migrated to Mercurial (yay!)

  • #246: psutil.error module is deprecated and scheduled for removal.

  • #328, [Windows]: Process.ionice() support.

  • #359: add boot_time() as a substitute of psutil.BOOT_TIME since the latter cannot reflect system clock updates.

  • #361, [Linux]: cpu_times() now includes new steal, guest and guest_nice fields available on recent Linux kernels. Also, cpu_percent() is more accurate.

  • #362: add cpu_times_percent() (per-CPU-time utilization as a percentage).

Bug fixes

API changes

0.6.1 — 2012-08-16

Enhancements

  • #316: Process.cmdline() property now makes a better job at guessing the process executable from the cmdline.

Bug fixes

  • #316: Process.exe() was resolved in case it was a symlink.

  • #318, [critical]: Python 2.4 compatibility was broken.

API changes

0.6.0 — 2012-08-13

Enhancements

Bug fixes

  • #298, [macOS], [BSD]: memory leak in Process.num_fds().

  • #299: potential memory leak every time PyList_New(0) is used.

  • #303, [Windows], [critical]: potential heap corruption in Process.num_threads() and Process.status() methods.

  • #305, [FreeBSD], [critical]: can’t compile on FreeBSD 9 due to removal of utmp.h.

  • #306, [critical]: at C level, errors are not checked when invoking Py* functions which create or manipulate Python objects leading to potential memory related errors and/or segmentation faults.

  • #307, [FreeBSD]: values returned by net_io_counters() are wrong.

  • #308, [BSD], [Windows]: psutil.virtmem_usage() wasn’t actually returning information about swap memory usage as it was supposed to do. It does now.

  • #309: Process.open_files() might not return files which can not be accessed due to limited permissions. AccessDenied is now raised instead.

API changes

  • psutil.phymem_usage() is deprecated (use virtual_memory())

  • psutil.virtmem_usage() is deprecated (use swap_memory())

  • [Linux]: psutil.phymem_buffers() is deprecated (use virtual_memory())

  • [Linux]: psutil.cached_phymem() is deprecated (use virtual_memory())

  • [Windows], [BSD]: psutil.virtmem_usage() now returns information about swap memory instead of virtual memory.

0.5.1 — 2012-06-29

Enhancements

Bug fixes

0.5.0 — 2012-06-27

Enhancements

Bug fixes

API changes

0.4.1 — 2011-12-14

Bug fixes

0.4.0 — 2011-10-29

Enhancements

Bug fixes

  • #135, [macOS]: psutil cannot create Process object.

  • #144, [Linux]: no longer support 0 special PID.

  • #188, [Linux]: psutil import error on Linux ARM architectures.

  • #194, [POSIX]: Process.cpu_percent() now reports a percentage over 100 on multi core processors.

  • #197, [Linux]: Process.connections() is broken on platforms not supporting IPv6.

  • #200, [Linux], [critical]: psutil.NUM_CPUS not working on armel and sparc architectures and causing crash on module import.

  • #201, [Linux]: Process.connections() is broken on big-endian architectures.

  • #211: Process instance can unexpectedly raise NoSuchProcess if tested for equality with another object.

  • #218, [Linux], [critical]: crash at import time on Debian 64-bit because of a missing line in /proc/meminfo.

  • #226, [FreeBSD], [critical]: crash at import time on FreeBSD 7 and minor.

0.3.0 — 2011-07-08

Enhancements

Bug fixes

0.2.1 — 2011-03-20

Enhancements

Bug fixes

API changes

  • Process uid and gid properties are deprecated in favor of uids and gids properties.

0.2.0 — 2010-11-13

Enhancements

Bug fixes

API changes

0.1.3 — 2010-03-02

Enhancements

Bug fixes

0.1.2 — 2009-05-06

Enhancements

Bug fixes

0.1.1 — 2009-03-06

Enhancements

  • #4, [FreeBSD]: support for all functions of psutil.

  • #9, [macOS], [Windows]: add Process.uid and Process.gid, returning process UID and GID.

  • #11: per-process parent object: Process.parent() property returns a Process object representing the parent process, and Process.ppid() returns the parent PID.

  • #12, #15: NoSuchProcess exception now raised when creating an object for a nonexistent process, or when retrieving information about a process that has gone away.

  • #21, [Windows]: AccessDenied exception created for raising access denied errors from OSError or WindowsError on individual platforms.

  • #26: process_iter() function to iterate over processes as Process objects with a generator.

  • Process objects can now also be compared with == operator for equality (PID, name, command line are compared).

Bug fixes

  • #16, [Windows]: Special case for “System Idle Process” (PID 0) which otherwise would return an “invalid parameter” exception.

  • #17: get_process_list() ignores NoSuchProcess and AccessDenied exceptions during building of the list.

  • #22, [Windows]: Process.kill() for PID 0 was failing with an unset exception.

  • #23, [Linux], [macOS]: create special case for pid_exists() with PID 0.

  • #24, [Windows], [critical]: Process.kill() for PID 0 now raises AccessDenied exception instead of WindowsError.

  • #30: psutil.get_pid_list() was returning two 0 PIDs.