查看並持續監測 Pi CPU 溫度

Script:

nano temp.sh

#!/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"

nano tempmon.sh

#!/bin/bash
echo "Press [ctrl+c] to end monitoring"
echo ""
while true
do
  vcgencmd measure_temp
  sleep 3s
done

 

阅读剩余
THE END