From f98cd558cc118bee293241326e0927436c666a42 Mon Sep 17 00:00:00 2001 From: samjage Date: Sun, 19 Apr 2026 11:13:57 -0400 Subject: [PATCH] fix: use idle+iowait for accurate CPU usage, bump to 1.3 --- contents/stats.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contents/stats.sh b/contents/stats.sh index d9a619d..3793964 100644 --- a/contents/stats.sh +++ b/contents/stats.sh @@ -33,7 +33,7 @@ IFACE=$(awk 'NR>2{gsub(/:$/,"",$1); if($1!="lo") print $1, ($2+0)+($10+0)}' /pro [ -z "$IFACE" ] && IFACE="lo" # Helper functions for sampling -get_cpu() { awk 'NR==1{t=0; for(i=2;i<=NF;i++) t+=$i; print t, $6}' /proc/stat; } +get_cpu() { awk 'NR==1{t=0; for(i=2;i<=NF;i++) t+=$i; print t, $5+$6}' /proc/stat; } get_net() { awk -v d="$IFACE:" '$1==d{print $2, $10}' /proc/net/dev; } # First samples