Monitoring disks and power supplies and fans and such...
spam at linuxdsl.co.uk
Wed May 26 19:24:00 CDT 2004
Ben Russo wrote:
> On the old Dell PE 2550 and 2650 I used afacli in a script to check the
> status of the disks and the raid containers every few hours. It would
> generate a syslog message and an e-mail message if there was a problem.
> Is there a way to do the same thing on the new Megaraid2 controllers?
> Whatabout checking the Power Supply and FAN status's?
> I did install the OMSA stuff, but sheesh it starts about 40 threads for
> about 5 or 6 different processes... I just want to make sure the box is
> OK every 6-12 hours or so. I really don't want to have to use SNMP to
> do it.
I posted a while back asking the same question about MegaRaid and some
kind people replied with this script. Just set cron to run it once an
hour and it will email you if any of the logical drives report their
status as anything other than "optimal".
# Check RAID status and email if sub-optimal
EMAIL="root at localhost"
RAIDSTATUS=`cat /proc/megaraid/hba0/raiddrives-0-9 |grep "Logical drive"
|grep -v "state: optimal"`
if [ ! "$RAIDSTATUS" = "" ]; then
echo -en $RAIDSTATUS | /usr/bin/mail -s "RAID Warning" $EMAIL
I'm not sure how to get fan/power info without SNMP - if you find out
please let me know.
More information about the Linux-PowerEdge