KVM virsh dommemstat example
dommemstat domain [--period seconds] [[--config] [--live] | [--current]]
Get memory stats for a running domain.
Availability of these fields depends on hypervisor. Unsupported fields are missing from the output. Other fields may appear if communicating with a newer version of libvirtd.
For QEMU/KVM with a memory balloon, setting the optional --period
to a value larger than 0 in seconds will allow the balloon driver to return additional statistics which will be displayed by subsequent dommemstat commands. Setting the --period
to 0 will stop the balloon driver collection, but does not clear the statistics in the balloon driver. Requires at least QEMU/KVM 1.5 to be running on the host.
The --live
, --config
, and --current
flags are only valid when using the --period
option in order to set the collection period for the balloon driver. If --live
is specified, only the running guest collection period is affected. If --config
is specified, affect the next boot of a persistent guest. If --current
is specified, affect the current guest state.
Both --live
and --config
flags may be given, but --current
is exclusive. If no flag is specified, behavior is different depending on the guest state.
* - the real free memory that guest has.