Module: check_mk
Branch: master
Commit: 491e3aef67746d6d3282d09c7d1a6fd802bd24ca
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=491e3aef67746d…
Author: Florian Heigl <fh(a)mathias-kettner.de>
Date: Thu May 17 12:10:54 2012 +0200
HP-UX Agent: plugin for checking HBA states
---
agents/hpux/hpux_hbahealth | 35 +++++++++++++++++++++++++++++++++++
1 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/agents/hpux/hpux_hbahealth b/agents/hpux/hpux_hbahealth
new file mode 100755
index 0000000..b6edd33
--- /dev/null
+++ b/agents/hpux/hpux_hbahealth
@@ -0,0 +1,35 @@
+#!/usr/bin/ksh
+
+# removed all non relevant output
+
+
+# Warning on
+# Driver-Firmware Dump Available = NO
+
+
+# CRIT on
+# Driver state = ONLINE
+# Topology = PTTOPT_FABRIC
+
+
+# Just Print
+# ISP Code version = 5.4.4
+# N_Port Node World Wide Name = 0x50014380120baf51
+# Hardware Path is = 0/0/0/5/0/0/0
+
+# There might be different hbas in the system.
+# add your code if you need that. remember to use the right "util" for the
type.
+
+hbas=$( ls /dev/fcd* )
+if [ $? = 0 ]; then
+ echo '<<<hpux_hbahealth>>>'
+else
+ exit 0
+fi
+
+for hba in /dev/fcd* ; do
+ util=/opt/fcms/bin/fcdutil
+ echo "$hba"
+ $util $hba | grep -e "Driver state" -e "Topology" -e "Dump
Available"\
+ -e "Code version" -e "Hardware Path" -e "Port
World"
+done