Skip to content

Instantly share code, notes, and snippets.

@ertseyhan
Last active November 7, 2017 07:42
Show Gist options
  • Save ertseyhan/e31f2f14bd86498e6d9a075264246041 to your computer and use it in GitHub Desktop.
Save ertseyhan/e31f2f14bd86498e6d9a075264246041 to your computer and use it in GitHub Desktop.
Display the ARM CPU and GPU temperature of Raspberry Pi 2/3
#!/bin/bash
# Script: temp.sh
# Purpose: Display the ARM CPU and GPU temperature of Raspberry Pi 2/3
# -------------------------------------------------------
cpu=$(</sys/class/thermal/thermal_zone0/temp)
echo "CPU >> $((cpu/1000))'C"
echo "GPU >> $(/opt/vc/bin/vcgencmd measure_temp | cut -d = -f2)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment