Temperature monitoring on the Raspberry Pi

Contents

Is your Raspberry Pi hot? The Raspberry Pi runs at a great factory default temperature when idle, but when you use it a lot in a heated office, Does it get too hot? Find out in a few simple steps.

Temperature monitoring in the Pi

We will assume that you have already configured your Raspberry Pi, you are using Raspbian and you can access a console prompt, either via SSH or via desktop-based login.

If you have a fresh Ubuntu installation on your Pi, make the payment. vcgencmd for Ubuntu 20.04 aarch64 en RPi 4B by Hamid Elaosta.

Once you are at the terminal prompt, you will first want to verify that the vcgencmd the utility is enabled for you. It will probably be present if you are using Raspbian. Let's check:

whereis vcgencmd

where is the output of vcgencmd

If you received a result, who had more information, then a vcgencmd:, Then, You can go now.

Temperature test on the Pi manually

Go ahead and run the following command:

vcgencmd measure_temp

You should receive a result equivalent to the following:

Please note that the temperature of your Pi may be higher, as an example, 45 Celsius degrees. Mine (and Raspberry Pi 4) runs in an airtight metal box (the Aluminum radiator housing with double armature fan) with a single cooling fan running, and tonight it's quite cold. I have another Raspberry Pi 3 with a plastic housing, a pair of heat sinks and no fan, and right now it works to 44,4 Celsius degrees.

How much is too much?

Good question. The Raspberry Pi Foundation recommends keeping your Raspberry Pi below the 85 Celsius degrees. That's an upper limit, And you need to pay attention that there may be some chips on the Raspberry motherboard that are only qualified to go up to 70 Celsius degrees. In general, if you can run to 50 degrees Celsius or less, looks like you should be in the green zone.

Even if it should go above him, it is feasible that you can add a small fan, some cooling sinks and quickly reduce the temperature. Ambient temperature / environment also lacks relevance. If your environment becomes hotter (summer weather, etc.), wait for your Raspberry Pi to also rise in temperature.

And it is good to pay attention that the Raspberry Pi will generally speed up (In other words, will slow down) when the temperature reaches a certain point. Unless you are doing something that is not predetermined, like overclocking or changing settings.

Plus there's a lot to say about the case you choose for your Raspberry Pi 4. Various options will lead to much better or much worse cooling results. For a solid overview of cases, see Raspberry Pi Cases 4, temperature regulation and CPU under load Lt. Martin Rowan.

Scripting temperature and more

the vcgencmd The command is quite versatile. You can read more about this in the vcgencmd man page. Let's create a little script with some of the most useful commands, that we store as ~/temperature.sh:

#!/bin/bash 
vcgencmd measure_temp
vcgencmd get_throttled
vcgencmd measure_volts
vcgencmd get_mem arm
vcgencmd get_mem gpu

Measuring more with vcgencmd

Here, we check the temperature, the status of the accelerator (see the web portal link above for more information), a Volt read and available memory for the GPU and ARM processor. note that your total memory may be larger than what you show available for arm. You can see your total memory using a tool like htop (sudo apt install htop && htop), or just running free -mh on the command line (the first result, up to the left, is the total memory size).

Ending

Keeping your Raspberry Pi cool is undoubtedly an important aspect of the proper functioning of your Pi. Invest in a box that optimizes temperature, add one or two fans and, the most important, monitor the temperature performance of the system regularly, even under load. Enjoy the multitude of information vcgencmd can provide and monitor that temperature.

Subscribe to our Newsletter

We will not send you SPAM mail. We hate it as much as you.