How to get process info from python
gardner at networknow.org
Mon Jun 7 23:48:44 CEST 2004
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.
> -----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 vs
> Sent: Monday, June 07, 2004 5:31 PM
> To: python-list at python.org
> Subject: Re: How to get process info from python
> "Gardner Pomper" <gardner at networknow.org> wrote in message
> news:<mailman.671.1086631192.6949.python-list at python.org>...
> > Hi,
> > I have another newbie question for the list. I have some python
> scripts that
> > need to look at the list of processes running on the system. I
> am currently
> > just spawning a 'ps' and parsing the output. Are there any
> existing python
> > modules to do this? It would be particularly handy to have it be more
> > platform independent than my solution, which works only on AIX.
> > - Gardner
> Try the os,sys modules that comes with python. They help u in
> interfacing with the OS directly.
> - vinodh
More information about the Python-list