Hardware monitoring scripts

Adaptec RAID under Linux

Intel MatrixRAID under FreeBSD

/usr/local/etc/periodic/daily/ataraid-check:


#!/bin/sh

cd /dev
for n in ar?; do
    test "$n" = 'ar?' && exit  # ..no ATA RAID
    atacontrol status $n | egrep -qv '(READY|ONLINE|subdisks:)' || continue
    atacontrol status $n | mail -s 'ATA RAID Warning' root@localhost
    atacontrol status $n | logger -p local0.crit -t RAIDCheck -s
done


Last edited at 09-July-2012. Enjoy! :-)