On 06/23/2014 09:42 PM, coperd wrote:
[can you convince your mailer to wrap long lines?]
Hi, all. I’m current doing monitoring jobs(CPU, memory and disk
utilisation) on some KVM-based VMs using libvirt, but i came to some
confusions.
For the disk data(blkstat), I find that the results acquired by
virDomainBlockStats is not consistent with the value read from
/proc/[vm_pid]/io(i only
care “rd_bytes" and “wr_bytes"),
Just to make sure I follow, is this the /proc/$pid/io in the host? How
are you learning the $pid to ask about?
since libvirt doesn’t support host level monitoring, i have to
calculate the host’s disk utilisation by using the /proc/diskstats. The
weird thing
is that individual VM’s disk data can be greater that the total
disk’s
during some sampling time. Can someone explain this ?
Libvirt is just reporting the numbers that it is given by qemu. You may
need to ask on the qemu list how those numbers are collected. There may
be situations where qemu is reporting transactions that go through qemu,
but which end up being coalesced into fewer transactions to the actual
host disk (if the guest rapidly does two different writes to the same
sector, but the host only writes the sector once, for example) - so it
seems reasonable that the stats will not always agree when read from
different observation points in the system.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org