Where is the variable for CPU temperature stored?

A question was asked in the Telegram channel:

Where is the variable for CPU temp stored? Id like to have a PWM fan setup on my Raspberry Pi StartOS but couldn’t find the location for it.

This is not something supported at the OS level. You would need to SSH in to the StartOS server and run code to manage the fan based on the temperature.

To read the temperature you can read the file /sys/class/thermal/thermal_zone0/temp which displays the temperature in millicelsius.

start9@embassy-hexcode:/$ cat /sys/class/thermal/thermal_zone0/temp

1 Like