Fix jelos-info reporting CPUFreq info.

This commit is contained in:
fewtarius 2023-01-03 06:14:42 -05:00
parent 22a9843b61
commit f24b324b17
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A

View file

@ -42,11 +42,14 @@ do
fi
done
declare -a CF MF
CNTR=0
for CPUFREQ in /sys/devices/system/cpu/cpufreq/*
do
case ${HW_ARCH} in
aarch64)
declare -a CF MF
CNTR=0
for CPUFREQ in /sys/devices/system/cpu/cpufreq/*
do
if [[ "${CPUFREQ}" =~ boost ]]
then
continue
@ -66,7 +69,9 @@ do
CF+=("CORES ${FIELD}: $(( $(cat ${CPUFREQ}/scaling_cur_freq | sort | tail -n 1) / 1000))MHz")
MF+=("CORES ${FIELD}: $(( $(cat ${CPUFREQ}/scaling_max_freq | sort | tail -n 1) / 1000))MHz")
CNTR=$(( CNTR + 1 ))
done
done
;;
esac
# temperature
# Unit: millidegree Celsius
@ -111,11 +116,15 @@ then
fi
echo "CPU FAN: ${FANSPEED}"
fi
for C in "${CF[@]}"
do
case ${HW_ARCH} in
aarch64)
for C in "${CF[@]}"
do
echo ${C}
done
for M in "${MF[@]}"
do
done
for M in "${MF[@]}"
do
echo ${M}
done
done
;;
esac