Lucid Tips

Easily understood tips that make your computing experience easier

Monitor CPU and hard drive temperatures on Ubuntu Linux

Most new computers support ACPI which stands for Advanced Configuration and Power Interface. ACPI provides for many functions besides power management, such as thermal management and plug-and-play events. If the fan on your PC is always on this could mean the CPU and hard drive are running hot and this could cause permanant damage to your PC. There are some command line and GUI based utilities that can be used to monitor the CPU and hard drive temperatures.

Disclaimer: These steps have worked for me and have been tested on Compaq nc6000 running Ubuntu 9.04 (Jaunty Jackalope). YMMV. I am not responsible for loss of data or damage to computers.

Installing the required packages

The following packages need to be installed

lm-sensors – a hardware health monitoring package for Linux. It allows you to access information from temperature, voltage, and fan speed sensors. It works with most newer systems

hddtemp – monitors and reports the temperature of PATA, SATA or SCSI hard drives by reading Self-Monitoring Analysis and Reporting Technology (S.M.A.R.T.) information on drives that support this feature

sensors-applet – an applet for the GNOME panel that displays readings from hardware sensors, including temperatures, fan speeds and voltage readings

computertemp – little applet for the GNOME desktop that shows the temperature of your CPU and disks in the panel.

Both sensors-applet and computertemp are applets that can be added to GNOME panel – you do not need both. Which one to use is your personal preference.

Open terminal window and type the following command

sudo apt-get install lm-sensors hddtemp sensors-applet computertemp

Before we can monitor the temperatures we need to configure the sensors. sensors-detect command helps determine which kernel modules need to be loaded to use lm_sensors most effectively.

Open terminal window and type the following command

sudo sensors-detect

You will be asked a few questions. It is generally safe and recommended to accept the default answers to all questions except the last one – the default is NO. You need to answer yes so that the required entries are made in /etc/modules file. Next step is to load the new modules into the kernel

sudo /etc/init.d/module-init-tools

Now that you have everything in place you can monitor the CPU and hard drive temperatures either from the command line or add an applet to the GNOME panel.

Command line options

Open terminal window and type the following command(s)


sensors output on nc6000

cat /proc/acpi/thermal_zone/*/temperature

Depending on your hardware, you may have more than one sensor. On Compaq nc6000 the output was

cat /proc/acpi/thermal_zone/*/temperature

sudo hddtemp /dev/sda

On Compaq nc6000 the output was

sudo hddtemp /dev/sda

Using sensors applet

Add sensors applet to the panel

  1. Right click on the top or bottom panel
  2. Click Add to Panel
  3. Scroll down and select Hardware Sensors Monitor
  4. Click Add
  5. Click Close

adding sensors-applet to panel

By default sensors applet does not display hard drive temperature. To add it.

  1. Right click on the applet and select preferences
  2. Select Sensors tab
  3. Expand hddtemp
  4. Check the box in Enabled
  5. Click Close

configure sensors-applet to display hard drive temperature

You should now see the CPU and hard drive temperatures in your panel


Using computertemp applet

  1. Right click on the top or bottom panel
  2. Click Add to Panel
  3. Scroll down and select Computer Temperature Monitor
  4. Click Add
  5. Click Close

adding computertemp applet to panel

To display hard drive temperature you need to add another copy of the computertemp applet.

  1. Repeat the steps above and add the computertemp applet to the panel
  2. Right the newly added computertemp applet and select preferences
  3. Select HDDTEMP as the sensor to monitor
  4. Select /dev/sda as the Thermal Zone
  5. Click Close

configure computertemp to display hard drive temperature

You should now see the CPU and hard drive temperatures in your panel

cpu temperature using computertemp applet

hard drive temperature using computertemp applet

Good luck!!!

Share and Enjoy:
  • Digg
  • Google
  • Slashdot
  • StumbleUpon
  • Technorati

11 Comments so far

  1. dogafin September 13th, 2009 10:07 pm

    this is the greatest thing i ever added to my panel! thank you!

  2. John Hat September 18th, 2009 9:28 am

    On my Laptop I cannot get the HDDTEMP to display using the applets. I can use the command “sudo hddtemp /dev/sda” and get the HD temperature. I have tried both the “sensors applet” and the “Computer Temperature Applet” and neither will pull in the HDDTemp. I did get this to work on my desktop using the “sensors applet”

    Any suggestions?
    I am using an Acer Trvelmate 2480 Laptop, with an Intel chipset. I have 2GB RAM and a S.M.A.R.T. hard drive. OS = Ubuntu 9.04

  3. siva October 24th, 2009 10:36 pm

    Hi. thanks for the detailed procedure… i helped me a lot…

  4. roddo November 19th, 2009 1:16 am


  5. rangga aditya December 8th, 2009 6:23 pm

    just like john said, I also can’t display harddisk. it is wierd because I use ubuntu before (jaunty) and it works. but this karmic does not detect my harddisk… :(

  6. amaddog February 11th, 2010 3:06 pm

    my cpu isn’t showing up (its a Pentium 3)

  7. Steve Nash May 5th, 2010 10:40 am

    On Ubuntu 9.10 I encountered a problem with one of your instructions:

    NashFS:/etc$ sudo /etc/init.d/module-init-tools
    Usage: /etc/init.d/module-init-tools COMMAND

    Can you advise?

    Thanks for this page, I am trying to arrange a temperature alarm (email) from a server that is in potentially ‘hot’ spot. Any further suggestions you have would be appreciated.

  8. Paul June 24th, 2010 3:47 am

    Steve. I used the command:
    sudo modprobe it87

    instead of:
    /etc$ sudo /etc/init.d/module-init-tools

    got the info from here:

  9. prj September 9th, 2010 11:49 pm

    I too have the same result from the module-init-tools line: It does nothing but gives me a syntax error (COMMAND required).

  10. anonynous September 15th, 2010 4:05 pm

    as COMMAND it supposed to be ‘restart’
    so the line should be like this: sudo /etc/init.d/module-init-tools

    alternatively restart should work also

  11. Shane September 15th, 2010 9:08 pm

    Thanks …..
    I Now can see the cpu and hdd temps….

    Thanks again !
    for the detailed procedure It helped me a lot