Module: check_mk
Branch: master
Commit: 52276803ae44f7c7b903bd28df24dffab05a95c1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=52276803ae44f7…
Author: Ronny Bruska <rb(a)mathias-kettner.de>
Date: Fri Mar 8 09:27:19 2019 +0100
7198 FIX Solaris Agent: fixed wrong path for top command
The agent tried to use /usr/local/top instead of /usr/local/bin/top.
This has been fixed.
Change-Id: I9ae909a9efefc4feec1d755258242323579ffc84
---
.werks/7198 | 12 ++++++++++++
agents/check_mk_agent.solaris | 4 ++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.werks/7198 b/.werks/7198
new file mode 100644
index 0000000..03d2e40
--- /dev/null
+++ b/.werks/7198
@@ -0,0 +1,12 @@
+Title: Solaris Agent: fixed wrong path for top command
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1552033417
+Class: fix
+
+The agent tried to use /usr/local/top instead of /usr/local/bin/top.
+This has been fixed.
+
diff --git a/agents/check_mk_agent.solaris b/agents/check_mk_agent.solaris
index 38dfa3d..e9ce799 100755
--- a/agents/check_mk_agent.solaris
+++ b/agents/check_mk_agent.solaris
@@ -320,11 +320,11 @@ fi
# <<<solaris_mem>>> should be used if statgrab is missing and top is
available.
if ! type statgrab &>/dev/null;
then
- if [ -x /usr/bin/top ] || [ -x /usr/local/top ]
+ if [ -x /usr/bin/top ] || [ -x /usr/local/bin/top ]
then
echo "<<<solaris_mem>>>"
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
+ if [ -x /usr/local/bin/top ]; then /usr/local/bin/top | grep '^Memory:';
fi
fi
fi