Results 1 to 1 of 1
Hi All,
I am trying to get % cpu usage from getrusage api. This value never matching with TOP value. Initially I used to calculate the value by getting details ...
- 05-21-2009 #1Just Joined!
- Join Date
- May 2009
- Posts
- 1
compare getrusage and TOP
Hi All,
I am trying to get % cpu usage from getrusage api. This value never matching with TOP value. Initially I used to calculate the value by getting details from /proc/PID/stat and the value used to be matching with TOP but due to some other problems like its taking much resources, I do not want to use /proc...
Can any one explain how getrusage result is different from TOP result and which is correct. As most users know TOP to my knowledge, how can we get near by value using getrusage when compared to TOP.
Thanks
Ram


Reply With Quote