mirror of
https://github.com/sirpdboy/sirpdboy-package.git
synced 2025-01-09 04:17:45 +08:00
up enther info and turboacc
This commit is contained in:
parent
a6a8aeaf9f
commit
efc1b25006
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=autocore
|
PKG_NAME:=autocore
|
||||||
PKG_VERSION:=1
|
PKG_VERSION:=1
|
||||||
PKG_RELEASE:=29
|
PKG_RELEASE:=37
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ define Package/autocore-arm
|
|||||||
DEPENDS:=@(TARGET_bcm27xx||TARGET_bcm53xx||TARGET_mvebu||TARGET_ipq40xx||TARGET_ipq806x||TARGET_rockchip) \
|
DEPENDS:=@(TARGET_bcm27xx||TARGET_bcm53xx||TARGET_mvebu||TARGET_ipq40xx||TARGET_ipq806x||TARGET_rockchip) \
|
||||||
+TARGET_bcm27xx:bcm27xx-userland \
|
+TARGET_bcm27xx:bcm27xx-userland \
|
||||||
+TARGET_bcm53xx:nvram \
|
+TARGET_bcm53xx:nvram \
|
||||||
+TARGET_ipq40xx:lm-sensors
|
+(TARGET_ipq40xx||TARGET_ipq806x):lm-sensors
|
||||||
VARIANT:=arm
|
VARIANT:=arm
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@ -49,6 +49,9 @@ define Package/autocore-arm/install
|
|||||||
$(INSTALL_BIN) ./files/arm/090-cover-index_htm $(1)/etc/uci-defaults/090-cover-index_htm
|
$(INSTALL_BIN) ./files/arm/090-cover-index_htm $(1)/etc/uci-defaults/090-cover-index_htm
|
||||||
$(INSTALL_DIR) $(1)/sbin
|
$(INSTALL_DIR) $(1)/sbin
|
||||||
$(INSTALL_BIN) ./files/arm/sbin/cpuinfo $(1)/sbin/cpuinfo
|
$(INSTALL_BIN) ./files/arm/sbin/cpuinfo $(1)/sbin/cpuinfo
|
||||||
|
ifneq (, $(findstring $(BOARD), ipq40xx ipq806x))
|
||||||
|
$(INSTALL_BIN) ./files/arm/sbin/tempinfo $(1)/sbin/tempinfo
|
||||||
|
endif
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/autocore-x86/install
|
define Package/autocore-x86/install
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
local has_ipv6 = fs.access("/usr/sbin/ip6tables")
|
local has_ipv6 = fs.access("/usr/sbin/ip6tables")
|
||||||
local has_dhcp = fs.access("/etc/config/dhcp")
|
local has_dhcp = fs.access("/etc/config/dhcp")
|
||||||
local has_wifi = ((fs.stat("/etc/config/wireless", "size") or 0) > 0)
|
local has_wifi = ((fs.stat("/etc/config/wireless", "size") or 0) > 0)
|
||||||
|
local has_temp = fs.access("/sbin/tempinfo")
|
||||||
|
|
||||||
local sysinfo = luci.util.ubus("system", "info") or { }
|
local sysinfo = luci.util.ubus("system", "info") or { }
|
||||||
local boardinfo = luci.util.ubus("system", "board") or { }
|
local boardinfo = luci.util.ubus("system", "board") or { }
|
||||||
local unameinfo = nixio.uname() or { }
|
local unameinfo = nixio.uname() or { }
|
||||||
@ -43,7 +45,7 @@
|
|||||||
local user_info = luci.sys.exec("cat /proc/net/arp | grep 'br-lan' | grep '0x2' | wc -l")
|
local user_info = luci.sys.exec("cat /proc/net/arp | grep 'br-lan' | grep '0x2' | wc -l")
|
||||||
|
|
||||||
local cpu_usage = (luci.sys.exec("expr 100 - $(top -n 1 | grep 'CPU:' | awk -F '%' '{print$4}' | awk -F ' ' '{print$2}')") or "6") .. "%"
|
local cpu_usage = (luci.sys.exec("expr 100 - $(top -n 1 | grep 'CPU:' | awk -F '%' '{print$4}' | awk -F ' ' '{print$2}')") or "6") .. "%"
|
||||||
local cpu_info = luci.sys.exec("/sbin/cpuinfo") or "ARM Processor x 0 (233MHz, 2.3°C)"
|
local cpu_info = luci.sys.exec("/sbin/cpuinfo") or "ARM Processor"
|
||||||
|
|
||||||
local rv = {
|
local rv = {
|
||||||
cpuinfo = cpu_info,
|
cpuinfo = cpu_info,
|
||||||
@ -699,9 +701,12 @@
|
|||||||
<tr><td width="33%"><%:Hostname%></td><td><%=luci.sys.hostname() or "?"%></td></tr>
|
<tr><td width="33%"><%:Hostname%></td><td><%=luci.sys.hostname() or "?"%></td></tr>
|
||||||
<tr><td width="33%"><%:Model%></td><td><%=pcdata(boardinfo.model or "?")%> <%=luci.sys.exec("cat /etc/bench.log") or ""%></td></tr>
|
<tr><td width="33%"><%:Model%></td><td><%=pcdata(boardinfo.model or "?")%> <%=luci.sys.exec("cat /etc/bench.log") or ""%></td></tr>
|
||||||
<tr><td width="33%"><%:Architecture%></td><td id="cpuinfo">-</td></tr>
|
<tr><td width="33%"><%:Architecture%></td><td id="cpuinfo">-</td></tr>
|
||||||
|
<% if has_temp then %>
|
||||||
|
<tr><td width="33%"><%:Temperature%></td><td><%=luci.sys.exec("/sbin/tempinfo") or "?"%></td></tr>
|
||||||
|
<% end %>
|
||||||
<tr><td width="33%"><%:Firmware Version%></td><td>
|
<tr><td width="33%"><%:Firmware Version%></td><td>
|
||||||
<%=pcdata(ver.distname)%> <%=pcdata(ver.distversion)%> /
|
<%=pcdata(ver.distname)%> <%=pcdata(ver.distversion)%><!-- /
|
||||||
<%=pcdata(ver.luciname)%> (<%=pcdata(ver.luciversion)%>)
|
<%=pcdata(ver.luciname)%> (<%=pcdata(ver.luciversion)%>) !-->
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td width="33%"><%:Kernel Version%></td><td><%=unameinfo.release or "?"%></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>
|
<tr><td width="33%"><%:Local Time%></td><td id="localtime">-</td></tr>
|
||||||
|
@ -16,12 +16,13 @@ else
|
|||||||
[ -n "${big_cpu_freq}" ] && big_cpu_freq="${big_cpu_freq}MHz "
|
[ -n "${big_cpu_freq}" ] && big_cpu_freq="${big_cpu_freq}MHz "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if grep -q "bcm27xx" "/etc/openwrt_release"; then
|
if grep -q "ipq" "/etc/openwrt_release"; then
|
||||||
cpu_temp="$(vcgencmd measure_temp | awk -F '=' '{print $2}' | awk -F "'" '{print $1}')°C"
|
echo -n "${cpu_arch} x ${cpu_cores} (${cpu_freq})"
|
||||||
elif grep -q "ipq40xx" "/etc/openwrt_release"; then
|
|
||||||
cpu_temp="$(sensors | grep -Eo '\+[0-9]+.+C' | sed ':a;N;$!ba;s/\n/ /g;s/+//g')"
|
|
||||||
else
|
else
|
||||||
cpu_temp="$(awk "BEGIN{printf (\"%.1f\n\",$(cat /sys/class/thermal/thermal_zone0/temp)/1000) }")°C"
|
if grep -q "bcm27xx" "/etc/openwrt_release"; then
|
||||||
|
cpu_temp="$(vcgencmd measure_temp | awk -F '=' '{print $2}' | awk -F "'" '{print $1}')°C"
|
||||||
|
else
|
||||||
|
cpu_temp="$(awk "BEGIN{printf (\"%.1f\n\",$(cat /sys/class/thermal/thermal_zone0/temp)/1000) }")°C"
|
||||||
|
fi
|
||||||
|
echo -n "${cpu_arch} x ${cpu_cores} (${big_cpu_freq}${cpu_freq}, ${cpu_temp})"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "${cpu_arch} x ${cpu_cores} (${big_cpu_freq}${cpu_freq}, ${cpu_temp})"
|
|
||||||
|
10
autocore/files/arm/sbin/tempinfo
Normal file
10
autocore/files/arm/sbin/tempinfo
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
sys_temp="$(sensors | grep -Eo '\+[0-9]+.+C' | grep -Ev 'high' | sed ':a;N;$!ba;s/\n/ /g;s/+//g')"
|
||||||
|
|
||||||
|
if grep -q "ipq40xx" "/etc/openwrt_release"; then
|
||||||
|
echo -n "WiFi: ${sys_temp}"
|
||||||
|
else
|
||||||
|
cpu_temp="$(awk "BEGIN{printf (\"%.1f\n\",$(cat /sys/class/thermal/thermal_zone0/temp)/1000) }")°C"
|
||||||
|
echo -n "CPU: ${cpu_temp}, WiFi: ${sys_temp}"
|
||||||
|
fi
|
@ -8,22 +8,20 @@ start()
|
|||||||
rfc=4096
|
rfc=4096
|
||||||
cc=$(grep -c processor /proc/cpuinfo)
|
cc=$(grep -c processor /proc/cpuinfo)
|
||||||
rsfe=$(echo $cc*$rfc | bc)
|
rsfe=$(echo $cc*$rfc | bc)
|
||||||
sysctl -w net.core.rps_sock_flow_entries=$rsfe
|
sysctl -w net.core.rps_sock_flow_entries=$rsfe >/dev/null
|
||||||
for fileRps in $(ls /sys/class/net/eth*/queues/rx-*/rps_cpus)
|
for fileRps in $(ls /sys/class/net/eth*/queues/rx-*/rps_cpus)
|
||||||
do
|
do
|
||||||
echo $cc > $fileRps
|
echo $cc > $fileRps
|
||||||
done
|
done
|
||||||
|
|
||||||
for fileRfc in $(ls /sys/class/net/eth*/queues/rx-*/rps_flow_cnt)
|
for fileRfc in $(ls /sys/class/net/eth*/queues/rx-*/rps_flow_cnt)
|
||||||
do
|
do
|
||||||
echo $rfc > $fileRfc
|
echo $rfc > $fileRfc
|
||||||
done
|
done
|
||||||
|
|
||||||
for fileRps in $(ls /sys/class/net/eth*/queues/tx-*/xps_cpus)
|
uci set network.@globals[0].packet_steering=1
|
||||||
do
|
uci commit network
|
||||||
echo $cc > $fileRps
|
|
||||||
done
|
|
||||||
|
|
||||||
a=$(cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq)
|
a=$(cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq)
|
||||||
b=$(echo -n ' : ')
|
b=$(echo -n ' : ')
|
||||||
c=$(cat /proc/cpuinfo | grep 'core id' | sort -u | wc -l)
|
c=$(cat /proc/cpuinfo | grep 'core id' | sort -u | wc -l)
|
||||||
|
@ -633,7 +633,7 @@
|
|||||||
|
|
||||||
var e;
|
var e;
|
||||||
|
|
||||||
if (e = document.getElementById('ethinfo')) {
|
if (e = document.getElementById('ethinfo')) {
|
||||||
var ports = eval('(' + info.ethinfo + ')');
|
var ports = eval('(' + info.ethinfo + ')');
|
||||||
var tmp = "";
|
var tmp = "";
|
||||||
for (var i in ports)
|
for (var i in ports)
|
||||||
@ -718,8 +718,8 @@
|
|||||||
<tr><td width="33%"><%:Model%></td><td><%=pcdata(boardinfo.model or "?")%> <%=luci.sys.exec("cat /etc/bench.log") or " "%></td></tr>
|
<tr><td width="33%"><%:Model%></td><td><%=pcdata(boardinfo.model or "?")%> <%=luci.sys.exec("cat /etc/bench.log") or " "%></td></tr>
|
||||||
<tr><td width="33%"><%:CPU Info%></td><td id="cpuinfo">-</td></tr>
|
<tr><td width="33%"><%:CPU Info%></td><td id="cpuinfo">-</td></tr>
|
||||||
<tr><td width="33%"><%:Firmware Version%></td><td>
|
<tr><td width="33%"><%:Firmware Version%></td><td>
|
||||||
<%=pcdata(ver.distname)%> <%=pcdata(ver.distversion)%> /
|
<%=pcdata(ver.distname)%> <%=pcdata(ver.distversion)%> <!--/
|
||||||
<%=pcdata(ver.luciname)%> (<%=pcdata(ver.luciversion)%>)
|
<%=pcdata(ver.luciname)%> (<%=pcdata(ver.luciversion)%>) !-->
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td width="33%"><%:Kernel Version%></td><td><%=unameinfo.release or "?"%></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>
|
<tr><td width="33%"><%:Local Time%></td><td id="localtime">-</td></tr>
|
||||||
|
@ -4,14 +4,36 @@ a=$(ip address | grep ^[0-9] | awk -F: '{print $2}' | sed "s/ //g" | grep '^[e]'
|
|||||||
b=$(echo "$a" | wc -l)
|
b=$(echo "$a" | wc -l)
|
||||||
rm -f /tmp/state/ethinfo
|
rm -f /tmp/state/ethinfo
|
||||||
|
|
||||||
|
echo -n "[" > /tmp/state/ethinfo
|
||||||
|
|
||||||
for i in $(seq 1 $b)
|
for i in $(seq 1 $b)
|
||||||
do
|
do
|
||||||
|
h=$(echo '{"name":' )
|
||||||
c=$(echo "$a" | sed -n ${i}p)
|
c=$(echo "$a" | sed -n ${i}p)
|
||||||
d=$(ethtool $c)
|
d=$(ethtool $c)
|
||||||
|
|
||||||
e=$(echo "$d" | grep "Link detected" | awk -F: '{printf $2}' | sed 's/^[ \t]*//g')
|
e=$(echo "$d" | grep "Link detected" | awk -F: '{printf $2}' | sed 's/^[ \t]*//g')
|
||||||
|
if [ $e = yes ]; then
|
||||||
|
l=1
|
||||||
|
else
|
||||||
|
l=0
|
||||||
|
fi
|
||||||
|
|
||||||
f=$(echo "$d" | grep "Speed" | awk -F: '{printf $2}' | sed 's/^[ \t]*//g' | tr -d "Unknown!")
|
f=$(echo "$d" | grep "Speed" | awk -F: '{printf $2}' | sed 's/^[ \t]*//g' | tr -d "Unknown!")
|
||||||
[ -z "$f" ] && f="-"
|
[ -z "$f" ] && f=" - "
|
||||||
|
|
||||||
g=$(echo "$d" | grep "Duplex" | awk -F: '{printf $2}' | sed 's/^[ \t]*//g')
|
g=$(echo "$d" | grep "Duplex" | awk -F: '{printf $2}' | sed 's/^[ \t]*//g')
|
||||||
[ "$g" != "Full" -a "$g" != "Half" ] && g="-"
|
if [ "$g" == "Full" ]; then
|
||||||
echo "$c $e $f $g" >> /tmp/state/ethinfo
|
x=1
|
||||||
|
else
|
||||||
|
x=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -n "$h \"$c\", \"status\": $l, \"speed\": \"$f\", \"duplex\": $x}," >> /tmp/state/ethinfo
|
||||||
done
|
done
|
||||||
|
|
||||||
|
sed -i 's/.$//' /tmp/state/ethinfo
|
||||||
|
|
||||||
|
echo -n "]" >> /tmp/state/ethinfo
|
||||||
|
|
||||||
|
cat /tmp/state/ethinfo
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
msgid "Turbo ACC Center"
|
msgid "Turbo ACC Center"
|
||||||
msgstr "TACC网络加速"
|
msgstr "ACC网络加速"
|
||||||
|
|
||||||
msgid "Turbo ACC Acceleration Settings"
|
msgid "Turbo ACC Acceleration Settings"
|
||||||
msgstr "Turbo ACC 网络加速设置"
|
msgstr "Turbo ACC 网络加速设置"
|
||||||
|
@ -35,7 +35,7 @@ global {
|
|||||||
cache_dir="/var/dnscache"; # 缓存文件的位置
|
cache_dir="/var/dnscache"; # 缓存文件的位置
|
||||||
pid_file = /var/run/dnscache.pid;
|
pid_file = /var/run/dnscache.pid;
|
||||||
server_ip = 127.0.0.1; # pdnsd监听的网卡,0.0.0.0是全部网卡
|
server_ip = 127.0.0.1; # pdnsd监听的网卡,0.0.0.0是全部网卡
|
||||||
server_port=5333; # pdnsd监听的端口,不要和别的服务冲突即可
|
server_port=5553; # pdnsd监听的端口,不要和别的服务冲突即可
|
||||||
status_ctl = on;
|
status_ctl = on;
|
||||||
paranoid=on; # 二次请求模式,如果请求主DNS服务器返回的是垃圾地址,就向备用服务器请求
|
paranoid=on; # 二次请求模式,如果请求主DNS服务器返回的是垃圾地址,就向备用服务器请求
|
||||||
query_method=udp_only;
|
query_method=udp_only;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
#qbittorrent
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=qBittorrent
|
PKG_NAME:=qbittorrent
|
||||||
PKG_VERSION:=4.3.3_v1.2.12
|
PKG_VERSION:=4.3.3_v1.2.12
|
||||||
PKG_RELEASE=1
|
PKG_RELEASE=1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user