Hi All,
I wrote below script to get Current CPU & Memory Usage on HostSystem in VCO 5.5, but below code always returns 0. Can someone help to resolve ? Is there any other way to get the Current Usage/Utilization ?
var myClusterOverallCpuUsage=0;
var myClusterOverallMemoryUsage=0;
var myVcHostSystem = VcPlugin.allHostSystems
myClusterOverallCpuUsage = myVcHostSystem[0].summary.quickStats.overallCpuUsage;
myClusterOverallMemoryUsage = myVcHostSystem[0].summary.quickStats.overallMemoryUsage;
System.log( "name:" +myVcHostSystem[0].name);
System.log( "CPU usage"+myClusterOverallCpuUsage);
Thanks
OK, one more thing to try is to disable the usage of vCenter inventory service.
Put the following line in your vCO's vmo.properties file:
com.vmware.o11n.vim.useInventoryService=false
and then restart the vCO server (vco-server service)
Let me run this script in my test lab and get back to U.
Verify that CPU and memory usage for this host are visible in vCenter itself. If they are not available there, you may need to restart host management agents. Check the following KB for information how to do so:
Hi,
The values in vCenter is visible & also i tested calling VIX API using Java and it returns the exact value from vCenter. But when i call from VCO it is returning 0.
Thanks
OK, one more thing to try is to disable the usage of vCenter inventory service.
Put the following line in your vCO's vmo.properties file:
com.vmware.o11n.vim.useInventoryService=false
and then restart the vCO server (vco-server service)
Thanks Ilian, this did work for me..