php - "QueryPerf" method of vSphere API returns strange results -
i need average daily statistics given vm. vm runs on vmware vsphere 5.1. use php , call methods through soap.
my code looks this:
$result = $this ->soapclient ->queryperf( array( '_this' => $this->servicecontent->perfmanager, 'queryspec' => array( 'entity' => $object, 'starttime' => $starttime->format( 'c' ), 'intervalid' => 86400, ), ) );
returned results cpu usage percentage during interval , memory usage percentage of total configured or available memory strange.
cpu result:
stdclass::__set_state(array( 'groupinfo' => stdclass::__set_state(array( 'label' => 'cpu', 'summary' => 'cpu', 'key' => 'cpu', )), 'nameinfo' => stdclass::__set_state(array( 'label' => 'usage', 'summary' => 'cpu usage percentage during interval', 'key' => 'usage', )), 'rolluptype' => 'average', 'statstype' => 'rate', 'unitinfo' => stdclass::__set_state(array( 'label' => 'percent', 'summary' => 'percentage', 'key' => 'percent', )), 'instance' => '', 'value' => 349, )),
the unit percent value 349.
memory result:
stdclass::__set_state(array( 'groupinfo' => stdclass::__set_state(array( 'label' => 'memory', 'summary' => 'memory', 'key' => 'mem', )), 'nameinfo' => stdclass::__set_state(array( 'label' => 'usage', 'summary' => 'memory usage percentage of total configured or available memory', 'key' => 'usage', )), 'rolluptype' => 'average', 'statstype' => 'absolute', 'unitinfo' => stdclass::__set_state(array( 'label' => 'percent', 'summary' => 'percentage', 'key' => 'percent', )), 'instance' => '', 'value' => 1193, )),
the unit percent value 1193.
the other values have same issues.
questions: doing wrong? how valid results?
note: these results postformatted, no calculations or other modifications of values performed on client side.
look @ docs. should divide percent value 100, real percent value.
Comments
Post a Comment