Last active
June 6, 2024 13:50
-
-
Save neildavis/8446d816af198bf9f8e0065b85b19d67 to your computer and use it in GitHub Desktop.
Raspberry Pi CPU/GPU temps script
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
#!/usr/bin/env bash | |
cpu_temp=$(cat /sys/class/thermal/thermal_zone0/temp) | |
cpu_temp_fp=$(dc <<< "1 k ${cpu_temp} 1000 / p") | |
echo "CPU temp=${cpu_temp_fp}'C" | |
echo "GPU $(vcgencmd measure_temp)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment