I just discovered this great post: http://www.cyberciti.biz/tips/linux-server-predicting-hardware-failure.html
and have been wondering how frequently is typical to check for failed/failing hardware? I'd like to as early as possible if something goes out but also don't want to suck up all the computation power of the machine just to have the machine check itself. I have a modified version of the suggested line in a shell script, CheckHardware.zsh that I want to add as a cronjob:
#!/bin/zsh [ $(grep -c "hardware error" /var/log/mcelog) -gt 0 ] && echo "Hardware Error Found On $(hostname) @ $(date)" | ssmtp email@example.com
I was also unclear if the command line utility (mcelog) had to be run as a cronjob very frequently as well? That is, do I have to have two cronjobs? run mcelog and then check the mcelog file for any contents with "hardware error"?
Thank you in advance for any help you might be able to offer.