From 8d86f0fd95b7e1c93a433a944f8eba14b4793104 Mon Sep 17 00:00:00 2001 From: SamNet-dev Date: Tue, 3 Feb 2026 14:44:49 -0600 Subject: [PATCH] perf: Reduce tracker CPU overhead with snaplen and longer sync interval --- conduit.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conduit.sh b/conduit.sh index 05d8f17..ebd43c0 100644 --- a/conduit.sh +++ b/conduit.sh @@ -1821,7 +1821,7 @@ while true; do break fi fi - done < <($TCPDUMP_BIN -tt -l -ni any -n -q "(tcp or udp) and not port 22" 2>/dev/null | $AWK_BIN -v local_ip="$LOCAL_IP" ' + done < <($TCPDUMP_BIN -tt -l -ni any -n -q -s 96 "(tcp or udp) and not port 22" 2>/dev/null | $AWK_BIN -v local_ip="$LOCAL_IP" ' BEGIN { last_sync = 0; OFMT = "%.0f"; CONVFMT = "%.0f" } { # Parse timestamp @@ -1867,9 +1867,9 @@ while true; do to[dst] += len } - # Sync every 15 seconds + # Sync every 30 seconds if (last_sync == 0) last_sync = ts - if (ts - last_sync >= 15) { + if (ts - last_sync >= 30) { for (ip in from) { if (from[ip] > 0) print "FROM|" ip "|" from[ip] } for (ip in to) { if (to[ip] > 0) print "TO|" ip "|" to[ip] } print "SYNC_MARKER"