[libvirt] KVM Domain memory and disk usage

Qiang Fu fuqiang2310 at gmail.com
Tue Feb 25 14:19:34 UTC 2014


Hi all,

I am trying to use virsh to get the memory and storage usage for KVM domain.

Right now we can get domain memory statistics through the following virsh
cmds:
1.      dumpxml: this returns "memory" and "currentMemory"

2.      dominfo: this returns "Max memory" and "Used memory"

3.      dommemstat: this returns "actual" and "rss"

We think "memory" (from dumpxml) = "Max memory" (from dominfo) and
"currentMemory" (from dumpxml) = "Used memory" (from dominfo). Can anyone
please help us to confirm this?

We don't understand what does "actual" stand for in dommemstat. Can anyone
please explain us about that?

Finally, we want to get the memory utilization of the domain on VM level in
percentage. And we derive it as:
Utilization = rss / Used memory
Can anyone please provide any comment on this?

In terms of disk usage, it seems virsh / libvirt does not support any
domain disk information right now. If not, can anyone please give us any
idea how to get the domain disk information (size, used space and so on)?

Thanks a lot,
Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140225/88e59ab1/attachment-0001.htm>


More information about the libvir-list mailing list