How to get process info from python
nav+posts at bandersnatch.org
Tue Jun 8 16:51:51 CEST 2004
"Gardner Pomper" <gardner at networknow.org> writes:
> On a related issue, I was very surprise to see that os.loadavg() had been
> added in version 2.3. This seems just as OS specific as the ps functionality
> I want, so that raised my hopes.
I've had to work with process data in the past, and you're right, a
module to handle accessing ps data would be quite useful. Just for
fun, I've started writing something to help. All the systems that I
use "ps" on support a "-o format" for extracting specific information,
is this option supported on AIX?[*]
What sort of information do you need from ps? I'll try to work it into
the module's functionality.
I can't promise when it will be ready, but you seem to be rolling your
own solution anyway.
[*] Linux, OS X, and Tru64 (nee DEC Unix nee OSF/1). I don't have
access to an AIX system right now.
# sigmask || 0.2 || 20030107 || public domain || feed this to a python
print reduce(lambda x,y:x+chr(ord(y)-1),' Ojdl!Wbshjti!=obwAcboefstobudi/psh?')
More information about the Python-list