Module: check_mk
Branch: master
Commit: 4cf904b9a341bea332b5be24b78e2b7e78d1b752
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4cf904b9a341be…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Feb 17 16:07:34 2016 +0100
#3189 FIX mem.vmalloc: newer kernel versions (64bit) report wrong data, i.d. both
VmallocUsed and Chunk equal zero, thus this check is obsolete
---
.werks/3189 | 10 ++++++++++
ChangeLog | 1 +
checks/mem | 18 ++++++++++++------
3 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/.werks/3189 b/.werks/3189
new file mode 100644
index 0000000..3aff3c1
--- /dev/null
+++ b/.werks/3189
@@ -0,0 +1,10 @@
+Title: mem.vmalloc: newer kernel versions (64bit) report wrong data, i.d. both
VmallocUsed and Chunk equal zero, thus this check is obsolete
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1455721502
+
+
diff --git a/ChangeLog b/ChangeLog
index 66dd375..4bdaeb1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -30,6 +30,7 @@
* 2993 FIX: zfs_arc_cache: fixed crash, no longer reports unknown if not all data is
available...
* 3188 FIX: ps.include: fixed typo
* 3226 FIX: isc_dhcpd: Fixed exception during discovery when pools can not be
gathered by agent
+ * 3189 FIX: mem.vmalloc: newer kernel versions (64bit) report wrong data, i.d. both
VmallocUsed and Chunk equal zero, thus this check is obsolete
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/checks/mem b/checks/mem
index 43c9b80..e9cfb44 100644
--- a/checks/mem
+++ b/checks/mem
@@ -326,11 +326,14 @@ def check_mem_linux(_no_item, params, info):
if r[0]:
yield r # only display if non-OK
- # VMalloc
- r = check_mem_levels("Largest Free VMalloc Chunk",
meminfo["VmallocTotal"] - meminfo["VmallocChunk"],
- meminfo["VmallocTotal"], params.get("levels_vmalloc"),
of_what = "VMalloc Area", show_free=True)
- if r[0]:
- yield r # only display if non-OK
+ # VMalloc,
+ # newer kernel version report wrong data,
+ # i.d. both VmallocUsed and Chunk equal zero
+ if not (meminfo["VmallocUsed"] == 0 and meminfo["VmallocChunk"]
== 0):
+ r = check_mem_levels("Largest Free VMalloc Chunk",
meminfo["VmallocTotal"] - meminfo["VmallocChunk"],
+ meminfo["VmallocTotal"],
params.get("levels_vmalloc"), of_what = "VMalloc Area",
show_free=True)
+ if r[0]:
+ yield r # only display if non-OK
# HardwareCorrupted
hwc = meminfo.get("HardwareCorrupted")
@@ -543,7 +546,10 @@ def inventory_mem_vmalloc(info):
if is_linux_meminfo(meminfo):
return # handled by new Linux memory check
- if "VmallocTotal" in meminfo:
+ # newer kernel version report wrong data,
+ # i.d. both VmallocUsed and Chunk equal zero
+ if "VmallocTotal" in meminfo and \
+ not (meminfo["VmallocUsed"] == 0 and meminfo["VmallocChunk"]
== 0):
# Do not checks this on 64 Bit systems. They have almost
# infinitive vmalloc
vmalloc = meminfo["VmallocTotal"] / 1024.4