Zhihua Che
2012-May-28 04:38 UTC
[libvirt-users] What features of kernel are required to support virDomainGetCPUStats?
Hi, Weeks ago, I developed my app under ubuntu-11.10 (kernel 3.0) with lilbvirt-0.9.10. In my code , I used virDomainGetCPUStats to query cpu usage info of domains, and it worked well. However, today, I port my code to ubuntu-10.04.4 (kernel 2.6.32) with libvirt-0.9.10, I find the function virDomainGetCPUStats can't work and complains "this function is not supported by the connection driver: virDomainGetCPUStats". I guess the kernel difference cause this problem because the libvirt is the same on two operating systems. I wonder what features of kernel are required to support virDomainGetCPUStats? I thought cgroup is a prerequisite. The following are .config files of two kernels. ubuntu-11.10 CONFIG_CGROUP_FREEZER=y CONFIG_CGROUP_DEVICE=y CONFIG_CPUSETS=y CONFIG_PROC_PID_CPUSET=y CONFIG_CGROUP_CPUACCT=y CONFIG_RESOURCE_COUNTERS=y CONFIG_CGROUP_MEM_RES_CTLR=y CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y CONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED=y CONFIG_CGROUP_PERF=y CONFIG_CGROUP_SCHED=y CONFIG_FAIR_GROUP_SCHED=y CONFIG_RT_GROUP_SCHED=y CONFIG_BLK_CGROUP=y ubuntu-10.04.4 CONFIG_CGROUP_NS=y CONFIG_CGROUP_FREEZER=y CONFIG_CGROUP_DEVICE=y CONFIG_CPUSETS=y CONFIG_PROC_PID_CPUSET=y CONFIG_CGROUP_CPUACCT=y CONFIG_RESOURCE_COUNTERS=y CONFIG_CGROUP_MEM_RES_CTLR=y CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y CONFIG_CGROUP_SCHED=y CONFIG_FAIR_GROUP_SCHED=y CONFIG_RT_GROUP_SCHED=y CONFIG_MM_OWNER=y As you can see, CPUSET and CPUACCT are enabled in both kernels. So what else features of kernel are required to support virDomainGetCPUStats? harvey
Eric Blake
2012-May-28 15:25 UTC
[libvirt-users] What features of kernel are required to support virDomainGetCPUStats?
On 05/27/2012 10:38 PM, Zhihua Che wrote:> Hi, > Weeks ago, I developed my app under ubuntu-11.10 (kernel 3.0) with > lilbvirt-0.9.10. In my code , I used virDomainGetCPUStats to query cpu > usage info of domains, and it worked well. > However, today, I port my code to ubuntu-10.04.4 (kernel 2.6.32) with > libvirt-0.9.10, I find the function virDomainGetCPUStats can't work > and complains "this function is not supported by the connection > driver: virDomainGetCPUStats".That's not a problem with your kernel, but with your libvirtd being too old. virDomainGetCPUStats was not wired up for qemu until libvirt 0.9.11. See here for the full table of which libvirtd versions support which APIs for a given URI: http://libvirt.org/hvsupport.html -- Eric Blake eblake at redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 620 bytes Desc: OpenPGP digital signature URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120528/988c1a60/attachment.sig>
Reasonably Related Threads
- [libivrt-users] What features of kernel are required to support virDomainGetCPUStats?
- What does cpu_time returned by virDomainGetCPUStats mean?
- problem when get the vm cpu stat
- virDomainGetCPUStats missing in Java API bindings ?
- What's the precision of the domain cpu stats?