hddtemp is a small utility (with daemon) that gives 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.
Install:
apt-get install hddtemp
Configuration:
crontab -e
echo date
,/usr/sbin/hddtemp /dev/sda
>> /root/hddtemp.txt
pico /root/hddtemp.txt
Test
tail -f /root/hddtmep.txt