source: npl/overig/cciss_vol_status/syn3-ccisscheck @ 072d3d5

gcc484perl-5.22
Last change on this file since 072d3d5 was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 632 bytes
RevLine 
[c5c522c]1#!/bin/bash
2#(C)2007 DatuX. All rights reserved.
3
4STAT=/tmp/areca.$$
5
6cciss_vol_status /dev/cciss/c?d? /dev/sg? > $STAT 2>/dev/null
7
8#geen controller?
9if [ "`cat $STAT`" == "" ]; then
10    rm $STAT
11    syn3-state 'raid-cciss' DELETE
12    exit 0   
13fi
14
15#is er IETS niet OK?
16if grep -v OK $STAT >/dev/null; then
17        #iets anders dan recovery of OK?
18        if egrep -v 'OK|recovering' $STAT >/dev/null; then
19                syn3-state 'raid-cciss' ALERT "Trouble with raid array: `cat $STAT`"
20        else
21                syn3-state 'raid-cciss' CAUTION "Raid array is rebuilding: `cat $STAT`"
22        fi
23else
24        syn3-state 'raid-cciss' OK "Raid array is online: `cat $STAT`"
25fi
26
27rm $STAT
Note: See TracBrowser for help on using the repository browser.