A simple script to measure the temperature of CPU and GPU of Raspberry Pi. The below script is tested on Raspberry Pi model 2, 3B and 3B+.
The script uses vcgencmd
to get GPU temperature from the video core and reads CPU temperature from sysfs
Running the script
- Download the script from gist to the Raspberry Pi.
- Set appropriate permission to the file.
chmod 775 pi-temp-measure.sh
- Run the script
./pi-temp-measure.sh
The script provides an output as follows
-------------------------------------------
Fri 11 Sep 18:17:35 BST 2020 @ pi-home
-------------------------------------------
GPU => 39.2'C
CPU => 38.6'C