[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] Re: Fw: How can I calculate the packet loss of one flow(session) on the run timeRe: Re: [ns] packet loss!





Huan Pham wrote:

> Brian Lee Bowers wrote:
>
> > On Thursday 21 June 2001 12:57, liu yong wrote:
> > > Hi,
> > >   How can I calculate the packet loss of one flow(session) on the
> > > running time.I know I can get this information by proprocesstion
> > > the trace file.My problem is how to know it in the running
> > > time.Thank for your help.
> >
> > Several methods come to mind for determining number of packets lost
> > for a flow:
> >
> > 1)  parse the trace file.  This is fairly simple with Perl.
> > Depending on how much of the information you need, the regular
> > expressions can get a little nasty looking, but they aren't difficult.
> >
>
> If I use TraceAll file, then the file size get as big as 1Gbyte. Currently
> I read all the data to an array and process it, and RAM size is a problem,
> not the Harddisk size.  I can not think of any other better algorithm that
> does not read all the data to an array and process it. For example, if it
> just reads a short chunk of data, processes them and read another.  The
> algorithm must be very complicated .
>

I just found out how to solve this problem, not by parsing the trace file, but
by using a pipe. It worked out to be much easier than I thought. And it does
not requires big memory.

Thanks.