Skip to content

Instantly share code, notes, and snippets.

@sdomi
Created May 19, 2018
Embed
What would you like to do?
script for measuring raspberry pi's GPU and CPU temp (requires superuser for gpu)
#!/bin/bash
cpu=$(cat /sys/class/thermal/thermal_zone0/temp)
cpureal=$(echo $cpu | cut -c 1-2).$(echo $cpu | cut -c 3-6)\'C
gpu=$(vcgencmd measure_temp | cut -c 6-11)
echo "CPU: $cpureal | GPU: $gpu"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment