Getting access to the process table from python?

Aahz aahz at pythoncraft.com
Wed Jan 13 15:11:53 EST 2010


In article <08fc5739-1dd9-402f-84ba-d9f72f48dfed at j4g2000yqe.googlegroups.com>,
Roy Smith  <roy at panix.com> wrote:
>
>I need to get information about what processes are running on a box.
>Right now, I'm interested in Solaris and Linux, but eventually
>probably other systems too.  I need to know things like the pid,
>command line, CPU time, when the process started running, and owner.
>
>Has anybody written a module to do this?  I know I can run ps and
>parse the output, or troll /proc directly, but if somebody's already
>written all that, I'd rather not reinvent the wheel.

Google "python process table"?
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"If you think it's expensive to hire a professional to do the job, wait
until you hire an amateur."  --Red Adair



More information about the Python-list mailing list