Get IOPS from KVM

robhost

Active Member
Jun 15, 2014
224
9
38
Dresden
www.robhost.de
Hi,

we're using "pvesh" to gather different metrics from our VMs (for monitoring purposes) and it works really good.
One important thing whats missing and would be very useful is IOPS from each VM here or in any other way?

Because we're able to limit IOPS within the panel it seems the value of current IOPS must be available somewhere ;)

Thanks!

Code:
  {
  "cpu" : 0.00433234541360506,
  "disk" : 0,
  "diskread" : 223035644416,
  "diskwrite" : 41336914944,
  "id" : "qemu/634",
  "maxcpu" : 2,
  "maxdisk" : 536870912000,
  "maxmem" : 4294967296,
  "mem" : 3260095742,
  "name" : "server123",
  "netin" : 5954537728,
  "netout" : 10519763792,
  "node" : "node44",
  "status" : "running",
  "template" : 0,
  "type" : "qemu",
  "uptime" : 1460191,
  "vmid" : 634
  },
 
i guess you use /cluster/resources as api path ?

try /nodes/<nodename>/qemu/<vmid>/status/current

this has an entry blockstat where we put some data for every disk/cdrom
 
That looks good, thank you! But it is really slow for hundreds of VMs (we've tested it a loop).

Any way to have this in /etc/pve/.rrd in an upcoming release?

Or can you explain where you gather these informations? Cgroups?
 
That looks good, thank you! But it is really slow for hundreds of VMs (we've tested it a loop).
hmm, maybe you can use our graphite or influxdb export?
see http://pve.proxmox.com/wiki/External_metric_server

Any way to have this in /etc/pve/.rrd in an upcoming release?
we have currently no plan for this, but we can discuss it

Or can you explain where you gather these informations? Cgroups?
via the qemu monitor

you can try it yourself via the monitor tab in the gui or qm monitor <vmid>
and then
Code:
info blockstats
 
Thanks!!! Works, we're using the Qemu monitoring socket and its instant there with the informations we want:

Code:
echo -e '{"execute":"qmp_capabilities"}\n{"execute":"query-blockstats"}' | socat - UNIX-CONNECT:/var/run/qemu-server/663.qmp