mirror of
https://github.com/AuxXxilium/yet-another-bench-script.git
synced 2024-11-23 23:01:02 +07:00
Hotfix for bad CPU output on ARM machines
This commit is contained in:
parent
857e14efe8
commit
773220d760
3
yabs.sh
3
yabs.sh
@ -172,8 +172,9 @@ else
|
||||
fi
|
||||
echo -e "Processor : $CPU_PROC"
|
||||
if [[ $ARCH = *aarch64* || $ARCH = *arm* ]]; then
|
||||
CPU_CORES=$(lscpu | grep "CPU(s):" | sed 's/CPU(s): *//g')
|
||||
CPU_CORES=$(lscpu | grep "^[[:blank:]]*CPU(s):" | sed 's/CPU(s): *//g')
|
||||
CPU_FREQ=$(lscpu | grep "CPU max MHz" | sed 's/CPU max MHz: *//g')
|
||||
[[ -z "$CPU_FREQ" ]] && CPU_FREQ="???"
|
||||
CPU_FREQ="${CPU_FREQ} MHz"
|
||||
else
|
||||
CPU_CORES=$(awk -F: '/model name/ {core++} END {print core}' /proc/cpuinfo)
|
||||
|
Loading…
Reference in New Issue
Block a user