The past few days the weather here in Greece is in a boiling temperature. As i was extracting an archive today i got this alerting message from the syslogd:

Message from syslogd@lee at Fri Jun 20 17:26:17 2008 …
lee kernel: CPU0: Temperature above threshold

Now as you can imagine i was alarmed. I went directly to the box and saw that there was a small rug covering the side of the box. Normaly the heat was growing. I removed the rug and installed a small fan i had for the heat. The problem went away but i thought that there must be a way to monitor your temp. Here is how i did it.

There is a tool called lm-sensors. What it does is that it can monitor the sensors your box has. There are sensors for the CPU temp, the fan RPM’s and several more. This lib monitors them. Here is what you have to do to install it:

  1. Download the package from a mirror:
    apt-get install lm-sensors
  2. After that run the confoguration tool (just hit enter on any question, the defaults worked fine.)
    > sensors-detect
  3. After the config tool is done you should get something like the following:
    To make the sensors modules behave correctly, add these lines to
    #----cut here----
    # I2C adapter drivers
    # Chip drivers
    #----cut here----

    These are the modules you need to load. Load them like this:
    modprobe -a i2c-i801 eeprom it87
  4. After that you are done! Run the small tool that ships with lm-sensors like this:
    > sensors
    You should get something like the following:
    Adapter: ISA adapter
    VCore 1: +1.55 V (min = +0.00 V, max = +4.08 V)
    VCore 2: +1.49 V (min = +0.00 V, max = +4.08 V)
    +3.3V: +3.23 V (min = +0.00 V, max = +4.08 V)
    +5V: +4.33 V (min = +0.00 V, max = +6.85 V)
    +12V: +12.22 V (min = +0.00 V, max = +16.32 V)
    -12V: -13.86 V (min = -27.36 V, max = +3.93 V)
    -5V: -1.10 V (min = -13.64 V, max = +4.03 V)
    Stdby: +3.66 V (min = +0.00 V, max = +6.85 V)
    VBat: +4.08 V
    fan1: 3750 RPM (min = 0 RPM, div = 8)
    fan2: 0 RPM (min = 0 RPM, div = 8)
    fan3: 0 RPM (min = 0 RPM, div = 8)
    M/B Temp: +25Β°C (low = +127Β°C, high = +127Β°C) sensor = thermistor
    CPU Temp: +25Β°C (low = +127Β°C, high = +127Β°C) sensor = thermistor
    Temp3: +64Β°C (low = +127Β°C, high = +127Β°C) sensor = diode

It is as easy as this. From now on running sensors will give you all these details. I would like to note that in your case it may provide less info because your pc might have less sensors.