Ethereal-users: Re: [Ethereal-users] Line data flow computation

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Sebastian Felis <felis@xxxxxxxxxxxxx>
Date: Thu, 11 Nov 2004 10:18:06 +0100
On Wed, 2004-11-10 at 18:22, Morel Olivier FRF wrote:
> I have a bunch of Ethereal traces for a client/server application. 
> Each trace in a separate file. 
> This was very useful to understand the application behaviour. 
> 
> Now, I need to know the trafic generated on the line (in kbits) by this
> application, in order to dimension the network. 
> 
> Is there a simple way to compute it from my Ethereal files (PCAP format) ? 
> Alternatively, is there a rule-of-thumb to estimate it from the size of the
> file ? 
> 
> I am using Ethereal + WinPcap on a Windows NT PC. 

tehtereal's option -z io,stat is very usefull for offline statistics.

tethereal -q -r capture.dump -z io,stat,1,ip.len


For live capturing I'm using tethereal with a -z proto,colinfo list of
interessted protocol fields, parse it by a perl script and calculate
some data. 

for example (live capturing):

tethereal -ln -z proto,colinfo,ip.len,ip.len -R "ip.addr==10.1.2.32" | \
perl -ne '
if (m/ip\.len == (\d+)/) { 
	$size+=$1; 
} 
if (time-$last) { 
	print "$size bytes/sec\n"; 
	$last=time; 
	$size=0; 
}'


Maybe this helps

Sebastian