ANN: psutil 0.4.0 released

13 views
Skip to first unread message

Giampaolo Rodola'

unread,
Oct 29, 2011, 12:41:32 AM10/29/11
to psu...@googlegroups.com
Hi folks,
I'm pleased to announce the 0.4.0 release of psutil:

=== 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=('10.0.0.1', 48776), 
            remote_address=('93.186.135.91', 80), status='ESTABLISHED')]
>>> p.get_connections(kind='udp6')
[]
>>> p.get_connections(kind='inet6')
[]
>>>

=== Links ===



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'

Reply all
Reply to author
Forward
0 new messages