| Category: | sysadmin utilities |
| Author/Contact Info | Artem Litvinovich |
| Description: | raidwatch README. Author: Artem Litvinovich Raidwatch should be run as a cron job. It monitors the /proc/mdstat file for the status of your software raid array. The specified contact is notified if a problem occurs with one or more disks in the array. |
#!/bin/sh # RaidWatch utility by Artem Litvinovich RAID_ADMIN="admin@yourdomain.com" RAID_HOST=`/bin/hostname` CUR_DATE=`/bin/date +\%Y.\%m.\%d-\%H:\%M` test -n "`perl -ne '/ \[(\d)\/(\d)\] / && $2 ne $1 && print "X";' /pro +c/mdstat`" && \ /bin/mail -s "RAID disk failure on $RAID_HOST ($CUR_DATE)" $RAID_ADMIN + < /proc/mdstat |
|
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: raid array checker (mdstat)
by Aristotle (Chancellor) on Mar 01, 2003 at 15:45 UTC |