Python process utilities (psutil)

Summary

psutil is a module providing an interface for retrieving information on running processes in a portable way by using Python.

It currently supports Linux, OS X, FreeBSD and Windows.

http://code.google.com/p/psutil/

Example usages

>>> psutil.get_pid_list()
[1, 2, 3, 4, 5, 6, 7, 46, 48, 50, 51, 178, 182, 222, 223, 224,
268, 1215, 1216, 1220, 1221, 1243, 1244, 1301, 1601, 2237, 2355,
2637, 2774, 3932, 4176, 4177, 4185, 4187, 4189, 4225, 4243, 4245,
4263, 4282, 4306, 4311, 4312, 4313, 4314, 4337, 4339, 4357, 4358,
4363, 4383, 4395, 4408, 4433, 4443, 4445, 4446, 5167, 5234, 5235,
5252, 5318, 5424, 5644, 6987, 7054, 7055, 7071]
>>> p = psutil.Process(7055)
>>> p.name
'python'
>>> p.path
'/usr/bin'
>>> p.cmdline
['/usr/bin/python', '-O']
>>> p.uid
1000
>>> p.gid
1000
>>>

Mailing lists

Users
http://groups.google.com/group/psutil/topics

Developers
http://groups.google.com/group/psutil-dev/topics

SVN commits and issue tracker changes
http://groups.google.com/group/psutil-commits/topics