Spread the love

HDDTemp is a small Linux utility (with daemon), that gives information about the hard drive temperature via S.M.A.R.T. (for drives supporting this feature).
In this article we are going to create a txt file and in it we are going to store the HDD temperature for every hour.

blog-hddtemp-sensors | lateweb.info

How to install HDDTemp?

# Install in Ubuntu sudo apt-get install hddtemp # Install in Open Suse sudo zypper install hddtemp # Install in CentOS / RHEL / SL / Oracle Linux sudo yum install hddtemp # Install in Arch Linux sudo pacman -S hddtemp # Install in Fedora sudo dnf install hddtemp # Install in FreeBSD pkg install hddtemp
Code language: Bash (bash)

How to configure the crontab?

First type in the terminal crontab -e

# Start crontab crontab -e
Code language: PHP (php)

Now in the crontab insert the following code

# Add hdd temp every hour * * * * * echo `date`,`/usr/sbin/hddtemp /dev/sda` >> /root/hddtemp.txt
Code language: PHP (php)

We have to create a file hddtemp.txt in any folder that we want in this case it’s the root folder and make it writable

# Touch and make executable file touch /root/hddtemp.txt chmod 777 /root/hddtemp.txt
Code language: PHP (php)

You can check the temp via cat ot tail or vi or nano 🙂

# Check temp pico /root/hddtemp.txt cat /root/hddtemp.txt tail /root/hddtemp.txt
Code language: PHP (php)


In this article we have created a super simple cron job and we have exported it into a file which will check every hour our HDD temperature.. If you know other good apps, please tell us in the comments bellow.

We hope you enjoyed this article. if that is so please rate this page with the stars bellow and subscribe to our YouTube channel or follow us on twiter.

Leave a Reply