ps not sum all CPU usage
Hello,
I run CentOS 5 on VMware 7.0.1, and when Firefox is up, computer's CPU (both on host and guest) is 99%~100% use. I watch this in GUI System Monitor In Linux, but when I open Processes tab (or respectively use ps aux command) that what I see 0.1 /usr/sbin/vmtoo 2.8 /usr/bin/Xorg : 0.1 metacity --sm-c 0.2 nautilus --no-d 0.1 /usr/lib/vmware 0.3 gnome-terminal 28.5 /usr/lib/firefo 13.4 gnome-system-mo (names are cut) sum: 45.5 all other is 0.0 In resources tab I see 99% CPU use. When I close Firefox CPU usage become be ~10%. Some one can tell me how I can see more realistic image of CPU like it is in Windows for example? Thank you for ahead. |
Actually that is probably fairly accurate in reality. You can get a better running idea by using 'top'.
|
Thank you for replay.
Well, my problem isn't so deterministic... Now I running Firefox again and it not use too much CPU. Top actualy display the same (I mean sum of CPU usage) information like ps aux or System Monitor (but it is clear that top is more useful). So, I gues, that in every case there is some processes that not dispalyed or "CPU leakage" if it is possible... |
Run ps with the different options in the man page. Compare each with the output of top.
|
Lies, damn lies and statistics. You can do anything you like with numbers - and it's even worse when you are using sampled data.
But in your case I suspect you are merely missing the "sys" component. A cpu is considered 100% busy if there is no time when it is not busy. Sounds the same but isn't necessarily - especially with sampled data. And if (for example) kernel mode code is running half the time, only 50% is available to userland. But it's still 100% busy. Maybe. Short answer, don't try to be too exact. |
Thank you all, I will try run ps with different options and be less exact...
|
All times are GMT -5. The time now is 04:16 AM. |