smartmontools

wednesday, 27 august 2014

is a collection of disk monitoring tools which can inspect, test and, more importantly, monitor the health of your hard disks (and precious data) and notify you via your system notification mechanism or an email.

Strangely, when smartmontools is installed in Debian, it is not initially configured to actively monitor your hard disks. You have to enable device scanning in the /etc/smartd.conf file with..

DEVICESCAN -d removable -n standby -m sdothum@gmail.com -M exec /usr/share/smartmontools/smartd-runner

And configure an associated email template in your /etc/smartmontools/run.d/10mail file..

#!/bin/bash -e email=/etc/smartmontools/run.d/email (cat <<EOF To: $4 From: root@$(hostname) Subject: $3 $(cat $1) EOF ) >$email su -c "/usr/local/bin/msmtp-enqueue.sh --account=gmail -t <$email" shum

I use msmtp in place of the usual sendmail – something I configured for the mutt email client and retained for Sup mail.

»»  about colophon

comment ?