VMware Cloud Community
LuckyT
Contributor
Contributor

CPU & Memory usage

Hi

I'm using this code to get the overall usage of CPU & Memory, but it returns zero. When i try to print name (i.e. myVcHostSystem.name) it prints properly. but when i try to get quickstatistics, it is returning zero. Can anyone help?

for each ( myVcHostSystem in cluster.host ) 

    { 

      myClusterOverallCpuUsage += myVcHostSystem.summary.quickStats.overallCpuUsage;

      myClusterOverallMemoryUsage += myVcHostSystem.summary.quickStats.overallMemoryUsage; 

     

    } 

0 Kudos
3 Replies
Burke-
VMware Employee
VMware Employee

See if turning off vCO's use of the Inventory service helps:

Edit your vmo.properties file and add the following line:

com.vmware.o11n.vim.useInventoryService=false

then, restart vCO.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
0 Kudos
LuckyT
Contributor
Contributor

Thanks.

I added the line in the below location, but still it is not showing the usage details.

C:\Program Files\VMware\Infrastructure\Orchestrator\app-server\server\vmo\tmp\dars\o11nplugin-vsphere50.dar\META-INF\maven\com.vmware.o11n.plugin\o11nplugin-vsphere50\pom.properties

0 Kudos
LuckyT
Contributor
Contributor

I updated the line in C:\Program Files\VMware\Orchestrator\app-server\server\vmo\conf\vmo.properties but stil facing the same issue. I'm using vcenter 5.1.0. could you help?

0 Kudos