Raspberry Pi4
顯示 CPU 溫度,頻率..etc
使用 Ubuntu 官方 Image
root@ubuntu:~# cat disp_pi4_temperture.sh
#!/bin/bash
org_value=$(cat /sys/class/thermal/thermal_zone0/temp)
cmd="bc <<< 'scale=2; ${org_value}/1000'"
temperture=$(eval $cmd)
echo "CPU Temp: $temperture °C"
echo "CPU Freq:" $(($(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq)/1000)) MHz
使用 Raspbian Image
# vcgencmd measure_temp