P.S.A. - RPI4 23.05 - Temperature monitoring

btop shows temperature in top right corner by default. and updates as frequently as 500ms

may not be news to everyone but it was news to me and btop is really pretty (kinda ram heavy though)

Can you just:

cat /sys/class/thermal/thermal_zone0/temp

Or:

#!/bin/sh
temp=$(cat /sys/class/thermal/thermal_zone0/temp)
echo "CPU temp        :  $(( temp / 1000 ))°C"