2

I am trying to get memory stats of KVM system using libvirt (usage, free). The GetCPUStats gives the CPU usage correctly, but the memory usage is always shown as 100% for the guests. Is there any way to get memory stats for the VM on a KVM using Dom0 data.

ajeet0112
  • 21
  • 1
  • 3

1 Answers1

0

I have the same question with virt-manager which always gives a value greater than 100% and this is the answers from the mailing list: https://www.redhat.com/archives/virt-tools-list/2015-November/msg00138.html

In general, the rss memory you get from libvirt contains some overhead from qemu. You should use dom.SetMemoryStatsPeriod to make libvirt work properly.

dotslashlu
  • 3,361
  • 4
  • 29
  • 56