Tag: CPU主频

通过BASH脚本显示树莓PI的温度和频率

我们很容易可以通过以下BASH脚本来显示当前树莓PI的温度和频率. #pi@raspberrypi:~ $ cat ./cpu_freq.sh #!/bin/bash temp=`head -n 1 /sys/class/thermal/thermal_zone0/temp | xargs -I{} awk "BEGIN {printf \"%.2f\n\", {}/1000}"` echo $((`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq`/1000)) MHz, $temp degrees 然后, 我们可以每3秒来显示这个信息: # 每3秒显示 while …