Hi there folks, I'm pleased to announce the 1.1.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, memory, disks, network, users) in a portable way by using Python, implementing many functionalities offered by command line tools such as ps, top, free, netstat, lsof and others. It supports Linux, Windows, OSX, FreeBSD and Solaris with Python versions from 2.4 to 3.4. === New features === The main addition included in this new release is the possibility to set process resource limits on Linux (see "man prlimit"). This functionality is similar to what you can already do with stdlib resource module (http://docs.python.org/2/library/resource.html) but it is extended to all processes. For example, you might limit the number of files which may be opened by a process:
p = psutil.Process(pid) p.set_rlimit(psutil.RLIMIT_NOFILE, (128, 128)) files = [] for x in range(200): ... files.append(open('/tmp/foo')) ... Traceback (most recent call last): File "<stdin>", line 2, in <module> IOError: [Errno 24] Too many open files: '/tmp/foo'
...or the maximum size of files that the process may create:
p.set_rlimit(psutil.RLIMIT_FSIZE, (1024, 1024)) f = open('/tmp/foo', 'w') f.write('x' * 1024) f.flush() f.write('x') f.flush() Traceback (most recent call last): File "<stdin>", line 1, in <module> IOError: [Errno 27] File too large
=== Main bugfixes === * Process.as_dict() return value couldn't be serialized to JSON. * [Windows] fixed a pretty serious memory leak in Process.get_memory_info(). * [Windows] Process get_children() and "name" property are an order of magnitude faster. === Other changes === * STATUS_* and CONN_* constants (returned by Process' status() and get_connections() methods respectively) have been turned from constant objects to plain Python strings. * source and Windows binary files are now hosted on PyPi Complete list of bugfixes and enhancements is here: https://psutil.googlecode.com/hg/HISTORY === Links === * Home page: http://code.google.com/p/psutil * Downloads: https://pypi.python.org/pypi?:action=display&name=psutil#downloads * API Reference: http://code.google.com/p/psutil/wiki/Documentation Please try out this new release and let me know if you experience any problem by filing issues on the bug tracker. All the best, --- Giampaolo Rodola' http://code.google.com/p/pyftpdlib/ http://code.google.com/p/psutil/ http://code.google.com/p/pysendfile/
participants (1)
-
Giampaolo Rodola'