Last active
November 7, 2017 07:42
-
-
Save ertseyhan/e31f2f14bd86498e6d9a075264246041 to your computer and use it in GitHub Desktop.
Display the ARM CPU and GPU temperature of Raspberry Pi 2/3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script: temp.sh | |
# Purpose: Display the ARM CPU and GPU temperature of Raspberry Pi 2/3 | |
# ------------------------------------------------------- | |
cpu=$(</sys/class/thermal/thermal_zone0/temp) | |
echo "CPU >> $((cpu/1000))'C" | |
echo "GPU >> $(/opt/vc/bin/vcgencmd measure_temp | cut -d = -f2)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment