Skip to content

Instantly share code, notes, and snippets.

@culurciello
Last active January 12, 2024 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save culurciello/2bcd1db7445dc738f548e039ffccff35 to your computer and use it in GitHub Desktop.
Save culurciello/2bcd1db7445dc738f548e039ffccff35 to your computer and use it in GitHub Desktop.
Display the ARM CPU and GPU temperature of Raspberry Pi
#!/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