¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 56°Ç
   
3ware RAID Monitoring [SMS]
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2011-08-10 (¼ö) 14:32 Á¶È¸ : 6442
±ÛÁÖ¼Ò :
                          

#!/bin/bash
DATE=`date +%Y-%m%d-%H%M`
SMS_DATE=`date +%Y%m%d%H%M%S`
SMS_QUERY="xxxxxxxxxxxxxxxxxxxxx"
RAID_CHECK=`/usr/local/bin/tw_cli info |/bin/awk '{print $1}' |/bin/grep  -w "c[0-9]" |while read a; do /usr/local/bin/tw_cli info $a ;done   |/bin/egrep -v -i '\--|OK|RAID|Port|Unit' |/bin/sed '/^[[:space:]]*$/d' |/bin/awk '{print "Port:"$1, " Status:"$2, $4, $5, " Serial:"$7}'`
SMS_MSG="RAID ERROR [`/bin/hostname`] ${RAID_CHECK}"

if [ -z "${RAID_CHECK}" ]; then
exit;
else
echo "${DATE} RAID ERROR ${SMS_MSG}" >> /var/log/raid_check.log
echo "${SMS_MSG}"
echo "¹®ÀÚ¹ß¼Û Äõ¸®"
fi

À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.