Read SMART signals from hard drives in Linux
Q Would you be able to suggest a couple of programs that read the S.M.A.R.T. signals from hard drives? Keeping an eye on hard drive health is a good thing. I run FreeBSD, so the ability to run natively would be nice, but as you know FreeBSD is able to run most Linux programs directly.
A The programs that you are looking for are in the smartmontools suite, and the instructions provided here for their operation apply to LInux as well as FreeBSD. The source is available from http://smartmontools.sourceforge.net and compiles on FreeBSD as well as Linux. The two programs are smartctl and smartd. Smartctl will run a number of tests on your drives, for example
smartctl --all /dev/hda
will show all S.M.A.R.T. information on the first drive (these tools are run with a drive name, not a partition name). Smartd is a daemon that will monitor your drives and report any problems to the system log, and mail you if you give it your address. S.M.A.R.T. - or Self-Monitoring Analysis and Reporting Technology to give it its full name -can detect problems leading to failures and even report changes in temperature. The latter can cause excessive entries in the syslog as smartd reports every temperature fluctuation. Unfortunately, in the first few days of operation, I found this filled my daily logwatch mails with a lot of noise. Adding a suitable line to /etc/smartd.conf fixed this irritation, such as
/dev/sda -d sat -a -I 194 -I 231 -I 9 -W 5 -m email@example.com
The -I 194 -I 231 -I 9 -W 5 tells it to report only changes of five degrees and the minimum and maximum temperatures for the day. If changes of five degrees happen often, you have a potential problem, so this is a useful setting. The first part of the line, -d sat -a, specifies that this is a SATA drive and to run all tests.
- Linux across two hard drives
- Linux solution to automatically back up and restore hard drives
- Can't access Windows hard drives in Mandriva
- How to hot-swap SATA drives in Linux
- Securely erasing hard drives