As the Raspberry Pi has become more powerful temperature management has become more important. This article aims to provide some easy techniques to monitor the temperature of your Pi.

The Pi 4 will start to throttle the performance if the temperature exceeds 80 degrees so it is wise to keep an eye on your system temperature.

Read temperature from command line

The easiest way to determine the temperature of your Raspberry Pi is by using the following command in a terminal window :

vcgencmd measure_temp

This will display the temperature in degrees Celsius:

temp=31.0’C

To extract the number you can use:

vcgencmd measure_temp | egrep -o ‘[0-9]*.[0-9]*’

This feeds the output of vcgenmd to egrep. This then outputs only the characters that are numbers surrounding a full stop (period) character.

If you want to constantly monitor the temperature you can use the watch command:

watch -n 2 vcgencmd measure_temp

This will show the temperature and update the value every 2 seconds.

Add Temperature … // Read more: original article.

Previous post Build a retro CD-ROM console
Next post Coming Soon: Adafruit IO UI Refresh #IoT #AdafruitIO @adafruit @adafruitio