From 2375acbfba1b583ec7993f5acec4f7c4b6816425 Mon Sep 17 00:00:00 2001 From: AuxXxilium Date: Sat, 11 May 2024 17:07:27 +0200 Subject: [PATCH] cpuinfo: update Signed-off-by: AuxXxilium --- cpuinfo/all/usr/bin/cpuinfo.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cpuinfo/all/usr/bin/cpuinfo.sh b/cpuinfo/all/usr/bin/cpuinfo.sh index 617bb0d..f9a0a18 100755 --- a/cpuinfo/all/usr/bin/cpuinfo.sh +++ b/cpuinfo/all/usr/bin/cpuinfo.sh @@ -9,14 +9,14 @@ VENDOR="" FAMILY="" SERIES="$(echo $(grep 'model name' /proc/cpuinfo 2>/dev/null | head -1 | cut -d: -f2))" -CORES="$(grep 'cpu cores' /proc/cpuinfo 2>/dev/null | wc -l)" +CORES="$(dmidecode -t processor | grep "Core Count" | head -1 | cut -d: -f2)" if [ -z ${CORES} ]; then - CORES="$(dmidecode -t processor | grep "Core Count" | head -1 | cut -d: -f2)" + CORES="$(grep 'cpu cores' /proc/cpuinfo 2>/dev/null | wc -l)" fi -SPEED="$(grep 'cpu MHz' /proc/cpuinfo 2>/dev/null | head -1 | cut -d: -f2)" -SPEED="${SPEED%.*}" -if [ -z ${SPEED} || ${SPEED} -eq 800 ]; then - SPEED="$(dmidecode -t processor | grep "Max Speed" | head -1 | cut -d: -f2 | cut -d ' ' -f2)" +SPEED="$(dmidecode -t processor | grep "Max Speed" | head -1 | cut -d: -f2 | cut -d ' ' -f2)" +if [ -z ${SPEED} ]; then + SPEED="$(grep 'cpu MHz' /proc/cpuinfo 2>/dev/null | head -1 | cut -d: -f2)" + SPEED="${SPEED%.*}" fi FILE_JS="/usr/syno/synoman/webman/modules/AdminCenter/admin_center.js"