On Thu, Sep 24, 2015 at 07:43:25PM +0000, Jean-Pierre Ribeauville wrote:
Hi, My piece of code ( C langage) uses cgroups to retrieve counters related to cpu and memory usage related to KVM guests hosted by the host where this code runs. I noticed that depending on the O.S. running on the host , these counters are not found at the same location : CentOS 7 : ls /sys/fs/cgroup/cpuacct/machine.slice/machine-qemu\\x2drhel6.0.scope/vcpu0 cgroup.clone_children cgroup.procs cpuacct.usage cpu.cfs_period_us cpu.rt_period_us cpu.shares notify_on_release cgroup.event_control cpuacct.stat cpuacct.usage_percpu cpu.cfs_quota_us cpu.rt_runtime_us cpu.stat tasks ]# RHEL6 : ls /cgroup/cpuacct/libvirt/qemu/VM_Orion-1/vcpu0 cgroup.event_control cgroup.procs cpuacct.stat cpuacct.usage cpuacct.usage_percpu notify_on_release tasks 1) May I assume that their meanings is identical ?
Yes (although each is for different domain)
2) Is this difference due to the O.S. or to libvirt ?
systemd
3) I presume I've to check this point on Ubuntu , Debian and Fedora .
depends on whether it's using systemd or not and maybe other factors as well. If you have the PID of the domain, though, you can get the base directory from /proc/$PID/cgroup and start from there and then you don't need to check each system.
Thanks J.P. Ribeauville P: +33.(0).1.47.17.20.49 . Puteaux 3 Etage 5 Bureau 4 jpribeauville@xxxxxxxxx<mailto:jpribeauville@xxxxxxxxx> http://www.axway.com<http://www.axway.com/> P Pensez à l'environnement avant d'imprimer.
_______________________________________________ libvirt-users mailing list libvirt-users@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvirt-users
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ libvirt-users mailing list libvirt-users@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvirt-users