Module: check_mk
Branch: master
Commit: 088cc6d3b90d18d27e80a324ca4c976ed3f9563e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=088cc6d3b90d18…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu May 12 08:48:09 2016 +0200
Fixed ucb ps regex to make it work with solaris grep
---
agents/check_mk_agent.solaris | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/agents/check_mk_agent.solaris b/agents/check_mk_agent.solaris
index 721b611..efd53c3 100755
--- a/agents/check_mk_agent.solaris
+++ b/agents/check_mk_agent.solaris
@@ -201,7 +201,7 @@ if [ -x /usr/ucb/ps ]; then
STATS=${LINE%) *}
PID=${STATS##*,}
- CMD=$(echo "$UCB_PS" | grep "^\s*$PID " | head -n1 | \
+ CMD=$(echo "$UCB_PS" | grep "^[ ]*$PID " | head -n1 | \
awk '{ s = ""; for (i = 5; i <= NF; i++) s = s $i "
"; print s }')
# Only use the ucb ps line when it's not empty (process might already been
gone) and the
# ps line is long enough the be potentially stripped.