Module: check_mk
Branch: master
Commit: b7239b8a4eca0c52e4843ae68c1295963d721dfa
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b7239b8a4eca0c…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Thu Jun 8 14:40:57 2017 +0200
4794 FIX check_mk_agent.solaris: Now considers top in /usr/bin/ and /usr/local/bin/
Change-Id: Ia111c6ec112a547a77340899a96612170940f367
---
.werks/4794 | 10 ++++++++++
agents/check_mk_agent.solaris | 7 ++++---
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/.werks/4794 b/.werks/4794
new file mode 100644
index 0000000..1a62785
--- /dev/null
+++ b/.werks/4794
@@ -0,0 +1,10 @@
+Title: check_mk_agent.solaris: Now considers top in /usr/bin/ and /usr/local/bin/
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1496925621
+Class: fix
+
+
diff --git a/agents/check_mk_agent.solaris b/agents/check_mk_agent.solaris
index c10e3b1..a801c3f 100755
--- a/agents/check_mk_agent.solaris
+++ b/agents/check_mk_agent.solaris
@@ -266,7 +266,7 @@ then
# the <<<statgrab_mem>>> info is already provided by
<<<solaris_mem>>>
# However, we make an exception if /usr/bin/top is missing (required by solaris_mem)
- if [ ! -x /usr/bin/top ]
+ if [ ! -x /usr/bin/top ] && [ ! -x /usr/local/bin/top ]
then
echo '<<<statgrab_mem>>>'
egrep "^(swap|mem)\." /tmp/statgrab.$$ | sed 's/ *= */ /'
@@ -311,10 +311,11 @@ fi
# Memory
-if [ -x /usr/bin/top ]
+if [ -x /usr/bin/top ] || [ -x /usr/local/top ]
then
echo "<<<solaris_mem>>>"
- /usr/bin/top | grep '^Memory:'
+ if [ -x /usr/bin/top ]; then /usr/bin/top | grep '^Memory:'; fi
+ if [ -x /usr/local/bin/top ]; then /usr/bin/top | grep '^Memory:'; fi
fi
if type prtdiag >/dev/null 2>&1