Archive for January 20th, 2017

Raspberry Pi CPU Temperature Watcher

Having just put a headless Raspberry Pi in the attic, the chip temperature is of some interest. Doing this in an SSH session comes in handy:

watch 'echo "scale=1 ; d = $(cat /sys/class/thermal/thermal_zone0/temp) / 1000 ; print d , \" °C\n\" " | bc'
# blank line to ensure the underscore displays correctly

Raspbian doesn’t have the bc calculator by default, so do that first.

For whatever it’s worth, the Pi starts out at 10 °C and warms over 60 °C under heavy load:

Every 2.0s: echo "scale=1 ; d = $(cat /sys/class/thermal/thermal_zone0/temp) / 1000 ; print d , \" °...  Sat Jan 14 19:58:59 2017

61.7 °C

It ticks along in the mid 30s under light load.

You can run all that in one tab of a terminal window through VNC. If you’ve got that much GUI goin’ on, just add a thermal monitor in the panel and be done with it.