tcpdump mailing list archives

Re: how to get total packets length by tcpdump


From: alex medvedev <alexm () pycckue org>
Date: Mon, 8 Mar 2004 17:56:07 -0600 (CST)

hi,

this is a very rough regex and you may have to tweak it but it worked for
me :)

# tcpdump -v -r tcpdump-raw.dump tcp | grep "length:" |grep -v
"^[^0-9]" | sed s/.*length:// | cut -d')' -f 1 | awk '{sum+=$1; print
sum}'

all in one line.
the last number is the answer.

-alexm
17:51 08/03/2004

On Mon, 8 Mar 2004 wcai () gmu edu wrote:

Greetings,

Is there any simple way to calculate the total length (in bytes) of  all tcp packets in a tcpdump file? I mean, is it 
possible that I can do this by adding some options to tcpdump?

WC

-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:tcpdump-workers-request () tcpdump org?body=unsubscribe


-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:tcpdump-workers-request () tcpdump org?body=unsubscribe


Current thread: