[libvirt] libvirt domain memory statistics

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 Is there a reason memory statistics is not included here? Would it be possible to allow querying memory statistics over domainListGetStats as well in one operation? 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. Thanks, -- Marko Myllynen

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

Hi, On 2017-09-06 14:42, Michal Privoznik wrote:
On 09/06/2017 01:09 PM, Marko Myllynen wrote:
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.
Ok, I filed: https://bugzilla.redhat.com/show_bug.cgi?id=1488895 FWIW, this would be for the PCP libvirt agent (PMDA): https://github.com/performancecopilot/pcp/blob/master/src/pmdas/libvirt/pmda... Thanks, -- Marko Myllynen
participants (2)
-
Marko Myllynen
-
Michal Privoznik