File to put in /etc/cron.daily to check the status of a card LSI MegaSAS 9260.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Check LSI MegaSAS 9260 status | |
# | |
# Global | |
STATUS1=`megacli -AdpAllInfo -aALL -NoLog | egrep '(Degraded|Failed)' | grep -v ' 0' | grep -v ': No'`; | |
if [ "x$STATUS1" != "x" ]; then | |
megacli -AdpAllInfo -aAll | mail -s "[sol-mtp-virt1] Panne RAID" root | |
fi | |
# Physical | |
STATUS2=`megacli -PDList -aALL | egrep '(Error Count)' | grep -v ' 0'`; | |
if [ "x$STATUS2" != "x" ]; then | |
megacli -PDList -aALL | mail -s "[sol-mtp-virt1] Panne RAID" root | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment