Skip to content

Smartmontools - monitore hdd S.M.A.R.T. values via cron

A teammate at work asked me the question "how do you monitor your smart values from each device" and i could not answer him, since i do not monitor any smart values. A quick research and now i am able to present him a good answer on Monday - even with some time to evaluate it :-D. Smartmontools is the tool you have to choose. On arch, it is done with pacman.

pacman -S smartmontools
A quick look on the official wiki and the arch wiki, i roughly created the following smartd.conf.
/dev/ -H -l error -l selftest -f -n standby,q -m email@for.me
The file can be found at "/etc/smartd.conf". Do not forget to remove/comment out the first "DEVICESCAN". The file is well documented, so it is an easy one (hopefully ;-)). All you have to do is to add the smartd to you autostart (e.g. rc.conf). If you are using systemd, the following line is doing the job.
sudo systemctl enable smartd.service