Hi everyone
I am writing a script that collects performance data, in particular cpu usage percentage, from various hosts and virtual machines.
I retrieve the data using QueryPerf function, in the same way that the viperformance.pl script does.
Recently I have noticed that the values for the cpu usage percentage are too large for a percentage ie. above 100.
At first I thought I have a bug in my script but then I noticed that the viperformance.pl script outputs the same values.
I run the viperformace.pl script like this:
./viperformance.pl --server xxx.xx.xx.x:xxx --username xxxxxx --password 'xxxxxxxxxx' --host xxxx.xxxxx.xxxxxx.xx --countertype cpu --samples 1
Performance data for: xxxx.xxxxx.xxxxxx.xx
Counter: CPU Usage (Average)
Instance :
Description: CPU usage as a percentage over the collected interval
Units: Percent
Sample info : 20,2009-05-22T08:27:20Z
Value: 538
Counter: CPU Usage in MHz (Average)
Instance :
Description: CPU usage in MHz over the collected interval. For hosts this can be represented on a per Virtual Machine basis as a stacked graph
Units: MHz
Sample info : 20,2009-05-22T08:27:20Z
Value: 1004
Can anyone explain what does the value of 538 mean? Do I have to process it further to get a real percentage?
Thank you very much
Jan
Hi Jan,
The value of cpu usage counter can be between 0 and 10000. This value is hundredth of a percent, so 1 = 0.01%.
Thus, in your case CPU Usage is actually 5.38% and 10.04% respectively.
Please refer to the counter documentation for more details.
http://www.vmware.com/support/developer/vc-sdk/visdk25pubs/ReferenceGuide/cpu.html
Hope this helps.
Hi Jan,
The value of cpu usage counter can be between 0 and 10000. This value is hundredth of a percent, so 1 = 0.01%.
Thus, in your case CPU Usage is actually 5.38% and 10.04% respectively.
Please refer to the counter documentation for more details.
http://www.vmware.com/support/developer/vc-sdk/visdk25pubs/ReferenceGuide/cpu.html
Hope this helps.
Just FYI - I keep a doc with latest pointers to performance monitoring information and added links to the Ref Guide 4.0 - as suggested by LarryZio
http://communities.vmware.com/docs/DOC-9840