49 lines
1.5 KiB
Diff
49 lines
1.5 KiB
Diff
diff --git a/package/lean/autocore/Makefile b/package/lean/autocore/Makefile
|
|
index 5a3ea113..1f52537b 100644
|
|
--- a/package/lean/autocore/Makefile
|
|
+++ b/package/lean/autocore/Makefile
|
|
@@ -17,7 +17,7 @@ include $(INCLUDE_DIR)/package.mk
|
|
define Package/autocore
|
|
TITLE:=x86/x64 auto core loadbalance script.
|
|
MAINTAINER:=Lean
|
|
- DEPENDS:=@TARGET_x86 +bc +lm-sensors +ethtool
|
|
+ DEPENDS:=+bc +lm-sensors +ethtool
|
|
endef
|
|
|
|
define Package/autocore/description
|
|
diff --git a/package/lean/autocore/files/autocore b/package/lean/autocore/files/autocore
|
|
index 55cd519f..5aabbb63 100755
|
|
--- a/package/lean/autocore/files/autocore
|
|
+++ b/package/lean/autocore/files/autocore
|
|
@@ -33,7 +33,7 @@ start()
|
|
g=${a}${b}${c}${d}${e}${f}
|
|
|
|
mkdir -p /tmp/sysinfo
|
|
- echo $g > /tmp/sysinfo/model
|
|
+ #echo $g > /tmp/sysinfo/model
|
|
|
|
a=$(ip address | grep ^[0-9] | awk -F: '{print $2}' | sed "s/ //g" | grep '^[e]' | grep -v "@" | grep -v "\.")
|
|
b=$(echo "$a" | wc -l)
|
|
diff --git a/package/lean/autocore/files/sbin/cpuinfo b/package/lean/autocore/files/sbin/cpuinfo
|
|
index 19ea5fb2..3ca62011 100755
|
|
--- a/package/lean/autocore/files/sbin/cpuinfo
|
|
+++ b/package/lean/autocore/files/sbin/cpuinfo
|
|
@@ -2,7 +2,7 @@
|
|
|
|
info()
|
|
{
|
|
- MHz=`grep 'MHz' /proc/cpuinfo | cut -c11- |sed -n '1p'`
|
|
+ MHz=`echo "$(cat /sys/devices/system/cpu/cpu[04]/cpufreq/cpuinfo_cur_freq) /1000" | bc`
|
|
#获取CPU工作频率
|
|
|
|
sensors >/dev/null
|
|
@@ -12,7 +12,7 @@ info()
|
|
#获取CPU核心1温度
|
|
|
|
else
|
|
- a=""
|
|
+ a=`echo "scale=2; $(cat /sys/class/thermal/thermal_zone0/temp) / 1000" | bc`°
|
|
fi
|
|
}
|
|
|