Getting access to the process table from python?

John Gabriele jmg3000 at
Wed Jan 13 21:25:10 CET 2010

On Jan 13, 1:41 pm, Roy Smith <r... at> 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.

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.


More information about the Python-list mailing list