Monitoring hard disk health with smartmontools

January 23, 2010

I always install smartmontools when I use SMART-enabled hard drives. It wasn’t until recently, though, that I started automating the tests.

Here’s a link that explains it: http://www.captain.at/howto-linux-smartmontools-smartctl.php.

Based on that, here’s the code I added to my /etc/smartd.conf:
# Per http://www.captain.at/howto-linux-smartmontools-smartctl.php
DEVICESCAN -d sat -a -o on -S on -s (S/../.././19|L/../../3/21|C/../.././20) -m root
# -d sat because /dev/sdX doesn't seem to run without it
# S/../.././19 = short test every day at 19:00
# C/../.././20 = conveyance test every day at 20:00
# L/../../3/21 = long test every wednesday (3) at 21:00
# -m root = root will be emailed if anything strange occurs

Note that this has to come before any other DEVICESCAN (apparently the first one takes priority). Don’t forget to kill -HUP the smartd process so the new config will take effect, and make sure /etc/default/smartmontools has uncommented:

start_smartd=yes

After this, you can get useful info with:

sudo smartctl -l selftest /dev/sda

(or whatever drive you care about).

A very good description of the output of smartctl can be found at: www.cyberciti.biz/tips/linux-find-out-if-harddisk-failing.html


Adding fldigi from the Berlios repository

January 15, 2010

The version of fldigi that’s built for Ubuntu 9.10 is a bit out of date. Luckily, the Berlios repository has a more recent version, and you can install that.

The instructions are here. In short form (specific to Ubuntu 9.10):

  1. Edit /etc/apt/sources.list and add the following lines:
    # Berlios repository for updated FLDigi
    deb http://download2.berlios.de/pub/fldigi/binaries karmic main
    
  2. Get the key for fldigi
    sudo apt-key adv --recv-keys --keyserver http://fldigi.berlios.de/binaries/fldigi-pkg-key.asc 8E7306F5
    
  3. Install fldigi
    sudo aptitude update; sudo aptitude install fldigi