Document Scope
This article will cover the lm-sensors tool which can be useful in identifying errant temperature issues within your system. Note, this tool DOES depend on your hardware and may not be suitable in all cases.
What is 'lm-sensors'?
lm-sensors (short for Linux hardware monitoring sensors) is a suite of tools and drivers for monitoring temperatures, voltages, and fan speeds of hardware components on Linux-based systems. It allows users to gather information about the thermal and voltage sensors present on the motherboard and other hardware components.
How to install lm-sensors
Ubuntu
sudo apt-get install lm-sensors
CentOS/Rocky
sudo yum install lm_sensors
Configure sensors
sensors-detect
View sensors
[root@rdlab ~]# sensors
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0: +42.0°C (high = +80.0°C, crit = +90.0°C)
Core 0: +33.0°C (high = +80.0°C, crit = +90.0°C)
Core 1: +35.0°C (high = +80.0°C, crit = +90.0°C)
Core 2: +36.0°C (high = +80.0°C, crit = +90.0°C)
Core 3: +30.0°C (high = +80.0°C, crit = +90.0°C)
Core 4: +33.0°C (high = +80.0°C, crit = +90.0°C)
Core 5: +32.0°C (high = +80.0°C, crit = +90.0°C)
[root@rdlab ~]#
Monitoring 'sensors'
watch -n 1 -d sensors
The above command will continuously print the output from the detected sensors and will highlight changes. While the specifics would be beyond the scope of this article, consider expanding the above using a combination of grep and append to create your own temperature log!
Example excerpt from customer provided sensors output
...
iwlwifi_1-virtual-0
Adapter: Virtual device
temp1: +67.0°C
enp68s0-pci-4400
Adapter: PCI adapter
PHY Temperature: +84.0°C
k10temp-pci-00c3
Adapter: PCI adapter
Tdie: +93.0°C (high = +70.0°C)
Tctl: +93.0°C
...
What happens if you run 'sensors' without running 'sensors-detect'?
If you run 'sensors' without running 'sensors-detect' first, it might not display all available sensor information or could show limited sensor data. 'sensors-detect' is a tool that probes for available sensors on your system and generates the necessary configuration for 'sensors' to display accurate information.
Running 'sensors-detect' helps identify and configure sensors on your system, making sure that 'sensors' can provide comprehensive and accurate data about various hardware sensors like temperature, voltage, and fan speed. It's recommended to run 'sensors-detect' before using 'sensors' to ensure that the tool can access and display information from all available sensors on your system.
Comments
0 comments
Please sign in to leave a comment.