Process System cpu
I need to find out the following for a particular process on RHEL 4.
1. Process system cpu (percent).
2. Process user cpu (percent).
3. Cumulative process system cpu (percent).
4. Cumulative process user cpu (percent).
I was told that I need to get those details from /proc/<pid>/stat file. I would be happy if anyone could give me the method for calculating the above. I also need to know whether /proc/<pid>/stat will give correct values for all processes.
Thanks.
|