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.

2 thoughts on “Raspberry Pi CPU Temperature Watcher

  1. It’s January now, so that temperature rise isn’t much of a threat, but come summer, it’s worth thinking about. I think the RasPi throttles its CPU to avoid thermal damage, but it’s good to keep an eye on it. Also, it’s always nice to see someone else who still uses bc.

    1. I have a pair of 3 m SMA cables to put the upconverter / receiver / Pi at the foot of the attic stairs, where the temperature remains (barely) tolerable. The preamp must remain physically close to the loop antenna tap where it will get all toasty; I have my doubts about the power supply + heatsink effectiveness at 50 °C ambient.

      True confession: the HP-50 on the desk outweighs bc every time…

Comments are closed.