VMware Cloud Community
mayurbhokase
Contributor
Contributor

Unable to fetch performance data (Read/Write Latency) for datastore by using vim25.

Hi All,

We are using vim25 provided with vsphere SDK version 6.7u2.

We are trying to fetch the performance data for specific datastore from vCenter. By using counters like numberReadAveraged, numberWriteAveraged, read, write, totalReadLatency, totalWriteLatency.

First up all, We are fetching all available counters for group datastore from vCenter. It is returning approx. 40+ counter which includes my required counters also. i.e. (numberReadAveraged, numberWriteAveraged, read, write, totalReadLatency, totalWriteLatency)

pastedImage_0.png

Before fetching this actual data, We are verifying this counters are available for specific datastore or not by using MOR of that datastore. refer following snippet,

pastedImage_1.png

Here, we are getting counter id of numberReadAveraged(178), numberWriteAveraged(179), read (180), write (181) but NOT getting counter id for totalReadLatency(182), totalWriteLatency(183).

pastedImage_2.png

Hence, we are unable to retrieve performance data for latency due to not getting this counters for datastore.

When we check the same counters in UI of vCenter then we observed that, this counters available for same datastore.

pastedImage_3.png

As well as, performance data is also available against this counters and selected datastore,

pastedImage_4.png

We have refer this code from java sample programs available in SDK. Attaching sample program file for reference. (TestPerformanceData.java)

Please suggest if we are missing anything here.

Thanks in Advance!

Reply
0 Kudos
0 Replies