Skip to content

Instantly share code, notes, and snippets.

@zeemyself
Last active June 12, 2017 07:37
Show Gist options
  • Save zeemyself/35d8f31705839abd557c1e2e67c96577 to your computer and use it in GitHub Desktop.
Save zeemyself/35d8f31705839abd557c1e2e67c96577 to your computer and use it in GitHub Desktop.
Script for get Pi temperature
#!/bin/bash
cpu=$(</sys/class/thermal/thermal_zone0/temp)
echo "$(date) @ $(hostname)"
echo "-------------------------------------------"
echo "GPU => $(/opt/vc/bin/vcgencmd measure_temp)"
echo "CPU => $((cpu/1000))'C"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment