cancel
Showing results for 
Search instead for 
Did you mean: 

vmstat

SOLVED
Go to solution
Steve Camarata
Occasional Visitor

vmstat

Does anyone know if vmstat correctly reports cpu utilization in a multi-CPU environment?

Thanks.
6 REPLIES
Mohamed K Ahmed
Trusted Contributor

Re: vmstat

It is better to use the command sched_stat
and you can see at the end of its execution the CPU usage for every CPU

vmstat shows the usage for all CPU, but I am not sure if it is correct or not.
you have to run it for some time... like vmstat 1 10, becasue if you ran it once, you will see a comulative stats

use sched_stat better

Mohamed
Orrin
Valued Contributor
Solution

Re: vmstat

Hi,
your better off using collect, which will give you the follwing information per CPU.
( Since you haven't mentioned anything about OS level and version , I'm assuming Tru64 V5.1A > )

Per CPU Section
_________________________________________________________
CPU# Index for scripts.
USER Percent time (ticks) spent in user-level code.
This includes nice ticks.
SYS Percent time (ticks) spent in kernel.
IDLE Percent time (ticks) spent doing nothing.
WAIT Idle ticks while waiting for I/O to happen.

Hope this Helps,
Regards,
Orrin.
Ravi_8
Honored Contributor

Re: vmstat

Hi

vmstat gives only the overall usage of CPU, Memory et all

#sched_stat
or
#/usr/bin/vmstat -p

gives clearinfo about processors
never give up
Joris Denayer
Respected Contributor

Re: vmstat

Hi,
As far as I know, the vmstat output is correct in multi-cpu systems. The cpu figures are indeed global figures.
This is the average of the sys,user,idle,(wait) times of all cpus.
If you are interested in per CPU statistics, then go for sched_stat or use "collect -sp"

Enjoy
To err is human, but to really faul things up requires a computer
Hein van den Heuvel
Honored Contributor

Re: vmstat

The answer is 'yes of course'.
Why do you ask?
What makes you think there might be a problem?
And if you really think is it a bug, it would be required to know the OS version and patch levels.
What is the 'real problem' you are trying to solve?

in addition to the previous replies, which are all useful, sometime 'top' is the best smp display tool. Myself I like 'monitor' but that is harder to find.

Cheers,
Hein.
Steve Camarata
Occasional Visitor

Re: vmstat

Thanks for the info. We are behind on upgrades, so we are at 4.0F. The vmstat output was sufficient to show daily load for the request for new servers.

Thanks again for all the info.