per process Cpu utilization
hello frnds,
Can you plz tell me how do i calculate per process cpu utilization ...... i m sorry i m posting it again but didnt get a rational ans during my first post i know that we have to calculate uisng /proc/PID/stat n specifically frm fields 14 to 17.........but my main question is HOW???????????? HOW USING THOSE FIELDS????????????????? plz clarify me on that......... Once again i m sorry for posting it again...........but i m in need of it badly Regards, Kunal |
Why not just use 'top' or 'ps', since that's their purpose?
|
hello frnds,
I know i can use top or ps command but then i have simulate that command as a project so i need that statics plz tell me frnds way of this |
You'll probably find this article usefull. Remember, you can always look at the source for top and ps as well.
|
Get CPU Utilization in % for a Process
Hello Kunal,
I have the same question as you had. Did you resolve it. Were you able to get the CPU % and Mem % for each process through the /proc/pid/stat or /proc/pid/statm. Please reply me if you have the solution. Thanks, Noor |
All times are GMT -5. The time now is 10:30 PM. |