update 2026-07-20 18:46:24

This commit is contained in:
action committed 2026-07-20 18:46:24 +08:00
1 parent bd9db3ef54
commit 614eca2bea
1957 files changed
+1523142 -1

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
#!/bin/sh
if [ $(busybox ps -w | grep getcpu | grep -v grep | wc -l) -le 2 ]; then
AT=$(cat /proc/stat | grep "^cpu " | awk '{print $2+$3+$4+$5+$6+$7+$8 " " $2+$3+$4+$7+$8}')
sleep 1
BT=$(cat /proc/stat | grep "^cpu " | awk '{print $2+$3+$4+$5+$6+$7+$8 " " $2+$3+$4+$7+$8}')
printf "%.01f%%" $(echo $AT $BT | awk '{print (($4-$2)/($3-$1))*100}') >/tmp/cpuusage
fi