VMware {code} Community
ikrolo
Contributor
Contributor

Performance Metrics available through Virtual Center

Hi,

I have been having problems retrieving some metrics from a HostSystem that I'm able to retrieve from the ESX box when hooking into it

directly (such as disk- totalLatency), even though 'queryAvailablePerfMetric' returns these metrics as available for the HostSystem. I'm using the queryPerfComposite method to retrieve the metrics after building up the PerfQuerySpec (etc.).

I'm wondering if the list of perf metrics in this document are the only metrics supported through the Virtual Center, and if so, how come these metrics are still coming back in the list of available metrics for the HostSystem mor?

http://www.vmware.com/vmtn/resources/771

Thanks,

Ivan

0 Kudos
4 Replies
lamw
Community Manager
Community Manager

First off, the document you reference is a little old. I generally would recommend taking a looking at the metrics defined in the API reference documentation: http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.PerformanceManager.ht... You'll have more up to date information to reference.

You should also check this document around monitoring performance using the API/SDK, if you haven't already:

You may also want to take a look at this script I wrote: and see if you can retrieve the metrics you're interested in, I don't use queryPerfComposite() in my script nor have I used it in general, generally you'll query for available metrics, and then use queryPerf() to extract and process what you get back.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
admin
Immortal
Immortal

Can you please share the ESX and SDK version which are you using to retrieve the metrics?

I am able to retrieve the disk metric, totalLatency, on a ESX 4.0. Below are the disk metrics which are retrieved when we invoke queryPerf on HostSystem object:

1 - disk.usage.none Aggregate storage performance statistics. For hosts, this can be represented on a per virtual machine basis as a stacked graph.

2 - disk.usage.average Aggregate storage performance statistics. For hosts, this can be represented on a per virtual machine basis as a stacked graph.

3 - disk.usage.minimum Aggregate storage performance statistics. For hosts, this can be represented on a per virtual machine basis as a stacked graph.

4 - disk.usage.maximum Aggregate storage performance statistics. For hosts, this can be represented on a per virtual machine basis as a stacked graph.

5 - disk.numberRead.summation Number of disk reads in the period

6 - disk.numberWrite.summation Number of disk writes in the period

7 - disk.read.average Rate of reading data from the disk

8 - disk.write.average Rate of writing data to the disk

9 - disk.totalLatency.average The average amount of time a command takes from the perspective of a guest operating system. This average is the sum of the kernel command latency and the physical device command latency.

10 - disk.maxTotalLatency.latest The highest total latency value of all disks on the host.

11 - disk.commandsAborted.summation Number of disk commands stopped in the period

12 - disk.busResets.summation Number of bus resets in the period

13 - disk.used.latest Storage space actually used by a virtual machine or a datastore

14 - disk.provisioned.latest Storage size up to which a virtual machine or files on a datastore can grow

15 - disk.capacity.latest Datastore storage capacity

16 - disk.unshared.latest Storage space not shared by a virtual machine with others

17 - disk.deltaused.latest Storage overhead of a virtual machine or a datastore due to delta disk backings

18 - disk.commands.summation Number of disk commands issued in the period

19 - disk.deviceReadLatency.average The average time a read from the physical device takes.

20 - disk.kernelReadLatency.average The average time spent in VMkernel per read

21 - disk.totalReadLatency.average The average amount of time a read takes from the perspective of a guest operating system. This average is the sum of kernel read latency and physical device read latency.

22 - disk.queueReadLatency.average The average time spent in the VMkernel queue per read.

23 - disk.deviceWriteLatency.average The average time a write from the physical device takes.

24 - disk.kernelWriteLatency.average The average time spent in VMkernel per write.

25 - disk.totalWriteLatency.average The average amount of time a write takes from the perspective of a guest operating system. This average is the sum of the kernel write latency and the physical device write latency.

26 - disk.queueWriteLatency.average The average time spent in the VMkernel queue per write.

27 - disk.deviceLatency.average The average time a command from the physical device takes.

28 - disk.kernelLatency.average The average time spent in VMkernel per command.

29 - disk.queueLatency.average The average time spent in the VMkernel queue per command.

0 Kudos
ikrolo
Contributor
Contributor

Hi,

Thank you for your responses. I'm using the vim25.jar (provided in the VMware 4.0 SDK download) when connecting to our ESX boxes (we have ESX 3.5 and ESXi 4.0 boxes), and to our Virtual Center (4.0.0).

When looking at the newest references of the 4.0 sdk, it doesn't state that there is a difference between what's available through the Virtual Center vs. what's available through a direct ESX: http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/disk_counters.htm

Angela, have you been able to retrieve those disk metrics from the ESX host system when connecting through the Virtual Center? I'm able to retrieve the metrics when connecting through the ESX system directly.

Thanks

0 Kudos
ikrolo
Contributor
Contributor

Actually, I just tried doing a queryPerf on the HostSystem and it seems to work! It's a bit strange because queryPerfComposite used to work when going through the ESX server directly. At least the change to use queryPerf instead of queryPerfComposite still allows this same code to work when going through the ESX, so I guess I should have used queryPerf in the first place for my case.

0 Kudos