Last active
January 12, 2024 18:54
-
-
Save culurciello/2bcd1db7445dc738f548e039ffccff35 to your computer and use it in GitHub Desktop.
Display the ARM CPU and GPU temperature of Raspberry Pi
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: my-pi-temp.sh | |
# Purpose: Display the ARM CPU and GPU temperature of Raspberry Pi | |
# ------------------------------------------------------- | |
cpu=$(</sys/class/thermal/thermal_zone0/temp) | |
echo "--- Measure Raspberry Pi CPU and GPU temperature ---" | |
echo "$(date) @ $(hostname)" | |
echo "-------------------------------------------" | |
echo "GPU $(vcgencmd measure_temp)" | |
echo "CPU temp=$((cpu/1000))'C" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment