forked from stupidloud/nanopi-openwrt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
enable_autocore.diff
69 lines (62 loc) · 2.52 KB
/
enable_autocore.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
diff --git a/package/lean/autocore/Makefile b/package/lean/autocore/Makefile
index 5a3ea11..1f52537 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 55cd519..06d202c 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)
@@ -44,7 +44,7 @@ start()
ethtool -K $c tx-checksum-ip-generic on >/dev/null 2>&1 || (
ethtool -K $c tx-checksum-ipv4 on >/dev/null 2>&1
ethtool -K $c tx-checksum-ipv6 on >/dev/null 2>&1)
- ethtool -K $c tx-scatter-gather on >/dev/null 2>&1
+ #ethtool -K $c tx-scatter-gather on >/dev/null 2>&1
ethtool -K $c gso on >/dev/null 2>&1
ethtool -K $c tso on >/dev/null 2>&1
ethtool -K $c ufo on >/dev/null 2>&1
diff --git a/package/lean/autocore/files/index.htm b/package/lean/autocore/files/index.htm
index 22d1a55..0198c38 100644
--- a/package/lean/autocore/files/index.htm
+++ b/package/lean/autocore/files/index.htm
@@ -720,6 +720,7 @@
<tr><td width="33%"><%:Firmware Version%></td><td>
<%=pcdata(ver.distname)%> <%=pcdata(ver.distversion)%> /
<%=pcdata(ver.luciname)%> (<%=pcdata(ver.luciversion)%>)
+ built by DYC
</td></tr>
<tr><td width="33%"><%:Kernel Version%></td><td><%=unameinfo.release or "?"%></td></tr>
<tr><td width="33%"><%:Local Time%></td><td id="localtime">-</td></tr>
diff --git a/package/lean/autocore/files/sbin/cpuinfo b/package/lean/autocore/files/sbin/cpuinfo
index 19ea5fb..60e7acd 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
}