mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-10-29 21:55:13 +08:00
update 2026-06-22 17:44:01
This commit is contained in:
1 parent
0acc17dc7e
commit
916c29789a
3 files changed
+5
-10
No files matched your search
@@ -1,21 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
NSS_PATH="/sys/kernel/debug/qca-nss-drv/stats"
|
||||
ATH11K_NSS_OFFLOAD="/sys/module/ath11k/parameters/nss_offload"
|
||||
|
||||
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}')"
|
||||
|
||||
if [ -e "$ATH11K_NSS_OFFLOAD" ]; then
|
||||
if [ "$(cat "$ATH11K_NSS_OFFLOAD" 2>/dev/null)" = "1" ]; then
|
||||
wifi="with WiFi"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d "$NSS_PATH" ]; then
|
||||
echo -n "CPU: ${cpu_usage}, NPU${wifi}: ${npu_usage}"
|
||||
echo -n "CPU: ${cpu_usage}, NPU: ${npu_usage}"
|
||||
else
|
||||
echo -n "CPU: ${cpu_usage}"
|
||||
fi
|
||||
Reference in new issue
Block a user