Skip to content

Instantly share code, notes, and snippets.

@ellartdev
Created September 13, 2021 17:16
Show Gist options
  • Save ellartdev/07d1d8f3f604c5b74798ec9c2c19bd32 to your computer and use it in GitHub Desktop.
Save ellartdev/07d1d8f3f604c5b74798ec9c2c19bd32 to your computer and use it in GitHub Desktop.
Script for checking CPU and GPU temperature
#!/bin/bash
# Script for checking CPU and GPU temperature
# ===========================================================
cpu_temp=$(</sys/class/thermal/thermal_zone0/temp)
echo "$(date) @ $(hostname)"
echo "============================================="
echo "GPU => $(/opt/vc/bin/vcgencmd measure_temp)"
echo "CPU => $((cpu_temp/1000))'C"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment