[ILUG] [Possibly OT] Network Traffic Analysis and InterfaceControl

Hamilton, David (TSG C&I) david.hamilton3 at hp.com
Fri Feb 24 10:03:57 GMT 2006


The 'tail -6 | head -5 ' was to take the last 5 lines of actual data and
lose the line of ================================ at the bottom :-)
Not the most scientific solution I'm sure, but serves its purpose.
The (tr ',\n' + echo 0) put's each of the entries on a new line, so even
if I did use the awk statement you suggest, I'd still need something
like it. (I think)

	D.

-----Original Message-----
From: Paul Jakma [mailto:paul at clubi.ie] 
Sent: 23 February 2006 19:26
To: Hamilton, David (TSG C&I)
Cc: Irish Linux Users Group
Subject: RE: [ILUG] [Possibly OT] Network Traffic Analysis and
InterfaceControl

On Thu, 23 Feb 2006, Hamilton, David (TSG C&I) wrote:

> Thanks Padraig,
>
> I changed it a little bit, but you got me going in the right
direction.

> Just in case anyone is interested, the 5 minute error count will be 
> calculated with this:
>
> tethereal -t ad -T text -r capture.dat -z 
>
"io,stat,60,COUNT(tcp.analysis.retransmission)tcp.analysis.retransmissio
n,COUNT(tcp.analysis.window_full)tcp.analysis.window_full,COUNT(tcp.anal
ysis.zero_window)tcp.analysis.zero_window,COUNT(tcp.analysis.duplicate_a
ck)tcp.analysis.duplicate_ack"
> -q |tail -6 |head -5 |awk '{ print $2 "," $3 "," $4 "," $5 }' | (tr 
> ',\n' + && echo 0) |bc

Ouch, what's the tail -6 | head -5 for? That and the tr and bc is quite
redundant:

awk ' <pattern to be determined - depends on what this tail/head
business is about> { print $2 + $3 + $4 + $5 }'

regards,
-- 
Paul Jakma	paul at clubi.ie	paul at jakma.org	Key ID: 64A2FF6A
Fortune:
Teutonic:
 	Not enough gin.



More information about the ILUG mailing list