49

Is there a way to programmatically monitor the temperature of the BCM2835 SoC?

If so, would it do any good? i.e. would temporarily suspending CPU-intensive processes have any chance to reduce the temperature?

I know that one answer is that it should not matter because air cooling is sufficient. However, this is for a situation where air flow in the enclosure is very limited (and the SoC and ethernet controllers are not necessarily the primary heat sources.)

4
  • Do you know how hot it is getting? (Hot to the touch?) Could you add a small heatsink? Or couple the chip to the enclosure with an external heatsink?
    – Alex L
    Commented Jun 16, 2012 at 7:59
  • @Alex, probably, but this question is specifically about monitoring.
    – finnw
    Commented Jun 16, 2012 at 11:54
  • 1
    Can you tell me why this is important? Your Pi should never get hot enough to damage itself, even with low airflow.
    – Jivings
    Commented Jun 16, 2012 at 14:40
  • @Jivings, I just fixed a typo in the question (which might address your comment.) There may be other sources of heat, all in a confined space.
    – finnw
    Commented Jun 16, 2012 at 14:43

6 Answers 6

51

The ability to monitor the temperature of the GPU has been added to the firmware.

/opt/vc/bin/vcgencmd measure_temp
temp=48.7'C
1
  • works! very cool
    – Scoop
    Commented Sep 23, 2012 at 7:29
26

You can also type:

cat /sys/class/thermal/thermal_zone0/temp

Output will then be in milligrades!

3
  • 1
    Which, I believe, means celsius = milligrades / 1000, e.g. 40084 milligrades = 40.084 C.
    – berto
    Commented Nov 17, 2015 at 17:22
  • That is correct berto!
    – Christian
    Commented Nov 18, 2015 at 23:09
  • 1
    Centigrade: cat /sys/class/thermal/thermal_zone0/temp | awk '{ print ($1 / 1000) "°C" }'
    – Kanchu
    Commented Jul 14, 2018 at 16:12
10

In addition to gnibbler's answer:

/opt/vc/bin/vcgencmd measure_temp| egrep "[0-9.]{4,}" -o
49.8
4

Unfortunately, the BCM2835 does not have a temperature sensor.

The documentation is rather limited (purposefully by Broadcom), however there is no mention of a sensor in the data-sheet.

It would be possible to attach your own sensor via the GPIO that monitors the surrounding air temperature or surface temperature of the chip.

However, unless the device will be operating inside your oven, I feel temperature shouldn't be an issue.

0
3

Here are some handy sensors that have a logic level to indicate if the temperature is above the setpoint https://raspberrypi.stackexchange.com/a/1206/590. You just need one GPIO to detect if it is getting too hot.

-1

It is always good to watch the temp of the processor. You don't want it to go into nuclear overload. The CPU usage increase will increase the TEMP. I am new the Raspberry PI, but I am a tech. I do notice major increase in temp of the CPU with high processor usage. I am going to add a heat sink, and small fan to be controlled depending on heat rise.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.