Module: check_mk
Branch: master
Commit: 22cfdd60676598531f569a07c8f9304814a6dee4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=22cfdd60676598…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Jan 19 18:18:56 2015 +0100
mem.linux: fix PNP template for kernels without commit limit
---
pnp-templates/check_mk-mem.linux.php | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/pnp-templates/check_mk-mem.linux.php b/pnp-templates/check_mk-mem.linux.php
index 9bae6f4..e6e51ee 100644
--- a/pnp-templates/check_mk-mem.linux.php
+++ b/pnp-templates/check_mk-mem.linux.php
@@ -118,12 +118,14 @@ $def[] = ""
;
# 6. Committing
-$opt[] = $defopt . "--title \"Memory committing\"";
-$def[] = ""
- . mem_area("total_total", "f0f0f0", "Total virtual
memory", FALSE)
- . mem_area("committed_as", "40a080", "Committed
memory", FALSE)
- . mem_area("commit_limit", "e0e0e0", "Commit
limit", TRUE)
- ;
+if (isset($mem_defines["commit_limit"])) {
+ $opt[] = $defopt . "--title \"Memory committing\"";
+ $def[] = ""
+ . mem_area("total_total", "f0f0f0", "Total virtual
memory", FALSE)
+ . mem_area("committed_as", "40a080", "Committed
memory", FALSE)
+ . mem_area("commit_limit", "e0e0e0", "Commit
limit", TRUE)
+ ;
+}
# 7. Shared memory
if (isset($mem_defines["shmem"])) {