问题
I would like to use XenServer Java API to collect some performance information from a pool of hosts, but I am having some trouble getting the HostCPU utilisation. For all CPUs the utilisation comes with 0.0 value, and I don't know why. I have not found a way to get the disk I/O speed (read and write in b/s). Has anyone had succeeded in getting this data?
回答1:
In XenServer version 5.5, the way these metrics are stored has changed, and it is now recommended to use the XML over HTTP API instead.
The getVCPUsUtilisation
method will always return 0.0 by default, but you can make it work as it did in earlier versions with the workaround documented here.
来源:https://stackoverflow.com/questions/17569881/collect-hostcpu-utilisation-and-disk-i-o-speed-using-xenserver-java-api