What is the command to see CPU load of a RedHat Linux server?
|
Personally I think looking at the average load of a period is best. Otherwise you might get quite different values depending on the timing. (e.g. enter a command and press [Enter] might yield a different result than if you pressed [Enter] a fraction of a second later.) Some ways of checking the load average are:
If you have one core then a load of 1 more or less indicates that core is busy 100% of the time. This number can exceed 1 (or 100%). If that happens there is on average more then one process in the run queue. If you have multiple CPU's then 100% (or 1.00) means that one average one core is busy all the time. E.g. with 4 core this could mean 1 core running flat out and 3 cores being idle. Or 4 cores running ¼ of the time. |
|||||
|
|
Thanks, but it gives cpu load per process. I want to see total CPU load, for example 85% – alwbtc Jul 29 '12 at 13:55 |
|||
If you look at the top line in the first image (program top). It has the line load average. The three values after that are the load average over time. – Hennes Jul 29 '12 at 14:06 |
|||
|
@alwbtc: They all give you that in various forms. If you look at the output of mpstat you see an idle value of 99.24. This means I have a CPU load of 0.76%. As @Hennes notes, there is also the load average displayed, which is another indicator of CPU load. If you really only want a command that returns a single percent value, you'll probably want to post-process the output of mpstat. – Oliver Salzburg♦ Jul 29 '12 at 14:17 |
||
|



