How to Monitor the Raspberry Pi’s Temperature

In this quick tutorial, we will show you a couple of different ways to monitor the temperature of your Raspberry Pi.

Raspberry Pi Monitor Temperature

As newer versions of the Raspberry Pi have gotten more powerful, they have become more and more challenging to keep cool. As the temperature of the Pi increases, it can throttle the CPU to try and keep the heat manageable. Unfortunately, this throttling can significantly reduce the performance of your device.

Being able to monitor the temperature of your Raspberry Pi makes managing its heat a more straightforward process. You can also use that data to better understand what specific tasks cause the device to run hotter.

Luckily, as the Pi includes a thermometer within its CPU, we can quickly grab and check the device’s temperature.

Over the following sections, we will be discussing several different ways that you can monitor the Raspberry Pi’s temperature.

If you want to monitor the temperature of other items, then check out our guide on using the DS18B20 sensor.

Monitoring your Raspberry Pi’s Temperature from the Terminal

Let us start by exploring how you can monitor the temperature of your Raspberry Pi by using the terminal.

The terminal is one of the easiest ways to monitor your devices temperature, as it can all be done with a single command.

Before proceeding, you need to open the terminal. If you are using Raspberry Pi OS Desktop, you can open the terminal by pressing CTRL + ALT + T.

1. With the terminal open, you can monitor your Raspberry Pi’s temperature by running the following command.

This command will return the temperature in degrees Celsius. While it is possible to convert the temperature to Fahrenheit, we won’t be covering it in this section.

vcgencmd measure_temp

Below you can see the temperature of our device as it was when we first ran the command.

temp=36.0'C

2. If you are trying to monitor your Raspberry Pi’s temperature, you will likely want to see this value updated more often.

To continually monitor this temperature, we can utilize the “watch” command followed by the command we showed off in the previous step.

We use the “-n” option to tell the watch command how often it should read the new value from the “vcgencmd” command. So, for example, with the command below, we are telling it to update the value every second.

watch -n 1 vcgencmd measure_temp

With the example below, you can see how it looks within the terminal when you are using the watch command to monitor the temperature of your Raspberry Pi.

The temperature value will be updated every second with the latest value.

Every 1.0s: vcgencmd measure_temp  raspberrypi: Sat Apr 22 07:25:20 2023

temp=36.0'C

Monitor your Raspberry Pi’s Temperature from the Desktop

If you are using the desktop flavour of Raspberry Pi OS, it is possible to add a new panel to the taskbar so you can monitor the temperature of your device easily.

This readout will display the current temperature and change colour depending on whether your CPU is being throttled.

1. To add the temperature monitor to any panel on Raspberry Pi OS, you will want to start by right-clicking it (1.).

This will bring up a context menu with a set of options. Click the “Add / Remove Panel Items...” option (2.).

Open the panel settings

2. With the “Panel Preferences” open, you will now want to click the “Add” button.

Add new panel element

3. You will now see a list of plugins you can add to your panel. Find the “CPU Temperature Monitor” option (1.) and click it to select it.

With the Raspberry Pi temperature monitor selected, all you need to do is click the “Add” button (2.).

Add CPU Temperature monitor to the Raspberry Pi

4. You can now monitor the temperature of your Raspberry Pi by looking at the top-right corner of your screen.

This little indicator will display the temperature in Celsius and change colour depending on the system’s status.

Raspberry Pi Temperature monitor

Conclusion

At this point in the guide, you should understand how you can easily monitor the temperature of your Raspberry Pi.

You can keep an eye on this temperature in various ways, whether using the terminal or the desktop interface.

Please feel free to comment below if you have any questions about how to monitor your device better.

Be sure to check out our many other Raspberry Pi projects and useful guides. We also have a wealth of general Linux guides.

Leave a Reply

Your email address will not be published. Required fields are marked *

One Comment

  1. Avatar for Galo Aguirre
    Galo Aguirre on

    Worked perfectly, thanks!