- sudo apt install vcgencmd
- nano script.sh
- Copy script berikut
!/bin/bash
cpu1=$(</sys/class/thermal/thermal_zone0/temp)
echo “$(date) @ $(hostname)”
echo “===============================================”
echo “$(/usr/bin/vcgencmd measure_temp|tr ‘=’ ‘ ‘|awk ‘{print “GPU Temp = “$2}’)”
echo “CPU Temp = $((cpu1/1000))’C”
4. chmod +x script.sh