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

when I issue the vmstat command without any parameter I get this result:

# vmstat
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
7 117      0 719328 1251624 258624672    0    0   346    64    0    0  4  0 92  3  0

As you can see cpu idle is 92 percent. No matter how many time I issue the command, I get similar results.

But when I issue vmstat with a time interval parameter, cpu idle value falls down immediately:

# vmstat 5        
    procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
385  0      0 145380064 1457188 115708528    0    0   346    64    0    0  4  0 92  3  0
417  0      0 144694256 1457204 116388928    0    0     0    49 1122 528500 84  5 12  0  0
413  0      0 143960640 1457220 117117040    0    0     0    31 1127 529619 84  5 11  0  0
418  0      0 143224224 1457228 117850080    0    0     0    26 1114 530135 84  5 11  0  0
444  0      0 142483520 1457240 118587048    0    0     0    33 1112 530314 84  5 11  0  0
397  0      0 141820240 1457256 119245040    0    0     0    37 1114 531348 85  5 10  0  0

Here it is! Even if I get results in 5 secs interval, cpu idle value falls about 80 percent!

I can't imagine if vmstat itself consume this much CPU power ( server has 32x Inter Xeon X7550 CPUs each has two 2 cores and 2 threads).

Can someone give me a clue about that %80 Cpu power I loose?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

From the man page:

If no delay is specified, only one report is printed with the average values since boot.

You are comparing the average idle time since the machine is up (92%) with five second intervals (10-12%), which doesn't make sense.

share|improve this answer

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.