aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido G√ľnther <agx@sigxcpu.org>2008-10-31 11:30:28 +0100
committerGuido Guenther <agx@sigxcpu.org>2008-10-31 12:15:24 +0100
commit848b4fbd2590fdb85602f940bc179c66a7e25a31 (patch)
tree7b2f9c0db06689180b6b41ed696cbc04b68f4152
parent14b10dec02c4319f1e15d845966b0554f3accccd (diff)
exclude Dom0 from cputime graph
it's only confusing compared to other hypervisors
-rw-r--r--libvirt-cputime4
1 files changed, 4 insertions, 0 deletions
diff --git a/libvirt-cputime b/libvirt-cputime
index 6693602..9684cdc 100644
--- a/libvirt-cputime
+++ b/libvirt-cputime
@@ -46,6 +46,8 @@ total_pc.critical 95"""
except libvirt.libvirtError, err:
print >>sys.stderr, "Id: %s: %s" % (id, err)
continue
+ if name == "Domain-0":
+ continue
print "%s_cputime.label %s" % (canon(name), name)
print "%s_cputime.type DERIVE" % canon(name)
print "%s_cputime.min 0" % canon(name)
@@ -66,6 +68,8 @@ def fetch_values(uri):
except libvirt.libvirtError, err:
print >>sys.stderr, "Id: %s: %s" % (id, err)
continue
+ if name == "Domain-0":
+ continue
cputime = float(dom.info()[4])
cputime_percentage = 1.0e-7 * cputime / processors
total += cputime_percentage