[libvirt-users] Storage statistics

Giuseppe Civitella gcivitella at entermail.it
Mon Oct 5 15:49:42 UTC 2015

Hi all,

I'd like to get a few storage statistics from a running vm.
I'd like to know read and write data about QCOW2 devices and about RBD
I did try to execute a command similar to this:
virsh qemu-monitor-command vm-vnc '{ "execute": "query-block"}'
as described here:
and implemented here:

But I do not get any live data.
As example, I get this values about RBD volumes whether I do or I don't
read data from the volume inside the vm:

            "device": "drive-virtio-disk1",
            "inserted": {
                "backing_file_depth": 0,
                "bps": 0,
                "bps_rd": 0,
                "bps_wr": 0,
                "drv": "raw",
                "encrypted": false,
                "encryption_key_missing": false,
                "image": {
                    "cluster-size": 4194304,
                    "dirty-flag": false,
                    "format": "raw",
                    "virtual-size": 5368709120
                "iops": 0,
                "iops_rd": 50,
                "iops_rd_max": 5,
                "iops_wr": 50,
                "iops_wr_max": 5,
                "ro": false
            "io-status": "ok",
            "locked": false,
            "removable": false,
            "type": "unknown"

Do I need to enable the statistics collection in a specific way?
Is there a better way of doing this?

My system is an Ubuntu 14.04.2 with libvirtd (libvirt) 1.2.2, kernel
3.13.0-55, ceph version 0.80.9.


Giuseppe Civitella
gcivitella at entermail.it

More information about the libvirt-users mailing list