Module: check_mk
Branch: master
Commit: a5856fa7e1d666a60da1a4b594675d5ed8a3713f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a5856fa7e1d666…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Nov 8 13:09:31 2011 +0100
FIX: ps.perf: sum up memory usage over all processes
---
ChangeLog | 4 ++++
pnp-templates/check_mk-ps.perf.php | 9 +++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 05ffec5..3b20a03 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -44,6 +44,10 @@
one pie dashlet for host/service stats
* FIX: drbd: fixed inventory functions
* FIX: printer_supply: handle output of Brother printers
+ * FIX: ps.perf PNP template: show memory usage per process and not
+ summed up. This is needed in situations where one process forks itself
+ in irregular intervals and rates but you are interested just in the
+ memory usage of the main process.
Multisite:
* FIX: finally fixed long-wanted "NagStaMon create hundreds
diff --git a/pnp-templates/check_mk-ps.perf.php b/pnp-templates/check_mk-ps.perf.php
index 3b468f8..a1b841e 100644
--- a/pnp-templates/check_mk-ps.perf.php
+++ b/pnp-templates/check_mk-ps.perf.php
@@ -40,11 +40,12 @@ $def[1] .= "HRULE:$WARN[1]#FFFF00:\"Warning at
$WARN[1]\" ";
$def[1] .= "HRULE:$CRIT[1]#FF0000:\"Critical at $CRIT[1]\" ";
if (isset($DS[2])) {
- $opt[2] = " --vertical-label \"MB\" -l 0 --title \"Memory
Usage\" ";
- $def[2] = "DEF:vsz=$RRDFILE[2]:$DS[2]:MAX ";
+ $opt[2] = " --vertical-label \"MB\" -l 0 --title \"Memory Usage per
process\" ";
+ $def[2] = "DEF:count=$RRDFILE[1]:$DS[1]:MAX ";
+ $def[2] .= "DEF:vsz=$RRDFILE[2]:$DS[2]:MAX ";
$def[2] .= "DEF:rss=$RRDFILE[3]:$DS[3]:MAX ";
- $def[2] .= "CDEF:vszmb=vsz,1024,/ ";
- $def[2] .= "CDEF:rssmb=rss,1024,/ ";
+ $def[2] .= "CDEF:vszmb=vsz,1024,/,count,/ ";
+ $def[2] .= "CDEF:rssmb=rss,1024,/,count,/ ";
$def[2] .= "AREA:vszmb#90a0f0:\"Virtual size \" ";
$def[2] .= "GPRINT:vszmb:LAST:\"Current\: %5.1lf MB\" ";
$def[2] .= "GPRINT:vszmb:MIN:\"Min\: %5.1lf MB\" ";