Linux CPU and SSD Temperature Monitoring
In this article, we’ll explore see how to monitor the temperature of the CPU, motherboard, hard drives, and other hardware sensors on a Linux system with the help of third-party tools.
Tools for Monitoring Temperature
LM-Sensors
Lm-sensors
is a command-line utility for hardware monitoring. It can be used to monitor the temperature of the CPU, motherboard, hard drives, and other hardware sensors.
Hddtemp
hddtemp
is a command-line utility used to monitor the temperature of hard disk drives (HDDs) and solid-state drives (SSDs) in a Linux system. It reads the temperature data of HDDs and SSDs using the Self-Monitoring, Analysis and Reporting Technology (SMART) system, which is built into most modern hard drives and solid-state drives.
NVMe-CLI
nvme
is the command to interact with NVMe devices using the command line interface.
Installation
Install these tools on Linux using your package manager on Ubuntu/Debian Linux:
apt install hddtemp lm-sensors nvme-cli
Usage
LM-Sensors how-to
sensors-detect
is a command-line utility used to detect and configure hardware sensors on a Linux system. It is typically used to identify and configure monitoring support for hardware sensors such as temperature sensors, fan speed sensors, and voltage sensors on a computer motherboard. Answer YES to any scan requests until the scan is completed.
sensors-detect
Once sensors-detect has completed, you can use the sensors command to display the readings from the hardware sensors on your system. This allows you to monitor the temperature, fan speed, and other hardware sensor data in real-time, which can be useful for diagnosing issues with your system, or simply monitoring its health.
$ sensors
amdgpu-pci-0900
Adapter: PCI adapter
vddgfx: 1.36 V
vddnb: 949.00 mV
edge: +44.0°C
slowPPT: 9.00 mW
nct6798-isa-0290
Adapter: ISA adapter
in0: 688.00 mV (min = +0.00 V, max = +1.74 V)
in1: 1.66 V (min = +0.00 V, max = +0.00 V) ALARM
in2: 3.42 V (min = +0.00 V, max = +0.00 V) ALARM
in3: 3.31 V (min = +0.00 V, max = +0.00 V) ALARM
in4: 1.83 V (min = +0.00 V, max = +0.00 V) ALARM
in5: 952.00 mV (min = +0.00 V, max = +0.00 V) ALARM
in6: 1.19 V (min = +0.00 V, max = +0.00 V) ALARM
in7: 3.42 V (min = +0.00 V, max = +0.00 V) ALARM
in8: 3.26 V (min = +0.00 V, max = +0.00 V) ALARM
in9: 912.00 mV (min = +0.00 V, max = +0.00 V) ALARM
in10: 1.02 V (min = +0.00 V, max = +0.00 V) ALARM
in11: 624.00 mV (min = +0.00 V, max = +0.00 V) ALARM
in12: 1.05 V (min = +0.00 V, max = +0.00 V) ALARM
in13: 912.00 mV (min = +0.00 V, max = +0.00 V) ALARM
in14: 904.00 mV (min = +0.00 V, max = +0.00 V) ALARM
fan1: 0 RPM (min = 0 RPM)
fan2: 1142 RPM (min = 0 RPM)
fan3: 0 RPM (min = 0 RPM)
fan4: 0 RPM (min = 0 RPM)
fan5: 453 RPM (min = 0 RPM)
fan6: 0 RPM (min = 0 RPM)
fan7: 0 RPM (min = 0 RPM)
SYSTIN: +44.0°C (high = +80.0°C, hyst = +75.0°C) sensor = thermistor
CPUTIN: +43.0°C (high = +80.0°C, hyst = +75.0°C) sensor = thermistor
AUXTIN0: +16.0°C sensor = thermistor
AUXTIN1: -62.0°C sensor = thermistor
AUXTIN2: +13.0°C sensor = thermistor
AUXTIN3: +31.0°C sensor = thermistor
SMBUSMASTER 0: +57.0°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
nvme-pci-0100
Adapter: PCI adapter
Composite: +38.9°C (low = -273.1°C, high = +67.8°C)
(crit = +89.8°C)
k10temp-pci-00c3
Adapter: PCI adapter
Tctl: +57.8°C
nvme-pci-0400
Adapter: PCI adapter
Composite: +39.9°C (low = -273.1°C, high = +67.8°C)
(crit = +89.8°C)
Hddtemp how-to
Read the temperature data provided by hddtemp
# SSD
$ hddtemp /dev/sda
/dev/sda: KINGSTON SA400S37480G: 34°C
# HDD
$ hddtemp /dev/sdc
/dev/sdc: HGST HUS726T4TALE6L4: 43°C
NVMe-CLI how-to
Retrieve, if available, the temperature from the SMART (Self-Monitoring, Analysis and Reporting Technology) log of an NVMe device
$ nvme smart-log /dev/nvme0 | grep "^temperature"
temperature : 39 C
By using these tools, you can effectively monitor the temperature of various components in your Linux system and ensure they are operating within safe limits.