Install library's
sudo apt install hddtemp lm-sensors
Detect sensors
sudo sensors-detect
Then this is the one line script, that you should execute as root: sudo -i
while [ true ]; do date | tee -a /var/log/hddtemp.log;
hddtemp /dev/sda /dev/sdb /dev/sdc /dev/sdd | tee -a
/var/log/hddtemp.log; date | tee -a
/var/log/cputemp.log; sensors | tee -a
/var/log/cputemp.log; sleep 2; done