[libvirt] libvirt domain memory statistics
Michal Privoznik
mprivozn at redhat.com
Wed Sep 6 11:42:11 UTC 2017
On 09/06/2017 01:09 PM, Marko Myllynen wrote:
> Hi,
>
> At least on RHEL 7 / libvirt-3.2 for domainListGetStats we only have the
> following in libvirt.py:
>
> # virDomainStatsTypes
> VIR_DOMAIN_STATS_STATE = 1
> VIR_DOMAIN_STATS_CPU_TOTAL = 2
> VIR_DOMAIN_STATS_BALLOON = 4
> VIR_DOMAIN_STATS_VCPU = 8
> VIR_DOMAIN_STATS_INTERFACE = 16
> VIR_DOMAIN_STATS_BLOCK = 32
> VIR_DOMAIN_STATS_PERF = 64
There's nothing more in the newer releases.
>
> Is there a reason memory statistics is not included here?
Yes, nobody implemented it. We often implement features on demand.
> Would it be
> possible to allow querying memory statistics over domainListGetStats as
> well in one operation?
Sure. It should be fairly simple. Mind opening a bug for that so that we
can track the RFE? Also, if you're willing to provide patches please be
my guest. Otherwise we will assign the work internally.
> Currently <nr-of-domains> calls from Python are
> needed to fetch memory statistics for all guests which may be a bit
> costly in larger environments.
Yep, agreed.
Michal
More information about the libvir-list
mailing list