Module: check_mk
Branch: master
Commit: fef7a22dce083f69d032d327ec87f1dd5d2ed776
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fef7a22dce083f…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Thu Feb 23 15:53:36 2017 +0100
4438 FIX statgrab_mem: Fixed wrong calculation of swap
In the past there has been a bug in statgrab which led into a wrong calculation
of swap. This bug is solved in statgrab since version 0.14. If you have
problems consider updating your statgrab.
Change-Id: Ieb5525de62276e363b8baf240c5adcd8cc39bc9d
---
.werks/4438 | 12 ++++++++++++
checks/statgrab_mem | 4 ++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.werks/4438 b/.werks/4438
new file mode 100644
index 0000000..4b60ceb
--- /dev/null
+++ b/.werks/4438
@@ -0,0 +1,12 @@
+Title: statgrab_mem: Fixed wrong calculation of swap
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1487861468
+Class: fix
+
+In the past there has been a bug in statgrab which led into a wrong calculation
+of swap. This bug is solved in statgrab since version 0.14. If you have
+problems consider updating your statgrab.
diff --git a/checks/statgrab_mem b/checks/statgrab_mem
index 6526812..e171359 100644
--- a/checks/statgrab_mem
+++ b/checks/statgrab_mem
@@ -30,8 +30,8 @@ def parse_statgrab_mem(info):
for var, value in info:
if var == 'mem.used': memused_kb = int(value) / 1024
elif var == 'mem.total': totalmem_kb = int(value) / 1024
- elif var == 'swap.used': swapused_kb = int(value) / 1024 / 4 # BUG in
statgrab und Solaris?
- elif var == 'swap.total': totalswap_kb = int(value) / 1024 / 4
+ elif var == 'swap.used': swapused_kb = int(value) / 1024
+ elif var == 'swap.total': totalswap_kb = int(value) / 1024
elif var == 'mem.cache': caches_kb = int(value) / 1024
return {