[libvirt-users] data monitored by "virDomainBlockStats" API not consistent with ones reading from /proc/[pid]/io, and corrugated with /proc/diskstats

coperd lhcwhu at gmail.com
Thu Jun 26 02:00:55 UTC 2014


On Jun 26, 2014, at 2:50 AM, Eric Blake <eblake at redhat.com> wrote:

> I'm still not clear how you are getting vcpu PID numbers for reading
> from /proc; it's not something that libvirt is currently advertising.

I thought the VM process’s /proc statistics information is exactly the same 
as the guest’s behaviour. It turns out to be my misunderstanding.

Each vcpu is a thread of the VM process in qemu implementation, whose 
thread id can be obtained by the “-L” option of the “ps” command.  It seems 
that I don't mention the vcpu PID. I’m referring to the VM process’s /proc/$pid.

If running a VM whose image file is located on the local disk, how can i 
calculate the disk bandwidth(the percentage, e.g. 40% disk) used by the VM? 
 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20140626/dec830a6/attachment.htm>


More information about the libvirt-users mailing list