Can someone explain as what is the difference between CPU% showed in top and in ps? I mean the way in which they are calculated. I can see each of these commands giving different numbers for the same process at the same instant.
Can someone explain as what is the difference between CPU% showed in top and in ps? I mean the way in which they are calculated. I can see each of these commands giving different numbers for the same process at the same instant.
And I would assume top samples at a higher rate. top always shows me low CPU% compared to ps and the difference is quite big. For the process I tested with top showed around 1% whereas ps showed around 20% and the value showed by ps was exactly the same for 5 minutes I monitored whereas top was fluctuating between 0-2%.
Why this big a difference? And how to interpret the CPU usage from ps compared to that of top?
top is realtime.
ps is the average CPU in an interval.
Dell Inspiron 1464
Intel Core-i3 @ 2.13Ghz | 4G 1066Mhz DDR3
GMA HD | Intel SSD 80Gb |
Running Ubuntu 12.04 "Precise"
Bookmarks