There's a small but annoying bug in the PNP template of check_mk-mem.linux. For 
the new graph, this bug already has been fixed in commit 
e7dd9aec1e85d8d653f7786a5199e8dea3a43a2b from April 2015. But the problem still 
exists in the old PNP template.

Attached is the fix against the current Git.


I always wondered why our Linux machines seem to use so little RAM. The PNP 
diagram "Active and Inactive Memory" of the Linux Memory check suggests that 
the greater part of RAM is not used at all on most machines.

Now I realized that the diagram is just plain wrong.

The four values Active(anon), Active(files), Inactive(anon) and Inactive(files) 
are partitions of the RAM and therefore should be stacked in the diagram.


The code for the new graph system seems to change the order of the four values. 
I haven't changed this for PNP, since the current order seems to be reasonable 
for me.


Best Regards,
    Gregor Hoffleit


-- 
MediaSupervision Software Consulting GmbH - www.mediasupervision.de
Niederlassung: Carl-Theodor-Str. 5, 68723 Schwetzingen
Tel: +49 (0)6221 705079-22, E-Mail: gregor.hoffl...@mediasupervision.de
Hauptsitz: Georg-Friedrich-Händel-Str. 13, 69214 Eppelheim / Heidelberg
Amtsgericht Mannheim HRB 336821; Geschäftsführer: Reinhard Kratzke
From 1208e8b2d65acb0b949684442a8db08b4751a9e8 Mon Sep 17 00:00:00 2001
From: Gregor Hoffleit <gregor.hoffl...@mediasupervision.de>
Date: Tue, 20 Sep 2016 13:57:53 +0200
Subject: [PATCH] FIX mem.linux: fix missing stack bug in PNP template

The PNP diagram "Active and Inactive Memory" fails to stack up all values.
Was fixed for the new graph in e7dd9aec1e85d8d653f7786a5199e8dea3a43a2b.
---
 pnp-templates/check_mk-mem.linux.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pnp-templates/check_mk-mem.linux.php b/pnp-templates/check_mk-mem.linux.php
index 04c43b2..17e0e83 100644
--- a/pnp-templates/check_mk-mem.linux.php
+++ b/pnp-templates/check_mk-mem.linux.php
@@ -98,7 +98,7 @@ if (isset($mem_defines["active_anon"])) {
     $def[] = ""
             . mem_area("active_anon",      "ff4040", "Active   (anonymous)",   FALSE)
             . mem_area("active_file",      "ff8080", "Active   (files)",       TRUE)
-            . mem_area("inactive_anon",    "377cab", "Inactive (anonymous)",   FALSE)
+            . mem_area("inactive_anon",    "377cab", "Inactive (anonymous)",   TRUE)
             . mem_area("inactive_file",    "4eb0f2", "Inactive (files)",       TRUE)
             ;
 }
-- 
2.1.4

_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

Reply via email to