Getting running subprocess CPU Use

Benjamin SAUTHIER benjamin.sauthier at worldonline.fr
Thu Feb 28 12:55:38 EST 2002


I launch a child process using Popen4('command'). This is on UNIX SGI
environment

How can I get the current  USER CPU Use of the subprocess (like what is
exactly done with the command 'top' or 'gr_top'). Is there any python
builtin command? How is it done in 'top'?

os.times() and resource.getrusage() don't work (they wait for the child to
complete).

No way to query the kernel?


Benjamin






More information about the Python-list mailing list