HDDTEMP

hddtemp is a small utility (daemonizable) that gives you the temperature of your hard drive by reading S.M.A.R.T. informations (for drives that support this feature).

First get hddtemp by

emerge hddtemp

After that do test if hddtemp is working properly

hddtemp /dev/sd{a,b,c}

If you get something like

 WARNING: Drive /dev/sda doesn't appear in the database of supported drives
 WARNING: But using a common value, it reports something.
 WARNING: Note that the temperature shown could be wrong.
 WARNING: See --help, --debug and --drivebase options.
 WARNING: And don't forget you can add your drive to hddtemp.db

then your database file may be too old or the drive too new. You can update your drive manually by editing the database file /usr/share/hddtemp/hddtemp.db Get the model description of your drive by

hddtemp -D /dev/hda | grep Model

This will give: Model: HDS722525VLAT80. Take that model descriptor and add it to the database:

/usr/share/hddtemp/hddtemp.db
"HDS722525VLAT80"              194  C  "Hitachi 250GB"

Make sure, that your temperature is referred in field 194 of the S.M.A.R.T interface and is in degrees celsius otherwise correct the two fields. Read the man page of hddtemp, how to check this.

Define the drives you want to monitor in /etc/conf.d/hddtemp. For example:

/etc/conf.d/hddtemp
HDDTEMP_DRIVES="/dev/hda /dev/hdb /dev/hdd"

Start the init script for this session and add it to the default runlevel:

/etc/init.d/hddtemp start
rc-update add hddtemp default

Wobei das Hinzufügen zum Runlevel in Baselayout2 nicht mehr sein muss. Es wird beim Check der Temperatur automatisch in den dynamischen Runlevel eingefügt.

Open http://localhost:7634 in your favorite webbrowser. The output may look a bit confusing, for example:

/dev/sdaSAMSUNG SP2504C34C/dev/sdbSAMSUNG SP2504C38C/dev/sdcSAMSUNG HD400LJ38C

Meaning that /dev/sda is at 34°C, /dev/sdb at 38°C and /dev/sdc at 38°C