Created
May 19, 2018 11:19
-
-
Save sdomi/1d4ff284ec0f0afa85b6567dd12b8c1c to your computer and use it in GitHub Desktop.
script for measuring raspberry pi's GPU and CPU temp (requires superuser for gpu)
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 | |
cpu=$(cat /sys/class/thermal/thermal_zone0/temp) | |
cpureal=$(echo $cpu | cut -c 1-2).$(echo $cpu | cut -c 3-6)\'C | |
gpu=$(vcgencmd measure_temp | cut -c 6-11) | |
echo "CPU: $cpureal | GPU: $gpu" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment