Getting CPU information on unterminatted child processes

Jay A. Konigsberg jak at sactoh0.UUCP
Sat Aug 11 19:43:04 AEST 1990


In article <1990Aug7.215320.13715 at mozart.amd.com> leight at mozart.amd.com (Timothy Leight) writes:
>I am interested in getting accurate cpu usage information
>on unterminated child processes. The getrusage() and/or times()
>system calls only return information on terminated children.
>
>What is the best method for getting this information?
>
Well, I don't know the best method, but I think I can point you in the
right direction (since no one else did).

ps -lf will provide much of the information needed, though it may not
produce enough and any way you invoke it (peopen or shell script), it
will be slow.

Another aproach is to get the information directly out of /dev/kmem.
However, all I know how to do there is get overall system usage
parameters. Specific information of /dev/kmem is probably system
specific and un-portable. However, the Sys V and Xenix 2.3.? header
file is: /usr/include/sys/sysinfo.h

Getting information about kernel level data structures on the net is
a little like asking for the moon, no one seems to have it. Anyway,
perhaps this post will generate a little discussion. I would like to
know more specifics about the Sys V kernel myself.

-- 
-------------------------------------------------------------
Jay @ SAC-UNIX, Sacramento, Ca.   UUCP=...pacbell!sactoh0!jak
If something is worth doing, its worth doing correctly.



More information about the Comp.unix.wizards mailing list