author | Marc Fournier <marc.fournier@camptocamp.com> | |
Fri, 12 Dec 2014 22:13:15 +0000 (23:13 +0100) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Fri, 12 Dec 2014 22:13:15 +0000 (23:13 +0100) |
Conflicts:
src/libvirt.c
src/libvirt.c
1 | 2 | |||
---|---|---|---|---|
src/libvirt.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc src/libvirt.c
index cfabaaa235d6efe81da7896e4c51185d6afa08a3,4ab8bd5c1503e872cef86e168ceabd7e1abffb31..87b71e698b93c894a3c4cdabde0e218144ed083d
--- 1/src/libvirt.c
--- 2/src/libvirt.c
+++ b/src/libvirt.c
continue;
}
- cpu_submit (info.cpuTime, t, domains[i], "virt_cpu_total");
+ if (info.state != VIR_DOMAIN_RUNNING)
+ {
+ /* only gather stats for running domains */
+ continue;
+ }
+
+ cpu_submit (info.cpuTime, domains[i], "virt_cpu_total");
+ memory_submit ((gauge_t) info.memory * 1024, domains[i]);
vinfo = malloc (info.nrVirtCpu * sizeof (vinfo[0]));
if (vinfo == NULL) {