#This script for hp raid#2010-12-19#MWG###################QUFU=JX2WZ_1DB####################FTP setFTPU='jx2wzrole'FTPP='12345'FTPH='219.239.93.156'TIME=`date +%Y%m%d`PDIR='RAID/'${TIME}IP=`/sbin/ifconfig |grep 'inet addr'|grep -v '192.168.'|grep -v '127.0.0.1'|awk '{print $2}'|awk -F: '{print $2}'`STATUS=`hpacucli ctrl all show config|grep Failed|wc -l`LOGFILENAME=${TIME}_${QUFU}_${IP}[ -d ./log ] || mkdir ./logif [ $STATUS -eq 0 ]thenecho "${TIME}:${QUFU}:${IP}:disk_OK" > './log/'${LOGFILENAME}_disk_OK.log./ncftpput -u$FTPU -p$FTPP -m -R ${FTPH} $PDIR './log/'${LOGFILENAME}_disk_OK.logelseecho "${TIME}:${QUFU}:${IP}:disk_FAIL" > './log/'${LOGFILENAME}_disk_FAIL.log./ncftpput -u$FTPU -p$FTPP -m -R ${FTPH} $PDIR './log/'${LOGFILENAME}_disk_FAIL.logfi