Getting access to the process table from python?

R

Roy Smith

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.
 
A

Aahz

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"?
 
J

John Gabriele

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.

You might visit the Cheeseshop and search for "process table" there.
Searching there, I see one good hit that looks like what you're after.

---John
 
T

Terry Reedy

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.

Did you try google or pypi?
 
S

Simon Brunning

2010/1/13 Roy Smith said:
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.

<http://www.psychofx.com/psi/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top