Hope somebody can tell what I am doing wrong.
I'm still on 5.5 and tries to get load-data for ESXi-hosts (via vcenter connected to orchestrator-server) to decide on which host is best target for vmotion-action.
Since I couldn't find any builtin workflow or actions to get load-data I tried to dig it out myself via a script.
- find all hosts
- for each host read out the value host.summary.quickStats.overallCpuUsage
I get values, but they are static and does not get updated.
If I use perl-sdk and do the same actions towards vcenter I get updated values for each esxi-host.
Browsing the objects via web on the vcenter-server also shows these values get updated.
So only my orchestrator-workflow seems to be wrong.
I do suspect the workflow in orchestrator is only querying the Inventory and not the live objects. It is alot faster than doing the same with perl-sdk.
My small script (that could be run in a single Scriptable-task with no input/output only Log-printing). Problem can be seen by the log-printout. Total MHz used does not change in my environment.
--------------------------------CUT
var hosts = System.getModule("com.vmware.library.vc.host").getAllHostSystems() ;
var tothz = 0;
for (i in hosts){
var cpu_used = hosts[i].summary.quickStats.overallCpuUsage;
tothz = tothz+cpu_used;
}
System.log( "tothz: "+tothz);
--------------------------------CUT
Q1: Am I doing something stupid in my script?
Q2: Do I have to do some additional steps to get updated values?
Q3: Is there a better way to find performance/load-data for the ESXi-hosts?