1. sudo apt install vcgencmd
  2. nano script.sh
  3. 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