Change in osmo-ttcn3-hacks[master]: ttcn3-tcpdump-start.sh: reduce snaplen of tcpdump

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue May 15 20:54:54 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/9176 )

Change subject: ttcn3-tcpdump-start.sh: reduce snaplen of tcpdump
......................................................................

ttcn3-tcpdump-start.sh: reduce snaplen of tcpdump

Improve speed of tcpdump startup. -s 0 sets the snaplen is 256k.
tcpdump will request the snaplen multiplied by the buffer as
a contigous buffer in the kernel. This could lead to higher
start time.

Change-Id: I8a372e71798b366faa3b723573c60de6e8fd128f
---
M ttcn3-tcpdump-start.sh
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/ttcn3-tcpdump-start.sh b/ttcn3-tcpdump-start.sh
index 7321b52..395941d 100755
--- a/ttcn3-tcpdump-start.sh
+++ b/ttcn3-tcpdump-start.sh
@@ -20,7 +20,7 @@
 else
 	CMD="sudo $TCPDUMP"
 fi
-$CMD -U -s 0 -n -i any -w "$TTCN3_PCAP_PATH/$TESTCASE.pcap" >$TTCN3_PCAP_PATH/$TESTCASE.pcap.stdout 2>&1 &
+$CMD -U -s 1500 -n -i any -w "$TTCN3_PCAP_PATH/$TESTCASE.pcap" >$TTCN3_PCAP_PATH/$TESTCASE.pcap.stdout 2>&1 &
 PID=$!
 echo $PID > $PIDFILE
 
@@ -31,7 +31,7 @@
 PID=$!
 i=0
 while [ ! -f "$TTCN3_PCAP_PATH/$TESTCASE.pcap" ] ||
-      [ "$($TCPDUMP -r "$TTCN3_PCAP_PATH/$TESTCASE.pcap" 2>/dev/null | wc -l)" -eq 0 ]
+      [ "$(stat -c '%s' "$TTCN3_PCAP_PATH/$TESTCASE.pcap")" -eq 32 ]
 do
 	echo "Waiting for tcpdump to start... $i"
 	sleep 1

-- 
To view, visit https://gerrit.osmocom.org/9176
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I8a372e71798b366faa3b723573c60de6e8fd128f
Gerrit-Change-Number: 9176
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180515/b445b852/attachment.htm>


More information about the gerrit-log mailing list