forgot to put tcpdump in the background
@@ -10,7 +10,7 @@ FILTER="$5"
if [ $ITERS -gt "0" ]; then
COUNTER=0
while [ $COUNTER -lt $ITERS ]; do
- tcpdump -ni $NIC -s65535 -w 'trace_'"$ID"'_%Y-%m-%d_%H_%M_%S.pcap' $FILTER;
+ tcpdump -ni $NIC -s65535 -w 'trace_'"$ID"'_%Y-%m-%d_%H_%M_%S.pcap' $FILTER &
pid=$!
sleep $INTERVAL
kill $pid
@@ -20,7 +20,7 @@ if [ $ITERS -gt "0" ]; then
else # else do the capture until killed
while true
do
- tcpdump -ni $NIC -s65535 -w 'trace_'"$ID"'_%Y-%m-%d_%H_%M_%S.pcap' $FILTER;
+ tcpdump -ni $NIC -s65535 -w 'trace_'"$ID"'_%Y-%m-%d_%H_%M_%S.pcap' $FILTER &
pid=$!
sleep $INTERVAL
kill $pid
