Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I usually use one of the following to check temperature of Linux-based computers:

$ cat /proc/acpi/thermal_zone/THM/temperature
$ acpi -V
$ sensors

However, on the current system I am using (Debian derived distro) the first one doesn't exist and the second does not show the temperature. The third one only worked after convincing the server admin to install lm_sensors. Is there another way to check in the event that for whatever reason a server admin would deny my request to install lm_sensors? From where does lm_sensors get the temp?


share|improve this question

On my linux mint debian, this gives me the temperature of my two CPUs:

cat /sys/devices/platform/coretemp.0/temp?_input

If you can convince your sysadmin to load a module, this should let you use sensors (as root):

modprobe coretemp
share|improve this answer
Interesting, my Ubuntu 11.10 machine lacks /sys/devices/platform/coretemp.0. Thanks. – dotancohen Aug 10 '12 at 10:28
If memory serves, ubuntu should have this info at /proc/acpi/thermal_zone/THM0/temperature (THM1, THM2 etc for other cores). – terdon Aug 10 '12 at 12:38
Ubuntu does have that, I mention that in the OP. But not all systems have that, hence this thread! In fact, my current desktop Ubuntu doesn't have that either, but the same version on a laptop does. – dotancohen Aug 10 '12 at 13:03
Yeah, I know. After posting my comment, I logged on to an Ubuntu 10.04.3 machine and can't find it either. Have a look at this post, might be helpful: link – terdon Aug 10 '12 at 13:21
The link is broken, but I was able to figure it out. But yes, the issue seems to be that the temperature information could be anywhere, but there is no specific somewhere where it always resides. From where do applications such as lm-sensors poll the info? – dotancohen Aug 10 '12 at 14:31

For reading out temperatures and voltages there is also the Linux hwmon API which has a sysfs interface:

$ ls -l /sys/class/hwmon/
total 0
lrwxrwxrwx 1 root root 0 Jun 30 00:05 hwmon0 -> ../../devices/virtual/hwmon/hwmon0
lrwxrwxrwx 1 root root 0 Jun 30 00:05 hwmon1 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon1
lrwxrwxrwx 1 root root 0 Jun 30 00:05 hwmon2 -> ../../devices/platform/coretemp.0/hwmon/hwmon2
lrwxrwxrwx 1 root root 0 Jun 30 00:05 hwmon3 -> ../../devices/platform/nct6775.2560/hwmon/hwmon3

$ cat /sys/class/hwmon/hwmon2/temp1_input 

AFAIK sensors uses this interface (maybe among others).

share|improve this answer
Thank you very much. I did +1 for the information, but neither of my systems have temp1_input in the hwmon3 directories. I seem to have only device/, power/, subsystem/, uevent. Note that these are hardware-installed machines, not virtual machines. – dotancohen Jun 30 '14 at 5:40
What is the name of the directory hwmon3 points to on your system? The examples I posted were taken from a real, non-virtualized system (Core i5 processor, MSI H81M-E34 mainboard). – dasup Jul 1 '14 at 20:16
hwmon0 -> ../../devices/pci0000:00/0000:00:18.3/hwmon/hwmon0 This also is a real, non-virtualized system (MD A4-5300). – dotancohen Jul 2 '14 at 11:56

A thermometer... (No joke) I would suggest a surface mounted thermocouple if your server admin will deny your request (as long as you have physical access to the machine).

I use an Omega SA1XL.

I hesitated to post this because I realize you are asking for a software solution, but I must say it works quite well. Note that depending on where you place the thermocouple, the absolute readings that you get may vary from what any software solution might give you, but the relative readings (relative to room temperature or normal use) will be most useful.

share|improve this answer
Ah, yes, a hacker solution! – dotancohen Jun 13 '12 at 14:01
but no software monitoring when you're on holidays :( – Felipe Alvarez Dec 24 '14 at 4:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .