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?