I'm using the Python library for vsphere (pyvmomi) and I'm trying to get the performance data for a vm, this is the performance part:
perfManager = content.perfManager
metricId = vim.PerformanceManager.MetricId(counterId=6, instance="*")
startTime = datetime.datetime.now() - datetime.timedelta(hours=1)
endTime = datetime.datetime.now()
query = vim.PerformanceManager.QuerySpec(maxSample=1,
entity=host,
metricId=[metricId],
startTime=startTime,
endTime=endTime)
object = perfManager.QueryPerf(querySpec=[query])
result = object[0]
for child in result.sampleInfo:
print(child)
However I'm not sure how to manipulate or even "read" this information, this is what I get when inspecting 'child':
How can this information be disclosed in a set of performance metrics?