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).

Installation
First get hddtemp by

After that do test if hddtemp is working properly

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 Get the model description of your drive by

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

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. For example:

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

wmhdplop
If you are using a window manager that accepts dockapps (like WindowMaker), emerge wmhdplop.

Execute wmhdplop telling which drives to monitor ('-d' flag) and to show the temperature ('-t' flag). You can also play with other flags. For example:

conky
To see the temperature in Conky add ${hddtemp /dev/drive} in.

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


 * /dev/sda|SAMSUNG SP2504C|34|C||/dev/sdb|SAMSUNG SP2504C|38|C||/dev/sdc|SAMSUNG HD400LJ|38|C|

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

Auto-detection of available drives
Minor modifications to /etc/init.d/hddtemp and /etc/conf.d/hddtemp add support for auto-detection of all SMART-capable devices (Note: package sys-apps/smartmontools needs to be installed for this to work):

More information

 * There are examples of scripts for sending mail when temperature gets into a specific level in the old wiki.

Retrieved from "http://www.gentoo-wiki.info/Hddtemp"