a domain. Only one type of job statistics can be collected at the same time.
Requires libvirt API version I<1.2.9> or later.
+=item B<memory>: report statistics about memory usage details, provided
+by libvirt virDomainMemoryStats() function.
+
=item B<pcpu>: report the physical user/system cpu time consumed by the hypervisor, per-vm.
Requires libvirt API version I<0.9.11> or later.
#endif
ex_stats_disk_allocation = 1 << 10,
ex_stats_disk_capacity = 1 << 11,
- ex_stats_disk_physical = 1 << 12
+ ex_stats_disk_physical = 1 << 12,
+ ex_stats_memory = 1 << 13
};
static unsigned int extra_stats = ex_stats_none;
{"disk_allocation", ex_stats_disk_allocation},
{"disk_capacity", ex_stats_disk_capacity},
{"disk_physical", ex_stats_disk_physical},
+ {"memory", ex_stats_memory},
{NULL, ex_stats_none},
};
memory_submit(domain->ptr, (gauge_t)info.memory * 1024);
GET_STATS(get_vcpu_stats, "vcpu stats", domain->ptr, info.nrVirtCpu);
- GET_STATS(get_memory_stats, "memory stats", domain->ptr);
+ if (extra_stats & ex_stats_memory)
+ GET_STATS(get_memory_stats, "memory stats", domain->ptr);
#ifdef HAVE_PERF_STATS
if (extra_stats & ex_stats_perf)