Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

As the title says, the mpstat command, executed on Slack 13.0 continuously shows almost no processor utilization of any sort. In fact none of the output ever seems to change at all. The system is dual processor board with two hyperthreaded P4 Xeons. Any ideas?

08:50:06 PM  CPU   %user   %nice    %sys %iowait    %irq   %soft  %steal   %idle    intr/s
08:50:06 PM  all    0.38    0.00    0.03    0.03    0.00    0.00    0.00   99.56   1510.46
08:50:06 PM    0    0.50    0.00    0.05    0.10    0.00    0.01    0.00   99.33     11.90
08:50:06 PM    1    0.32    0.00    0.03    0.01    0.00    0.00    0.00   99.64      0.00
08:50:06 PM    2    0.38    0.00    0.03    0.01    0.00    0.00    0.00   99.58      0.00
08:50:06 PM    3    0.29    0.00    0.02    0.00    0.00    0.00    0.00   99.68      0.00

This is the only output I can get from the program. No values change ever.

share|improve this question
    
As a note, TOP works fine. –  conartist6 Jan 12 '11 at 18:17
    
As an interesting not both 'top' and 'vmstat 1' seem to display a behaviour which is not dissimilar: the first update both of those programs produce shows no CPU usage. The second update jumps to the appropriate numbers, with, say, loading one virtual core displaying 25% usage. I suppose I could, with a bit of hackery, just capture that output and use it... –  conartist6 Jan 12 '11 at 18:26

1 Answer 1

Seems to have been a misunderstanding. Mpstat prints avg's since system boot if it is not given any args, the documentation seems to have been a little unclear in its workding. To get one set of current statistics the command mpstat 1 1 can be issued, however it takes one second to return with the proper data.

share|improve this answer
    
Thank you, this was driving me insane. I'm assuming it takes a second to run as it reads the /proc/stat counters, and has to take 2 readings. See stackoverflow.com/questions/3017162/… –  rusvdw Mar 7 '11 at 18:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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