Hi,

I think best way is to use BPF to collect stats. I did this in past in combination with 'perf'.
Theres a nice book of Brandon Greg from Netflix Networks where he describe how to do this and how to write own scripts.

merry Xmas

marko


26.12.2022 11:34:20 Gk Gk <ygk.kmr@gmail.com>:

Hi All,

I am trying to collect memory, disk and network stats for a VM on kvm host. It seems that the statistics are not matching what the OS inside the VM is reporting. Why is this discrepancy ?

Is this a known bug of libvirt ? Also I heard that libvirt shows cumulative figures for these measures ever since the VM was created.  Also I tested by creating a new vm and comparing the stats without a reboot . Even in this case, the stats dont agree.  Can someone help me here please ?


Thanks
Kumar