mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-07-27 08:31:44 +08:00
update 2026-06-29 01:03:25
This commit is contained in:
parent
b2b3891c0a
commit
713ef9d97d
@ -1,14 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
NSS_PATH="/sys/kernel/debug/qca-nss-drv/stats"
|
||||
WIFILI_PATH="$NSS_PATH/wifili"
|
||||
ATH11K_NSS_PEER_STATS_GLOB="/sys/kernel/debug/ath11k/*/*/nss_peer_stats_config"
|
||||
|
||||
cpu_usage="$(busybox top -n1 | awk '/^CPU/ {printf("%d%", 100 - $8)}')"
|
||||
|
||||
[ ! -d "$NSS_PATH" ] || \
|
||||
npu_usage="$(grep '%' "$NSS_PATH"/cpu_load_ubi | awk -F ' ' '{print $2}')"
|
||||
|
||||
wifi_nss_status=""
|
||||
|
||||
if [ -e "$WIFILI_PATH" ]; then
|
||||
if grep -q '1' $ATH11K_NSS_PEER_STATS_GLOB 2>/dev/null; then
|
||||
wifi_nss_status=", WIFI NSS: ON"
|
||||
else
|
||||
wifi_nss_status=", WIFI NSS: OFF"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d "$NSS_PATH" ]; then
|
||||
echo -n "CPU: ${cpu_usage}, NPU: ${npu_usage}"
|
||||
echo -n "CPU: ${cpu_usage}, NPU: ${npu_usage}${wifi_nss_status}"
|
||||
else
|
||||
echo -n "CPU: ${cpu_usage}"
|
||||
fi
|
||||
|
||||
@ -1278,7 +1278,14 @@ end
|
||||
function to_check_self()
|
||||
local url = "https://raw.githubusercontent.com/Openwrt-Passwall/openwrt-passwall/main/luci-app-passwall/Makefile"
|
||||
local tmp_file = "/tmp/passwall_makefile"
|
||||
local return_code, result = curl_auto(url, tmp_file, curl_args)
|
||||
local gh_proxy = uci_get_type("global_app", "github_proxy", "0")
|
||||
local return_code, result
|
||||
if gh_proxy == "1" then
|
||||
url = "https://gh-proxy.org/" .. url
|
||||
return_code, result = curl_base(url, tmp_file, curl_args)
|
||||
else
|
||||
return_code, result = curl_auto(url, tmp_file, curl_args)
|
||||
end
|
||||
result = return_code == 0
|
||||
if not result then
|
||||
exec("/bin/rm", {"-f", tmp_file})
|
||||
|
||||
@ -1904,8 +1904,9 @@ stop() {
|
||||
kill -9 "$pid" >/dev/null 2>&1
|
||||
fi
|
||||
done
|
||||
busybox pgrep -f "sleep.*(6s|9s|58s)" | xargs kill -9 >/dev/null 2>&1
|
||||
busybox pgrep -af "${CONFIG}/" | awk '! /app\.sh|subscribe\.lua|rule_update\.lua|tasks\.sh|server_app\.lua|ujail/{print $1}' | xargs kill -9 >/dev/null 2>&1
|
||||
busybox pgrep -af "${CONFIG}/monitor\.sh" | xargs -r kill -9 >/dev/null 2>&1
|
||||
busybox pgrep -f "sleep.*(6s|9s|58s)" | xargs -r kill -9 >/dev/null 2>&1
|
||||
busybox pgrep -af "${CONFIG}/" | awk '! /app\.sh|subscribe\.lua|rule_update\.lua|tasks\.sh|server_app\.lua|ujail/{print $1}' | xargs -r kill -9 >/dev/null 2>&1
|
||||
unset V2RAY_LOCATION_ASSET
|
||||
unset XRAY_LOCATION_ASSET
|
||||
unset SS_SYSTEM_DNS_RESOLVER_FORCE_BUILTIN
|
||||
|
||||
Loading…
Reference in New Issue
Block a user