/sys/class/thermal/thermal_zone0/temp is missing

New to Debian (Or Linux in general)? Ask your questions here!

/sys/class/thermal/thermal_zone0/temp is missing

Postby onlize » 2018-04-15 15:43

Hello,

This is my first installation of the Debian. I was using Raspbian for Raspberry Pi before, but decided that I need a little more powerfull computer than Raspberry Pi. I am trying Debian and everything looks good so far. There is one issue.

I need to pull out CPU temperature information using cat command. For Raspberry Pi it was "cat /sys/class/thermal/thermal_zone0/temp". The machine that I have now has quad core CPU (I do not know if it matters). In any case, when I run this command, I have the following:
user@HomeAssistant:~$ cat /sys/class/thermal/thermal_zone0/temp
cat: /sys/class/thermal/thermal_zone0/temp: No such file or directory
user@HomeAssistant:~$

When I am checking:
user@HomeAssistant:~$ ls /sys/class/thermal/
cooling_device0 cooling_device1 cooling_device2 cooling_device3
user@HomeAssistant:~$

There is no temp file in either of those folders.

Can someone help me with this? Is it possible to get temperature on Debian using cat command?

Thank you.
onlize
 
Posts: 4
Joined: 2018-04-15 15:31

Re: /sys/class/thermal/thermal_zone0/temp is missing

Postby bw123 » 2018-04-15 16:01

try something under /sys/class/hwmon/
User avatar
bw123
 
Posts: 2987
Joined: 2011-05-09 06:02
Location: TN_USA

Re: /sys/class/thermal/thermal_zone0/temp is missing

Postby onlize » 2018-04-15 16:06

Thank you for suggestion, but there is nothing about temp in there:
user@HomeAssistant:~$ ls /sys/class/hwmon/
hwmon0 hwmon1
user@HomeAssistant:~$ ls /sys/class/hwmon/hwmon0
device power power1_average_interval subsystem
name power1_average power1_crit uevent
user@HomeAssistant:~$
onlize
 
Posts: 4
Joined: 2018-04-15 15:31

Re: /sys/class/thermal/thermal_zone0/temp is missing

Postby bw123 » 2018-04-15 16:14

how about a
# find /sys -name temp*
or something similar?
User avatar
bw123
 
Posts: 2987
Joined: 2011-05-09 06:02
Location: TN_USA

Re: /sys/class/thermal/thermal_zone0/temp is missing

Postby onlize » 2018-04-15 16:23

Thank you, I see this:
user@HomeAssistant:~$ find /sys -name temp*
find: ‘/sys/kernel/debug’: Permission denied
/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon1/temp1_max
/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon1/temp1_crit
/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon1/temp1_crit_hyst
/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon1/temp1_input
user@HomeAssistant:~$


Looks like the temp1_input has the correct number, I will have to check it somehow.
onlize
 
Posts: 4
Joined: 2018-04-15 15:31

Re: /sys/class/thermal/thermal_zone0/temp is missing

Postby onlize » 2018-04-15 16:26

Do you know what are those folders with those numbers: /sys/devices/pci0000:00/0000:00:18.3/*

Is it something temporary or can I use it?
onlize
 
Posts: 4
Joined: 2018-04-15 15:31


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable