how do we check system temperature in linux?

E

enhu

Guest
just like the title says, how do we check system temperature in linux using the terminal?
without installing a software.
 


W/O installing software you could try:
[xcode=bash]acpi -t[/xcode]

If that doesn't work, install the lm_sensors package and query it..

Debian based:
[xcode=bash]
apt-get install lm_sensors
sensors
[/xcode]

Red Hat based:
[xcode=bash]
yum install lm_sensors
sensors
[/xcode]

Example output:
[xcode=bash]
[rob@station-222 ~]$ sensors
nouveau-pci-0100
Adapter: PCI adapter
temp1: +44.0°C (high = +100.0°C, crit = +110.0°C)
[/xcode]

(or in Fahrenheit)
[xcode=bash]
[rob@station-222 ~]$ sensors -f
nouveau-pci-0100
Adapter: PCI adapter
temp1: +111.2°F (high = +212.0°F, crit = +230.0°F)
[/xcode]
 
lm_sensors seem not available in bodhilinux, it says

root@enhu:/home/enhu/Downloads# apt-get install lm_sensors
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package lm_sensors
root@benhur:/home/enhu/Downloads#

also acpi -t don't work either. maybe i just have to move to another distro. so concern about temperature these days because i've just installed anew CPU and wanna see how effect the thermal paste i've put.
 
It may be possible that your motherboard is incompatible with Linux at all.
 
Hi, Enhu. The problem in this case is too simple.
The sensors package name is actually lm-sensor. Bodhi Linux is based on Ubuntu and uses its repositories. You should already have solved the problem, but in case someone else be in doubt,, the answer to this problem is just install acpi and/or lm-sensors.

$ sudo apt-get install acpi
$ sudo apt-get install lm-sensors

lm_sensors seem not available in bodhilinux, it says



also acpi -t don't work either. maybe i just have to move to another distro. so concern about temperature these days because i've just installed anew CPU and wanna see how effect the thermal paste i've put.
 
you can check if lm-sensors is already on your machine by locating the hwmon directory.
In arch it is either in /sys/devices/hwmon or /sys/class/hwmon. Unfortunately not sure if its the same in Ubuntu/Bodhi.
 
In Debian based systems you can tell if a package is installed quite easily by using aptitude

Code:
$ aptitude search ~ilm-sensors
(~i instructs aptitude to search among installed packages - there is no space been the ~i operator and the search string.)

This is probably easier - not to mention more useful - than searching for individual files.
 
This is probably easier - not to mention more useful - than searching for individual files.

Easier, definitely, more useful depends on what she's using the sensors for. In conky for instance specifying the hwmon files is much less CPU-intensive than using an lm-sensors | grep <specific_cpu_temp>
 
works for me on rhel 6:
to insert the ipmi module:
$modprobe ipmi_devintf

to confirm its installed:
$lsmod | grep ipmi

to see CPUs and System Temp, Peripheral Temp, PCH Temp and LAN Temp:
$ipmitool sensor list |grep deg

hope that helps!
the ipmi module will not be inserted after reboot, you'd have to insert it again later
 
Last edited:
I just reboot and access my BIOS. All that information is there.

Modern computers have a built-in fail safe mechanism that will shut down your computer if the CPU reaches an unsafe temperature. As a general rule of thumb, if your system can run for several hours under normal use conditions and does not automatically shut itself down, you're fine.
 

Members online


Top