Monitor Hard Disk Temperature in Ubuntu/Debian1 min read

**Required Software**

Then, we’ll create a simple script.

Paste this in…

*Press ctrl+x, then y to save and quit nano* This script will find all hard drives connected via SATA, and if SMART monitoring is enabled on them, will check the temperature and shut the system down if it’s above the temperature threshold of 55°C. *Note: This script will not work as is with IDE disks, or disks in a hardware RAID array* Next, we need to make the script executable.

And add it to your root cronjob

Your cron entry should look like this.

The above will set the script to run every 15 minutes.

Zack

Zack

I love learning new things and trying out the latest technology.

You may also like...

2 Responses

  1. kiwijunglist says:

    Doesn’t this script wake all the HDDs up every 15 minutes?

    Don’t you need to use -n standby or -n idle

    • Zack Zack says:

      Yes, this script will wake up disks every 15 minutes without the standby option. As an FYI, I don’t bother with monitoring my hard drive temps with this script.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.