How to show CPU temperatures in Linux

Posted
Categories
Comments 0

On Windows we are used to have a multitude of tools that show CPU temperatures. On Linux there are fewer of them. Here I show an easy way to show CPU temperatures under Linux.

installing and using lm-sensors

For installing this package, type the following commands in a terminal window:

sudo apt-get install lm-sensors

This will install lm-sensors. Then you type:

sudo sensors-detect

This detects the sensors. During the process, it asks if you want to scan for several sensors. Only press Enter every time, which chooses the save default answer. Do not choose yes, unless you really know what you are doing! In rare cases this can result in permanent hardware failures!
At the end you will be asked if you want to write everything that needs to be loaded to the /etc/modules. Confirm this with “y”.

Last, you need to load the needed modules with:

sudo service kmod start

You are now ready to go! Run lm-sensors by typing

sensors

The result will look like this (depending on your mainboard and which sensors are detected, it will differ):

stefan@Ryzen1700:~$ sensors
k10temp-pci-00c3
Adapter: PCI adapter
temp1:        +42.5°C  (high = +70.0°C)
radeon-pci-0a00
Adapter: PCI adapter
temp1:        +37.5°C  (crit = +120.0°C, hyst = +90.0°C)
nct6779-isa-0290
Adapter: ISA adapter
Vcore:                  +0.44 V  (min =  +0.00 V, max =  +1.74 V)
in1:                    +0.29 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
AVCC:                   +3.36 V  (min =  +2.98 V, max =  +3.63 V)
+3.3V:                  +3.36 V  (min =  +2.98 V, max =  +3.63 V)
in4:                    +1.85 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in5:                    +0.92 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in6:                    +0.34 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
3VSB:                   +3.44 V  (min =  +2.98 V, max =  +3.63 V)
Vbat:                   +3.26 V  (min =  +2.70 V, max =  +3.63 V)
in9:                    +0.00 V  (min =  +0.00 V, max =  +0.00 V)
in10:                   +0.18 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in11:                   +1.07 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in12:                   +1.68 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in13:                   +0.94 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in14:                   +1.82 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
fan1:                     0 RPM  (min =    0 RPM)
fan2:                  2023 RPM  (min =    0 RPM)
fan3:                     0 RPM  (min =    0 RPM)
fan4:                     0 RPM  (min =    0 RPM)
fan5:                     0 RPM  (min =    0 RPM)
SYSTIN:                 +28.0°C  (high =  +0.0°C, hyst =  +0.0°C)  ALARM  sensor = thermistor
CPUTIN:                 +39.0°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
AUXTIN0:                +84.0°C    sensor = thermistor
AUXTIN1:               +103.0°C    sensor = thermistor
AUXTIN2:                +22.0°C    sensor = thermistor
AUXTIN3:                -25.0°C    sensor = thermistor
SMBUSMASTER 0:          +42.5°C
PCH_CHIP_CPU_MAX_TEMP:   +0.0°C
PCH_CHIP_TEMP:           +0.0°C
PCH_CPU_TEMP:            +0.0°C
intrusion0:            ALARM
intrusion1:            ALARM
beep_enable:           disabled

Knowing which of these values is the CPU temperature is not always straightforward. In the case above, it is the first one that stands at 42.5 °C. If you are not sure, just stop all CPU intensive applications and look at the values. Then run something CPU intensive (like BOINC) and look which value goes up the most – this is most likely the CPU sensor.

graphical output: Psensor and xsensors

running sensors gives you one snapshot of all sensors. This might be enough in many cases. However, if you need a bit more comfort, install Psensor and/or xsensors, which get the sensor values from lm-sensors and show them in a more pretty way.
Just install the packages by typing:

sudo apt-get install psensor
sudo apt-get install xsensors

Psensor looks like this:

This is xsensor:

Comments

There are currently no comments on this article.

Comment

Enter your comment below. Fields marked * are required. You must preview your comment before submitting it.