gpt4 book ai didi

c - 供使用的 XenServer C SDK 单元

转载 作者:行者123 更新时间:2023-11-30 15:21:42 25 4
gpt4 key购买 nike

我正在使用 Citrix XenServer C SDK 来获取 host_cpu 利用率的值。

知道 test/test_get_records.c 中表示该数据的单位是什么吗 enter image description here生成以下输出..我期待百分位数:

Code Output

请评论该数字与百分比值的关系。

最佳答案

看头文件,是一个double。 http://opensrcd.ca.com/ips/07400_4/include/xen/api/xen_host_cpu.h

根据您的计算机,您可能会尝试 %llf 而不是 %lf,但是...

我认为您应该使用它们的辅助函数来访问数据。例如:

/**
* 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);

关于c - 供使用的 XenServer C SDK 单元,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29492854/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com