#!/bin/sh # RAID WatchDog # Avinoam Levkovich. March 2004 MAIL='Admins@My-Domain.com' while : ; do KK=$(grep blocks /proc/mdstat | grep _ ) if [ "x$KK" = "x" ]; then sleep 600 else echo "RAID System is offline, the time is: $(date '+%B.%d.') " |\ mail -s "Houston we have a problem, RAID System is not functioning" $MAIL sleep 600 fi done