Customize Linux Sensors: 3 Outputs to Try on Ubuntu 24.04
Linux sensors, also known as lm_sensors, is a valuable tool for system administrators and users who want to monitor their hardware's temperature, voltage, and fan speed. This article will discuss three different outputs you can try with lm_sensors on Ubuntu 24.04. We will cover key concepts, including installing and configuring lm_sensors, interpreting the output, and some helpful tips for customization.
Installing and Configuring lm_sensors
Before we begin, it's assumed that you are running Ubuntu 24.04 and have administrative privileges. To install lm_sensors, open a terminal and enter the following commands:
sudo apt-get update
sudo apt-get install lm-sensors
Once installed, the configuration file /etc/ sensors.d/ sensors.conf will be empty. To load the appropriate module, you can run the script /usr/bin/sensors-detect and follow the on-screen instructions.
Output 1: Basic Reading
After installing and configuring lm_sensors, you can run sensors in the terminal to see the basic output.
$ sensors
nct6775-isa-0290
Adapter: ISA adapter
Vcore: +1.14 V (min = +0.00 V, max = +3.32 V)
in0: +1.55 V (min = +0.00 V, max = +0.00 V)
in1: +1.55 V (min = +0.00 V, max = +0.00 V)
in2: +3.32 V (min = +0.00 V, max = +0.00 V)
in3: +3.32 V (min = +0.00 V, max = +0.00 V)
in4: +3.32 V (min = +0.00 V, max = +0.00 V)
in5: +3.32 V (min = +0.00 V, max = +0.00 V)
in6: +0.00 V (min = +0.00 V, max = +0.00 V)
3VSB: +3.32 V (min = +0.00 V, max = +0.00 V)
Vbat: +3.32 V (min = +0.00 V, max = +0.00 V)
fan1: 0 RPM (min = 0 RPM, div = 2)
fan2: 0 RPM (min = 0 RPM, div = 2)
fan3: 0 RPM (min = 0 RPM, div = 2)
temp1: +52.0°C (low = +127.0°C, high = +127.0°C) sensor = thermistor
temp2: +35.0°C (low = +127.0°C, high = +127.0°C) sensor = thermistor
temp3: +34.0°C (low = +127.0°C, high = +127.0°C) sensor = thermistor
intrusion0: ALARM
Output 2: Monitoring Specific Sensors
To monitor specific sensors, you can use the -m flag followed by the chip name to filter the output. For example, to monitor the temperature sensors, you can run:
$ sensors -m temp
nct6775-isa-0290
Adapter: ISA adapter
temp1: +52.0°C (low = +127.0°C, high = +127.0°C) sensor = thermistor
temp2: +35.0°C (low = +127.0°C, high = +127.0°C) sensor = thermistor
temp3: +34.0°C (low = +127.0°C, high = +127.0°C) sensor = thermistor
coretemp-isa-0000
Adapter: ISA adapter
Package id 0: +35.5°C (high = +84.0°C, crit = +100.0°C)
Core 0: +35.5°C (high = +84.0°C, crit = +100.0°C)
Core 1: +34.5°C (high = +84.0°C, crit = +100.0°C)
Output 3: Formatted Output
To format the output, you can use the -f flag followed by a format string