Module: check_mk
Branch: master
Commit: f0a1896580f030984ca594d747de41dfc30a8fee
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f0a1896580f030…
Author: Florian Heigl <fh(a)mathias-kettner.de>
Date: Tue May 29 17:24:50 2012 +0200
Solaris Agent: Add multipath support for Sol10
---
agents/check_mk_agent.solaris | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/agents/check_mk_agent.solaris b/agents/check_mk_agent.solaris
index 0ae2553..a1be577 100755
--- a/agents/check_mk_agent.solaris
+++ b/agents/check_mk_agent.solaris
@@ -109,13 +109,24 @@ fi
# This will only work on Sol10 and above
if `svcs |grep ntp > /dev/null`; then
echo '<<<ntp>>>'
- xntpdc -p | sed -e 1,2d -e 's/^\(.\)/\1 /' -e 's/^ /%/'
+ # use ntpq instead, xntpdc gives less info.
+ #xntpdc -p | sed -e 1,2d -e 's/^\(.\)/\1 /' -e 's/^ /%/'
+ ntpq -p | sed -e 1,2d -e 's/^\(.\)/\1 /' -e 's/^ /%/'
+
+
fi
# TCP Connection stats
echo '<<<tcp_conn_stats>>>'
netstat -nafinet -P tcp | tail +5 | awk '{ c[$7]++; } END { for (x in c) { print x,
c[x];}}'
+
+# Multipathing on Solaris10+
+if type mpathadm >/dev/null 2>&1 ; then
+ mpathadm list LU | awk '{if(NR%3==1){dev=$1}if(NR%3==2){tc=$NF}if(NR%3==2){printf
"%s %s %s\n",dev,tc,$NF}}'
+fi
+
+
if cd $PLUGINSDIR 2>/dev/null
then
for skript in `ls`