Reputation: 197
I am using the Citrix XenServer C SDK to obtain values of host_cpu utlization.
Any idea what units this data is represented in the test/test_get_records.c
Generates the following output.. I am expecting percentile:
Please comment on how this figure relates to a percentage value.
Upvotes: 0
Views: 67
Reputation: 197
XenServer has obsoleted these methods. It is however possible to use the CLI to run an script on the xenserver using xe commands to obtain some these utilization data.
However, the data obtained are in raw-format: you would have to average the values of all cpu cores to get the overall CPU usage.
Upvotes: 0
Reputation: 2337
Looking at the header file, it is a double. http://opensrcd.ca.com/ips/07400_4/include/xen/api/xen_host_cpu.h
Depending on your machine you might try %llf instead of %lf but...
I think you are supposed to use their helper functions to access the data. eg:
/**
* Get the utilisation field of the given host_cpu.
*/
extern bool
xen_host_cpu_get_utilisation(xen_session *session, double *result, xen_host_cpu host_cpu);
Upvotes: 1