From 9f119e9716aa9ef31a49c8812598d9b2d63f1784 Mon Sep 17 00:00:00 2001 From: Hyy2001X <1804430051@qq.com> Date: Fri, 6 Aug 2021 15:25:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B8=A9=E5=BA=A6=E4=B8=BA?= =?UTF-8?q?=20Core=20=E5=B9=B3=E5=9D=87=E6=B8=A9=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CustomFiles/Depends/cpuinfo_x86 | 6 +++--- CustomFiles/Depends/profile | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CustomFiles/Depends/cpuinfo_x86 b/CustomFiles/Depends/cpuinfo_x86 index 5c64224..f39e6a7 100755 --- a/CustomFiles/Depends/cpuinfo_x86 +++ b/CustomFiles/Depends/cpuinfo_x86 @@ -1,5 +1,5 @@ #!/bin/sh MHz_AVG="$(echo "$(grep 'MHz' /proc/cpuinfo | awk '{Freq_Sum += $4};END {print Freq_Sum}') / $(grep 'processor' /proc/cpuinfo | sort -u | wc -l)" | bc)" -TEMP="$(sensors 2>/dev/null | grep 'Core 0' | awk '{print $3}' | cut -d '+' -f2)" -echo "$MHz_AVG MHz (CPU: $TEMP)" -sleep 1 \ No newline at end of file +TEMP="$(echo "$(sensors 2>/dev/null | grep Core | awk '{Sum += $3};END {print Sum}') / $(sensors 2>/dev/null | grep Core | wc -l)" | bc)" +echo "$MHz_AVG MHz (CPU: ${TEMP}°C)" +sleep 1 diff --git a/CustomFiles/Depends/profile b/CustomFiles/Depends/profile index 74c953a..8dc88ce 100644 --- a/CustomFiles/Depends/profile +++ b/CustomFiles/Depends/profile @@ -4,7 +4,7 @@ Sysinfo() { [ -z "${TARGET_PROFILE}" ] && local TARGET_PROFILE=$(jsonfilter -e '@.model.id' < /etc/board.json | tr ',' '_') local CoreMark=$([ -f /etc/bench.log ] && egrep -o "[0-9]+" /etc/bench.log | awk 'NR==1') local Startup=$(awk '{a=$1/86400;b=($1%86400)/3600;c=($1%3600)/60;d=($1%60)} {printf("%d 天 %d 小时 %d 分钟 %d 秒\n",a,b,c,d)}' /proc/uptime) - local TEMP=$(sensors 2>/dev/null | grep 'Core 0' | awk '{print $3}' | cut -d '+' -f2 | cut -d '.' -f1 | awk '{a=$1;b=32+$1*1.8} {printf("%d°C \e[36m|\e[0m %.1f°F\n",a,b)}') + local TEMP=$(echo "$(sensors 2>/dev/null | grep Core | awk '{Sum += $3};END {print Sum}') / $(sensors 2>/dev/null | grep Core | wc -l)" | bc | awk '{a=$1;b=32+$1*1.8} {printf("%d°C \e[36m|\e[0m %.1f°F\n",a,b)}') echo echo -e " 设备信息: ${Yellow}${TARGET_PROFILE} ${Div} $(uname -n)" echo -e " 内核版本: K$(uname -rs | egrep -o "[0-9].+")"