]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Implement qemuDomainGetStatsCpu fallback for qemu:///session
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 9 Aug 2022 14:16:09 +0000 (16:16 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 5 Sep 2022 11:55:11 +0000 (13:55 +0200)
commit044b8744d65f8571038f85685b3c4b241162977b
tree5913d73d2d369612da16fabefd20b3c0b6f96223
parentcdc22d9a21e472a02dae8157e3cca5832f161feb
qemu: Implement qemuDomainGetStatsCpu fallback for qemu:///session

For domains started under session URI, we don't set up CGroups
(well, how could we since we're not running as root anyways).
Nevertheless, fetching CPU statistics exits early because of
lacking cpuacct controller. But with recent extension to
virProcessGetStatInfo() we can get the values we need from the
proc filesystem. Implement the fallback for the session URI as
some of virt tools rely on cpu.* stats to be reported (virt-top,
virt-manager).

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/353
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1693707
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_driver.c