pcp
[Top] [All Lists]

pmrep: improve vmstat example

To: pcp developers <pcp@xxxxxxxxxxx>
Subject: pmrep: improve vmstat example
From: Marko Myllynen <myllynen@xxxxxxxxxx>
Date: Sun, 13 Dec 2015 17:42:17 +0200
Cc: Mark Goodwin <mgoodwin@xxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
Organization: Red Hat
Reply-to: myllynen@xxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0
Hi,

Mark showed how to get real percentages for different CPU usage
categories, let's update the pmrep's vmstat example accordingly.

---
 src/pmrep/TODO       |  3 ++-
 src/pmrep/pmrep.conf | 30 +++++++++++++++++++++---------
 2 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/src/pmrep/TODO b/src/pmrep/TODO
index c957d76..cc3d91f 100644
--- a/src/pmrep/TODO
+++ b/src/pmrep/TODO
@@ -22,8 +22,9 @@
 -  copy metric set spec support (?)
 -  includedir config file support (?)
 -  generalised daemon startup support (?)
--  provide percentage metrics (e.g. CPU/:vmstat) (?)
 -  add option to prevent truncating string output (?)
+-  generalized zabbix_interval (limit writes to archive) (?)
+-  support for multiple output targets (e.g. archive+stdout) (?)
 -  optionally ignore incompatible/unsupported metrics rather than abort [-I] 
(?)
 
 -----
diff --git a/src/pmrep/pmrep.conf b/src/pmrep/pmrep.conf
index ddcdb51..d9febc0 100644
--- a/src/pmrep/pmrep.conf
+++ b/src/pmrep/pmrep.conf
@@ -72,7 +72,6 @@ pswpout.width = 10
 
 # vmstat example
 [vmstat]
-derived=mem.util.allcache=mem.util.cached+mem.util.slab,kernel.all.cpu.alluser=kernel.all.cpu.user+kernel.all.cpu.nice
 header = yes
 unitinfo = no
 globals = no
@@ -86,18 +85,31 @@ proc.runq.blocked = b,,,,
 swap.used = swpd,,,,
 mem.util.free = free,,,,8
 mem.util.bufmem = buff,,,,8
-mem.util.allcache = cache,,,,8
+allcache = mem.util.allcache
+allcache.label = cache
+allcache.formula = mem.util.cached + mem.util.slab
+allcache.width = 8
 swap.pagesin = si,,,,
 swap.pagesout = so,,,,
-mem.vmstat.pgpgin = bi,,,,4
-mem.vmstat.pgpgout = bo,,,,4
+mem.vmstat.pgpgin = bi,,,,6
+mem.vmstat.pgpgout = bo,,,,6
 kernel.all.intr = in,,,,6
 kernel.all.pswitch = cs,,,,6
-kernel.all.cpu.alluser = us,,ms,,
-kernel.all.cpu.sys = sy,,,,
-kernel.all.cpu.idle = id,,ms,,
-kernel.all.cpu.wait.total = wa,,,,
-kernel.all.cpu.steal = st,,,,
+alluser = kernel.all.cpu.alluserp
+alluser.formula = 100 * (kernel.all.cpu.user + kernel.all.cpu.nice) / hinv.ncpu
+alluser.label = us
+sys = kernel.all.cpu.sysp
+sys.label = sy
+sys.formula = 100 * kernel.all.cpu.sys / hinv.ncpu
+idle = kernel.all.cpu.idlep
+idle.label = id
+idle.formula = 100 * kernel.all.cpu.idle / hinv.ncpu
+wtotal = kernel.all.cpu.wait.totalp
+wtotal.label =  wa
+wtotal.formula = 100 * kernel.all.cpu.wait.total / hinv.ncpu
+steal = kernel.all.cpu.stealp
+steal.label = st
+steal.formula = 100 * kernel.all.cpu.steal / hinv.ncpu
 
 # An example metric set
 [example-1]

Thanks,

-- 
Marko Myllynen

<Prev in Thread] Current Thread [Next in Thread>