Hi,
fix the code to match the man page (identifier is not used for anything
except for binding the metrics and specifications together).
A metric specification of "allcache = mem.util.allcache" will now have
mem.util.allcache as default label instead of allcache, this matches
much better with compact form definition and is what the man page says.
Few minor example config tweaks while at it.
---
src/pmrep/pmrep.conf.5 | 3 ++-
src/pmrep/pmrep.py | 4 ----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/pmrep/pmrep.conf.5 b/src/pmrep/pmrep.conf.5
index c1eaa35..3a0b936 100644
--- a/src/pmrep/pmrep.conf.5
+++ b/src/pmrep/pmrep.conf.5
@@ -430,7 +430,7 @@ repeat_header = 20
space_scale = MB
[global]
-kernel.all.sysfork = fork/s,,,,8
+kernel.all.sysfork = forks,,,,8
allcache = mem.util.allcache
allcache.formula = mem.util.bufmem + mem.util.cached + mem.util.slab
@@ -448,6 +448,7 @@ unitinfo = no
globals = no
timestamp = yes
interval = 1s
+extheader = no
precision = 2
sysfork = kernel.all.sysfork
sysfork.label = proc/s
diff --git a/src/pmrep/pmrep.py b/src/pmrep/pmrep.py
index 3437370..2b2de05 100644
--- a/src/pmrep/pmrep.py
+++ b/src/pmrep/pmrep.py
@@ -478,8 +478,6 @@ class PMReporter(object):
for metric in parsemet:
name = parsemet[metric][:1][0]
globmet[name] = parsemet[metric][1:]
- if globmet[name][0] == None:
- globmet[name][0] = metric
# Add command line and configuration file metric sets
tempmet = OrderedDict()
@@ -504,8 +502,6 @@ class PMReporter(object):
for metric in parsemet:
name = parsemet[metric][:1][0]
confmet[name] = parsemet[metric][1:]
- if confmet[name][0] == None:
- confmet[name][0] = metric
tempmet[spec] = confmet
else:
raise IOError("Metric set definition '%s' not found." %
metric)
Thanks,
--
Marko Myllynen
|