Windows DevCenter    
 Published on Windows DevCenter (
 See this if you're having trouble printing code examples

Recipe: 5.9 Monitoring CPU Usage - VMWare Cookbook

by Ryan Troy and Matthew Helmke

Monitoring CPU Usage


You want to monitor your ESX server’s CPU usage.

VMWare Cookbook book cover

This excerpt is from VMWare Cookbook. This book provides a look into real-world use of VMware ESX and ESXi, with step-by-step solutions for problems that occur in a wide range of environments. Written by experts with experience using VMware in a production environment, VMware Cookbook shares tips and tricks earned through trial and error, and supplies the background you need to apply them.

buy button


Use the esxtop utility.


From the command line on your ESX server, run the following:


If you are familiar with the Unix top utility, esxtop will feel similar. Once esxtop is running, press c to switch to CPU mode. This will display your server’s current CPU usage statistics (Figure 5.5, “esxtop default CPU display”).

Figure 5.5. esxtop default CPU display

esxtop default CPU display

The first line displayed tells you:

The PCPU(%) line displays the percentage of CPU utilization per physical CPU and the total average across all the physical CPUs.

The CCPU(%) line shows the CPU time as reported by the ESX server or console. This is a user time variable, as opposed to the PCPU, which measures time from the CPU’s point of view.

Below the PCPU and CCPU lines, the following attributes are available:


The number of the processor


The ID of the running world’s resource pool


The name of the currently running process


The number of worlds in the group


The percentage of physical CPU used by the resource pool, virtual machine, or world


The percentage of total time scheduled (not taking into account hyper-threading and system time)


System time: the time that elapses while kernel code is running


The total percentage of time the resource pool or world has spent in a wait state


The percentage of time the resource pool, virtual machine, or world has spent ready to run but waiting to get a CPU


The percentage of time the VCPU world has spent in an idle loop (this applies only to the VCPU world; for other worlds, this field will be zero)


The percentage of time spent by system services working on behalf of other worlds


The percentage of time the world has spent in a ready, co-descheduled state (this state applies only to SMP VMs)


The percentage of time the world spent ready to run but deliberately wasn’t scheduled to avoid violating the CPU limit settings

You can find additional information regarding performance monitoring at

If you enjoyed this excerpt, buy a copy of VMWare Cookbook.

Copyright © 2009 O'Reilly Media, Inc.