Skip to content

Instantly share code, notes, and snippets.

@magnusstubman
Created December 4, 2018 11:16
Show Gist options
  • Save magnusstubman/1150f45d67021b8812f882de74adac87 to your computer and use it in GitHub Desktop.
Save magnusstubman/1150f45d67021b8812f882de74adac87 to your computer and use it in GitHub Desktop.
raspbian raspberry pi temperature
#!/bin/bash
cpu=$(cat /sys/class/thermal/thermal_zone0/temp | sed 's/./&./2')
echo "cpu $cpu c"
gpu=$(/opt/vc/bin/vcgencmd measure_temp | cut -d'=' -f2 | cut -d"'" -f1)
echo "gpu $gpu c"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment