target_linux_rockchip-6.x/armv8/base-files/usr/bin/cputemp.sh
2023-01-02 16:28:18 +08:00

15 lines
483 B
Bash
Executable File

#!/bin/bash
while true
do
echo "-----------------"
echo "Curr freq: `cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq`,`cat /sys/devices/system/cpu/cpu4/cpufreq/cpuinfo_cur_freq`"
echo "Temp: `cat /sys/class/thermal/thermal_zone0/temp`"
if [ -d /sys/devices/platform/pwm-fan ]; then
CUR=`cat /sys/devices/virtual/thermal/cooling_device0/cur_state`
MAX=`cat /sys/devices/virtual/thermal/cooling_device0/max_state`
echo "Fan Level: ${CUR}/${MAX}"
fi
sleep 5
done