VMware Cloud Community
tomerber7
Contributor
Contributor

how do i get ESXi realtime usage?

Hello everyone.

I am trying to get the ESXi realtime usage using VCO and somehow its unsuccessful.

I am using the following code:

myVcHostSystem.reload();

myEsxOverallCpuUsage = myVcHostSystem.summary.quickStats.overallCpuUsage; 

myEsxOverallMemoryUsage = myVcHostSystem.summary.quickStats.overallMemoryUsage; 


somehow i am not getting realtime performance but the same performance every time!

it doesnt matter if i am doing reload to the ESXi or starting a new process of the workflow.


Thanks in advance,

Tomer.

0 Kudos
4 Replies
slahy
Enthusiast
Enthusiast

0 Kudos
tomerber7
Contributor
Contributor

Hi,

thank u for replying.

I tried this solution and its not working.

i found a workaround but its not an ellegant solution.

i am disconnecting and reconnecting the host before getting the performence.

does someone have a better solution?


0 Kudos
AntLeguy
Enthusiast
Enthusiast

I had the same issue, the only workaround I found is to use a powershell script and get the result back.

The reload() method does not work, i also tried the solution and it didn't work either.

I can't access it right now, but I'll post here the powershell script to use to get those information.

Hope it can help you.

0 Kudos
ivand
VMware Employee
VMware Employee

Please, try stopping inventory service and try to obtain the data.

Which version of vCO you are using? Which version of vCenter?

0 Kudos