Monitor CPU and hard disk temperature levels

In System Maintenance on July 14, 2009 at 4:41 pm


Install the lm-sensors package: sudo apt-get install lm-sensors

Run command: sensors-detect

It detects the sensors on board your computer, and will ask you to confirm the ones it finds. It is generally safe to accept its recommendations.  At the end, assuming it found a sensor, it will ask you if you want to automatically have them added to /etc/modules. If you say YES, these kernel modules will get loaded at next reboot. They let you query the on-board sensors through the sensor command.

$ sensors
Adapter: Virtual device
temp1:       +66.5°C  (crit = +105.0°C)

Adapter: ISA adapter
Core 0:      +63.0°C  (crit = +100.0°C)

Adapter: ISA adapter
Core 1:      +66.0°C  (crit = +100.0°C)

You can also look this information up via GNOME sensors-applet applet (ksensors for KDE). If missing, install via sudo apt-get install sensors-applet.


This command gives you the temperature of the hard disk given as a parameter.

$ sudo hddtemp /dev/sda1
/dev/sda1: Hitachi HTS541060G9SA00: 45°C

Alternatively, you can use the following command to get temperatures of all hard disks on the system:

$ nc localhost 7634
|/dev/sg0|Hitachi HTS541060G9SA00|45|C||/dev/sda|Hitachi HTS541060G9SA00|45|C|
$ echo "$(nc localhost 7634 | cut -d'|' -f4)"


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: