From 1ed911e61b2fca85a6816c4c3b46fdaba318999a Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Thu, 2 Apr 2026 20:43:48 -0500 Subject: [PATCH] fix: single-quote awk program in stuck_procs() collector The awk program was double-quoted inside the single-quoted COLLECTOR_SCRIPT, causing $1/$2/$3 to be expanded by the remote shell as empty positional parameters instead of awk field references. This made the D-state process filter silently match nothing. Co-Authored-By: Claude Opus 4.6 (1M context) --- monitoring/scripts/homelab-audit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitoring/scripts/homelab-audit.sh b/monitoring/scripts/homelab-audit.sh index 308f508..15d228c 100755 --- a/monitoring/scripts/homelab-audit.sh +++ b/monitoring/scripts/homelab-audit.sh @@ -79,7 +79,7 @@ zombie_count() { stuck_procs() { ps -eo stat=,pcpu=,comm= | \ - awk -v t="$STUCK_PROC_CPU_WARN" "$1 ~ /^D/ && $2+0 >= t+0 {print $3}" | \ + awk -v t="$STUCK_PROC_CPU_WARN" '\''$1 ~ /^D/ && $2+0 >= t+0 {print $3}'\'' | \ paste -sd, }