[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt-users] With no luck with virDomainGetInfo and virDomainMemoryStats for memory usage of a running vm

Hi, all 

I am trying to get used memory of a running vm using libvirt and then to calculate the memory usage, but with no luck.

1.The used memory returned by virDomainGetInfo is equal to max memory with no virtio balloon driver set.  When using virtio balloon driver and setting currentMemory less than memory in the xml,  the used memory returned by virDomainGetInfo is nearly equal to currentMemroy. Again, I can't get the memory used by vm.
2. When I turned to virDomainMemoryStats, I can only get two values : Current balloon value and Resident Set Size of the process running the domain. (for kvm 0.14.1 and libvirt 1.0.2)

That's not what I want.  I only need to know how much memory used by the running vm, so I can calculate the memory usage of this vm. (like the used memory return by cmd "free -m") 

Any hints? 

Many thanks!

Z. Zhang
National Research Center for intelligent Computing Systems,
ICT, Chinese Academy of Sciences 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]