Problem finding cpu temp in application

I run an application which wants to obtain the CPU temperature and is looking at a file /sys/class/thermal/thermal_zone0/temp and this file on other distros contains a value which can be used to calculate the CPU temperature (I believe it needs to be divided by 1000?). On Tumbleweed this is an empty file although the files does appear to update it is always empty. Does anyone know why this is? Is there an option someplace I need to change?


That’s the ACPI info, likely using hardware which is down in /sys/class/hwmon/hwmonN

Yes OK but the issue is that this app does not know enough about all stuff like ACPI and hwmonN etc. I guess this is a legacy thing which maybe should/will disappear in future.Seems daft to me that the file seems to be refreshed (date/time changes) but is left empty.


What is the application?

It’s called CumulusMX which is a weather station application. A bit of background, it was originally developed for Windows only and eventually the latest version (after a change of author) now runs under mono so is available for Linux as well. The original author added the CPU temperature as a feature and the current author has left it in, I guess so people who ran this could view on their website what the CPU temp was to maybe see if the processor was overloaded or some such. It was not coded to cope with an empty file, it is now!

So this is a bit of legacy stuff and I was puzzled as to why this file would apparently be recreated but empty, and apparently it works on other distros including those for RPi.


Because the RPi uses acpi as it has no sensors…


Adapter: Virtual device
temp1:        +44.5°C 

cat /sys/class/thermal/thermal_zone0/temp