1

mpstat 1

11:01:57 AM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle
11:01:58 AM  all   36.03   61.95    2.03    0.00    0.00    0.00    0.00    0.00    0.00
11:01:59 AM  all   38.59   59.25    2.12    0.00    0.00    0.00    0.00    0.00    0.03
11:02:00 AM  all   37.03   60.88    2.06    0.00    0.00    0.00    0.00    0.00    0.03
11:02:01 AM  all   38.85   58.94    2.20    0.00    0.00    0.00    0.00    0.00    0.00

How is it possible that %idle is zero and usr% is not 100%?

That was the question The answer is total cpu usage is %usr+%nice mostly.

0

Because nice is sitting at a higher percentage.

Nice is a way of running commands so that they only use idle CPU time. Right now there are user apps using the CPU and the rest of the spare cycles are going to something that is lower priority.

So, in your example that you have given lets take a look at the first line:

11:01:57 AM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle
11:01:58 AM  all   36.03   61.95    2.03    0.00    0.00    0.00    0.00    0.00    0.00

From this we can see that 36.03 percent of your CPU is being used by regular priority applications. 61.95% of your cpu is being used by low pritority apps, the rest by system apps. That adds up to 100.

6
  • your explanation is not clear. cpu% should display how much cpu is used...
    – Aftershock
    Dec 4 '14 at 14:56
  • Okay, let me try and clarify more...
    – Arthur
    Dec 4 '14 at 14:59
  • How can I know what isconsidered to be low priority? As far as I know all apps have priority?
    – Aftershock
    Dec 4 '14 at 15:06
  • Depends on the app. If you use the "top" command it'll show the process and how much "Nice" cpu it's using.
    – Arthur
    Dec 4 '14 at 15:10
  • the same app can use both cpu% and nice%, right?
    – Aftershock
    Dec 4 '14 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.