ANN: psutil 0.4.0 released

Giampaolo Rodolà g.rodola at
Sat Oct 29 12:17:16 CEST 2011

Hi folks,
I'm pleased to announce the 0.4.0 release of psutil:

=== About ===

psutil is a module providing an interface for retrieving information
on all running processes and system utilization (CPU, disk, memory,
network) in a portable way by using Python, implementing many
functionalities offered by command line tools such as ps, top, free,
lsof and others.
It works on Linux, Windows, OSX and FreeBSD, both 32-bit and 64-bit,
with Python versions from 2.4 to 3.3 by using a single code base.

=== Major enhancements ===

Aside from fixing different high priority bugs this release introduces
two new important features: disks and network IO counters.
With these, you can monitor disks usage and network traffic.

3 scripts were added to provide an example of what kind of
applications can be written with these two hooks:

...and here you can see some screenshots:

=== Other enhancements ==

- Process.get_connections() has a new 'kind' parameter to filters for
  connections by using different criteria.
- timeout=0 parameter can now be passed to Process.wait() to make it
return immediately (non blocking).
- Python 3.2 installer for Windows 64 bit is now provided in downloads section.
- (FreeBSD) addeed support for Process.getcwd()
- (FreeBSD) Process.get_open_files() has been rewritten in C and no
longer relies on lsof.
- various crashes on module import across differnt platforms were fixed.

For a complete list of features and bug fixes see:

=== New features by example ===

>>> import psutil
>>> psutil.disk_io_counters()
iostat(read_count=8141, write_count=2431, read_bytes=290203,
       write_bytes=537676, read_time=5868, write_time=94922)
>>> psutil.disk_io_counters(perdisk=True)
{'sda1' :iostat(read_count=8141, write_count=2431, read_bytes=290203,
                 write_bytes=537676, read_time=5868, write_time=94922),
 'sda2' :iostat(read_count=811241, write_count=31, read_bytes=1245,
                 write_bytes=11246, read_time=768008, write_time=922)}
>>> psutil.network_io_counters()
iostat(bytes_sent=1270374, bytes_recv=7828365,
       packets_sent=9810, packets_recv=11794)
>>> psutil.network_io_counters(pernic=True)
{'lo': iostat(bytes_sent=800251705, bytes_recv=800251705,
              packets_sent=455778, packets_recv=455778),
 'eth0': iostat(bytes_sent=813731756, bytes_recv=4183672213,
                packets_sent=3771021, packets_recv=4199213)}
>>> import os
>>> p = psutil.Process(os.getpid())
>>> p.get_connections(kind='tcp')
[connection(fd=115, family=2, type=1, local_address=('', 48776),
            remote_address=('', 80), status='ESTABLISHED')]
>>> p.get_connections(kind='udp6')
>>> p.get_connections(kind='inet6')

=== Links ===

* Home page:
* Source tarball:
* Api Reference:

As a final note I'd like to thank Jeremy Whitlock, who kindly
contributed disk/network io counters code for OSX and Windows.

Please try out this new release and let me know if you experience any
problem by filing issues on the bug tracker.
Thanks in advance.

--- Giampaolo Rodola'

More information about the Python-announce-list mailing list