autocore-arm: read real-time cpu frequency
This commit is contained in:
parent
2f0c0a25e9
commit
6cbc1e0bc5
@ -4,7 +4,7 @@ cpu_arch="$(cat "/proc/cpuinfo" | grep "model name" | sed -n "1p" | awk -F ': '
|
||||
[ -z "${cpu_arch}" ] && cpu_arch="ARMv8 Processor"
|
||||
cpu_cores="$(cat "/proc/cpuinfo" | grep "processor" | wc -l)"
|
||||
|
||||
cpu_freq="$(expr $(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq) / 1000)MHz"
|
||||
cpu_freq="$(expr $(cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq) / 1000)MHz"
|
||||
sys_temp="$(awk "BEGIN{printf (\"%.1f\n\",$(cat /sys/class/thermal/thermal_zone0/temp)/1000) }")°C"
|
||||
|
||||
echo -n "${cpu_arch} x ${cpu_cores} (${cpu_freq}, ${sys_temp})"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user