Displaying CPU temperatures on Linux hosts

Intel and AMD keep coming out with bigger and faster CPUs. Each time I upgrade (I’m currently eyeing one of these) to a newer CPU it seems like the heat sinks and cooling fans have tripled in size (I ran across this first hand when I purchased a Zalman CPU cooler last year). If you use Linux and a relatively recent motherboard, there should be a set of sensors on the motherboard that you can retrieve the current temperatures from. To access these sensors you will first need to install the lm_sensors package:

$ yum install lm_sensors

Once the software is installed and configured for your hardware you can run the sensors tool to display the current temperatures:

$ sensors

k8temp-pci-00c3
Adapter: PCI adapter
Core0 Temp:
             +14°C
Core1 Temp:
             +14°C

This is useful information, especially if you are encountering unexplained reboots. Elevated temperatures can lead to all sorts of issues, and lm_sensors is a great tool for helping to isolate these types of problems. Now back to drooling over the latest generation of processors from Intel and AMD. :)

2 thoughts on “Displaying CPU temperatures on Linux hosts”

  1. This is a cool tool. I like to know my desktop’s temperature constantly, so I made a small script in order to parse this information and I show it in my tmux status bar.

Leave a Reply

Your email address will not be published. Required fields are marked *