-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No VM disk statistics #11
Comments
This is the relevant code: Is is missing the capacity/allocation/available data from virDomainGetBlockInfo(), or the reads/writes/errors counter data from virDomainBlockStats(), or both? The binary is compiled with "-g -O2" so you should be able to set a breakpoint in gdb and debug like this: If you'd rather build from sources and add print statements then you'll need gcc and something like this: |
Thanks for supporting me. I've created a new test vm with a cqow image in default storage pool, and now, dumping data with sflowtool, I can see valorized those counters: Incidentally now the break point works (b mod_kvm.c:169). Before, with not standard storage pool vm, it had never been reached. EDIT: Perhaps I was too hasty in my diagnosis. I think that the discriminant is the type of storage pool. With qcow images counters are ok, with lvm do not. EDIT2: I can confirm, disk counters work only with qcow backing storage. |
Sounds like it's not recognizing the lvm storage when it parses the XML. If you could send the output of "virsh dumpxml " that would be helpful. |
hsflowd in debug mode returns: dbg1: attribute dev and this is right: one virtual cdrom (hda) and seven virtual lvm disk (from vda to vdg) Follow xml of test vm: |
It looks like we might be able to pick up the disk stats a different way... It depends on how a qemu VM is treated with respect to Linux cgroups. For example, I have a KVM system running Ubuntu 14.4 with a VM called "test6" and it looks like I can get disk stats like this: cat /sys/fs/cgroup/blkio/machine/test6.libvirt-qemu/blkio.throttle.* Can you substitute "test6" with "test" on your system and get numbers this way? Do the numbers look as though they are specific to that VM? We already pick up cgroup stats this way in hsflowd's mod_docker, so this could be quite straightforward to add. Just need to understand how it appears in different versions of KVM. I'll try Fedora 24 next and see what appears there. |
I think cgroup it's the right way. On RHEL7.2 (kernel 3.10.0-327.el7.x86_64) the relevant counter can be found in: /sys/fs/cgroup/blkio/machine.slice/{weird_name}/ {weird_name} is something like this (in my case the hostname contain a hyphen): machine-qemu\x2d{host_hostname}\x2dgo\x2d{guest_name}\x2da.scope Most part of blkio.throttle.* are not valorized, only blkio.throttle.io_service_bytes and blkio.throttle.io_serviced. I've the same situation on a Centos 7.2, with much more newer libvirtd and qemu-kvm. So i can suppose that only matters host's kernel version. The cgoup approach is used also by others interesting project. Take a look, for example, at https://github.com/firehol/netdata/ P.S. Systemd systems use different names, see https://libvirt.org/cgroups.html Thanks. |
Hi,
I'm testing a setup to monitor kvm with ganglia, everything seems fine except for VM disk statistics (empty graph).
Some detail:
Can you help me? Thanks a lot.
The text was updated successfully, but these errors were encountered: