1

I'm trying to measure my Raspberry Pi's temperature using vcgencmd measure_temp but it only works whenever it feels like it:

pi@raspberrypi ~ $ sudo /opt/vc/bin/vcgencmd measure_temp
vc_gencmd_send returned -1
vchi_msg_dequeue -> -1(22)

Any idea what might be going on? It just hangs there, I need to use Ctrl+C to get out of there.

Aurora0001
  • 6,357
  • 3
  • 25
  • 39
nsmyself
  • 285
  • 3
  • 12

2 Answers2

2

This appears to do the trick:

pi@raspberrypi  $ cat /sys/class/thermal/thermal_zone0/temp
57838
nsmyself
  • 285
  • 3
  • 12
0

Any idea what might be going on?

No, but the information is available from the kernel via /sys.

> cat /sys/class/thermal/thermal_zone0/temp
52996

That's thousandths of a degree Celcius (i.e., 52.996 °C).

If your kernel has the hardware monitoring module available (try sudo modprobe -v hwmon; if it says insmod and a path, you do), and you want something more formal, install apt-get lm-sensors and try:

> sensors
bcm2835_hwmon-isa-0000
Adapter: ISA adapter
temp1:        +53.0°C  (high = +85.0°C)

Unfortunately this only seems to work on the single core models.

goldilocks
  • 60,325
  • 17
  • 117
  • 234