How to check current hardware information
Current CPU frequency
To read current real-time CPU frequency:
sudo cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq
Current GPU frequency
To read current GPU frequency
sudo cat /sys/kernel/debug/gc/clk | grep sh | awk
'{print $4}'
Current CPU & GPU Temperature
To monitor real-time SoC temperature
watch -n 1 sudo cat /sys/class/thermal/thermal_zone0/temp
Advanced Script
save below text as hwinfo_moniter.sh
#!/bin/bash
soc_temp=$(sudo cat /sys/class/thermal/thermal_zone0/temp | awk
'{printf "%.2f", $0 / 1000}
'
)
cpu_freq=$(sudo cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq | awk
'{printf
"%.2f", $0 / 1000000}'
)
gpu_freq=$(sudo cat /sys/kernel/debug/gc/clk | grep sh | awk
'{printf "%.2f", $4 / 1000000}
'
)
echo
"SoC Temp=> $soc_temp degree C"
echo
"CPU Freq=> $cpu_freq GHz"
echo
"GPU Freq=> $gpu_freq MHz"
example: