ANN: psutil 0.4.0 released

Discussion in 'Python' started by Giampaolo Rodolà, Oct 29, 2011.

  1. Hi folks,
    I'm pleased to announce the 0.4.0 release of psutil:
    http://code.google.com/p/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.

    2 scripts were added to provide an example of what kind of
    applications can be written with these two hooks:
    http://code.google.com/p/psutil/source/browse/trunk/examples/iotop.py
    http://code.google.com/p/psutil/source/browse/trunk/examples/nettop.py

    ....and here you can see some screenshots:
    http://code.google.com/p/psutil/#Example_applications

    === 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:
    http://psutil.googlecode.com/svn/trunk/HISTORY


    === 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 ===

    * Home page: http://code.google.com/p/psutil
    * Source tarball: http://psutil.googlecode.com/files/psutil-0.4.0.tar.gz
    * Api Reference: http://code.google.com/p/psutil/wiki/Documentation


    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'

    http://code.google.com/p/pyftpdlib/
    http://code.google.com/p/psutil/
     
    Giampaolo Rodolà, Oct 29, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Giampaolo Rodola'
    Replies:
    2
    Views:
    637
    Giampaolo Rodola'
    May 10, 2009
  2. Giampaolo Rodola'

    ANN: psutil 0.1.3 released

    Giampaolo Rodola', Mar 4, 2010, in forum: Python
    Replies:
    0
    Views:
    253
    Giampaolo Rodola'
    Mar 4, 2010
  3. Giampaolo Rodolà

    ANN: psutil 0.2.0 released

    Giampaolo Rodolà, Nov 13, 2010, in forum: Python
    Replies:
    0
    Views:
    249
    Giampaolo Rodolà
    Nov 13, 2010
  4. Giampaolo Rodolà
    Replies:
    0
    Views:
    289
    Giampaolo Rodolà
    Mar 20, 2011
  5. Giampaolo Rodolà

    ANN: psutil 0.3.0 released

    Giampaolo Rodolà, Jul 8, 2011, in forum: Python
    Replies:
    0
    Views:
    185
    Giampaolo Rodolà
    Jul 8, 2011
Loading...

Share This Page