Skip to content

Instantly share code, notes, and snippets.

@neildavis
Last active June 6, 2024 13:50
Show Gist options
  • Save neildavis/8446d816af198bf9f8e0065b85b19d67 to your computer and use it in GitHub Desktop.
Save neildavis/8446d816af198bf9f8e0065b85b19d67 to your computer and use it in GitHub Desktop.
Raspberry Pi CPU/GPU temps script
#!/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