Process Information by PID
Peter Hansen
peter at engcorp.com
Thu Oct 16 08:56:18 EDT 2003
Thomas Guettler wrote:
>
> I want to get some information about
> a process.
>
> I know its PID, and I need
> to know the commandline.
>
> I need something like:
> > ps -p $THISPID
Surely you've already considered using popen? On the other hand,
using "-p" doesn't give me the command line for processes, just
the name of the command itself.
What about reading from the /proc/$PID/cmdline pseudo-file ?
-Peter
More information about the Python-list
mailing list