Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 administrator@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.

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

I think much better than checking in some interval is getting alerted if something breaks.

One popular tool for this is for example http://nagios.org/ and if you google there are many more.

These tools can send you email alerts when there is something wrong. So you could for example use the script that you posted and with some little modification integrate it to nagios to make nagios alert you if the script detects a problem.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.