From c9fac1ce85a976d1073fd56c9b203650628c36b0 Mon Sep 17 00:00:00 2001 From: andreastaliad Date: Fri, 22 May 2026 20:38:41 +0300 Subject: [PATCH] maybe fixed fork logging --- run_all_experiments.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/run_all_experiments.sh b/run_all_experiments.sh index 07036ff..4dd603e 100644 --- a/run_all_experiments.sh +++ b/run_all_experiments.sh @@ -14,13 +14,13 @@ log() { } count_processes() { - find /proc -maxdepth 1 -type d -regex '/proc/[0-9]+' 2>/dev/null | wc -l + # Avoid find -regex portability issues (busybox) by using globbing on /proc. + ls -d /proc/[0-9]* 2>/dev/null | wc -l } count_threads_total() { - find /proc -maxdepth 2 -type f -regex '/proc/[0-9]+/status' -print0 2>/dev/null \ - | xargs -0 awk '/^Threads:/ {sum+=$2} END {print sum+0}' 2>/dev/null \ - || echo 0 + # Sum Threads: from all /proc//status entries. + awk '/^Threads:/ {sum+=$2} END {print sum+0}' /proc/[0-9]*/status 2>/dev/null || echo 0 } get_mem_kb() {