优化主页 CPU 温度显示(x86);优化 coremark.sh;调整与修复

This commit is contained in:
Hyy2001X
2021-03-04 21:50:20 +08:00
parent 3c354edfcc
commit 35a44e1ec6
4 changed files with 32 additions and 14 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
echo -e "\nRunning CoreMark test,please wait ..."
/bin/coremark > /tmp/coremark.log
Scores=$(cat /tmp/coremark.log 2> /dev/null | grep "CoreMark 1.0" | awk '{print $4}')
Processer=$(awk -F ':[ ]' '/model name/{printf ($2);exit}' /proc/cpuinfo)
Time=$(grep "Total time" /tmp/coremark.log | awk '{print $4}')
[[ -z "${Processer}" ]] && Processer=Unknown
echo -e "\nProcesser: ${Processer}\nScore: ${Scores}\nTime costs: ${Time}"
echo "(CPU Mark: ${Scores} Scores)" > /etc/bench.log
if [ -f "/etc/bench.log" ]; then
sed -i '/coremark/d' /etc/crontabs/root
crontab /etc/crontabs/root
fi
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
MHz=$(grep 'MHz' /proc/cpuinfo | awk '{print $4}' | awk 'NR==1')
TEMP=$(sensors 2>/dev/null | grep 'Package id' | awk '{print $4}')
echo "$MHz MHz $TEMP "