On Tue, Feb 25, 2014 at 09:19:34AM -0500, Qiang Fu wrote:This are settings for the domain that you can change before the domain
> 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"
>
starts. "memory" is the maximum it can reach and "currentMemory" is
what the domain will have it cut down to using a memballoon.
This is "memory" and "currentMemory" respectively.
> 2. dominfo: this returns "Max memory" and "Used memory"
>
"actual" is what qemu reports when we call for stats on monitor, "rss"
> 3. dommemstat: this returns "actual" and "rss"
>
is RSS of the qemu process you'd get from /proc, e.g.
# grep VmRSS /proc/$(pidof qemu-system-x86_64)/status
VmRSS: 610508 kB
Yes.
> 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?
>
As I said above, that's what qemu tells us on the monitor. I haven't
> We don't understand what does "actual" stand for in dommemstat. Can anyone
> please explain us about that?
>
gone into too much detail when looking at the code, so I can't tell
you many more details, that may be a question for qemu.
You can get data about volumes in pools (vol-info), about volumes
> 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)?
>
per-domain (domblkinfo) and their statistics (domblkstat).
Martin
> Thanks a lot,
> Bruce
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list