mirror of
https://github.com/xopenwrt/X-OpenWrt-New.git
synced 2026-09-27 15:24:45 +00:00
优化主页 CPU 温度显示(x86);优化 coremark.sh;调整与修复
This commit is contained in:
@@ -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
|
||||
@@ -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 "
|
||||
Reference in New Issue
Block a user