Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just discovered this great post:

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:

[ $(grep -c "hardware error" /var/log/mcelog) -gt 0 ] && echo "Hardware Error Found On $(hostname) @ $(date)" | ssmtp

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
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 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

Your Answer


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.