Created
November 15, 2018 15:23
-
-
Save Gfast2/cf5e0da514ddeb9b190ea7e320fc8f64 to your computer and use it in GitHub Desktop.
Read Raspberry Pi's GPU & CPU's temprature.
This file contains hidden or 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: my-pi-temp.sh | |
# Purpose: Display the ARM CPU and GPU temperature of Raspberry Pi 2/3 | |
cpu=$(</sys/class/thermal/thermal_zone0/temp) | |
echo "$(date) @ $(hostname)" | |
echo "------------------------------" | |
echo "GPU => $(vcgencmd measure_temp)" | |
echo "CPU => $((cpu/1000))°C" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If failed, please check out if you have working
vcgencmd
(withwhich vcgencmd
)