mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-18 22:22:54 +08:00
update 2026-07-29 01:22:16
This commit is contained in:
1 parent
be186a4d0b
commit
2e00a5e4eb
1957 files changed
+1523143
-2
No files matched your search
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
NSS_PATH="/sys/kernel/debug/qca-nss-drv/stats"
|
||||
|
||||
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 [ -d "$NSS_PATH" ]; then
|
||||
echo -n "CPU: ${cpu_usage}, NPU: ${npu_usage}"
|
||||
else
|
||||
echo -n "CPU: ${cpu_usage}"
|
||||
fi
|
||||
Reference in new issue
Block a user