How to get process info from python

Gardner Pomper gardner at networknow.org
Mon Jun 7 19:50:09 EDT 2004


Hi,

Ok, thanks for letting me know. I was pretty sure that it wasn't in the
standard modules, but I was hoping that there would be a module out there
somewhere.

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.

- Gardner

> -----Original Message-----
> From: python-list-bounces+gardner=networknow.org at python.org
> [mailto:python-list-bounces+gardner=networknow.org at python.org]On Behalf
> Of Donn Cave
> Sent: Monday, June 07, 2004 7:14 PM
> To: python-list at python.org
> Subject: Re: How to get process info from python
>
>
> In article <mailman.678.1086645166.6949.python-list at python.org>,
>  "Gardner Pomper" <gardner at networknow.org> wrote:
> > Thanks for the suggestion, but I have already looked at those
> modules. Do
> > you have a command in mind? I can only find process information
> about the
> > python process and its parents and children.. if I want to see
> a list of all
> > processes on the system, or all processes for the current user,
> I don't see
> > any way to get that.
>
> There isn't any support for this in Python.  Normally when saying
> something like that, I could half expect someone to pop up with
> a module or something, but in this case I feel relatively confident
> that no such module is widely supported.
>
> On Linux and *BSD platforms, you can get this information from the
> /proc filesystem instead of "ps", but it's still fairly platform
> dependent.  Of course that won't work on AIX.
>
>    Donn Cave, donn at u.washington.edu
> --
> http://mail.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list