If you are running a 3Ware Hardware Raid on your Linux box - and you would like a daily report of the RAID status, you can use this script.

Code:
# 3Ware CLI RAID Report
# You will need the tw_cli file which you can download free
# from www.3ware.com - save tw_cli in your /sbin directory
#
# Edit this script and place in your /etc/cron.daily directory.
# Call it "raidhealth"
# Save and quit. chmod 755 this file
#
# File is free for use by all but comes as is with no warranty
#

##################################
# variables that you need to set #
##################################

email='you@yourdomain.com' # email where the reports are sent

##################################
# do not edit below #
##################################

hostname=`/bin/hostname`

# pipe output from the 3Ware CLI to a text file
/sbin/tw_cli info c0 > /tmp/raidhealth.txt
echo "" >> /tmp/raidhealth.txt
echo "" >> /tmp/raidhealth.txt
/sbin/tw_cli alarms > /tmp/raidalarms.txt

# combine that text to one file for reporting
cat /tmp/raidhealth.txt /tmp/raidalarms.txt > /tmp/raidreport.txt

# send me a copy of that output via email
mail $email -s"3Ware RAID health report for $hostname" < /tmp/raidreport.txt

# now clean up the text files we made
rm -rf /tmp/raidhealth.txt
rm -rf /tmp/raidalarms.txt
rm -rf /tmp/raidreport.txt