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

Re: [ns] reg the generation of output trace file!!






On Thu, 1 Feb 2001, Archana Krishna wrote:

> Hi,
> 
> Let me place the question again....
> 
> when i have a network like the one shown below....
> 
>    n1-
>       -
>        -
>         ----------n3-----------n4
>        -
>       -
>    n2-
> 
> 
> if i run a simulation the output trace generated generally looks like this....i.e if i am directing the output to out.tr , once the whole simulation is over out.tr will contain....
> 
> + 1.84375 0 2 cbr 210 ------- 0 0.0 3.1 225 610
> - 1.84375 0 2 cbr 210 ------- 0 0.0 3.1 225 610
> r 1.84471 2 1 cbr 210 ------- 1 3.0 1.0 195 600
> r 1.84566 2 0 ack 40 ------- 2 3.2 0.1 82 602
> + 1.84566 0 2 tcp 1000 ------- 2 0.1 3.2 102 611
> - 1.84566 0 2 tcp 1000 ------- 2 0.1 3.2 102 611
> r 1.84609 0 2 cbr 210 ------- 0 0.0 3.1 225 610
> + 1.84609 2 3 cbr 210 ------- 0 0.0 3.1 225 610
> d 1.84609 2 3 cbr 210 ------- 0 0.0 3.1 225 610
> - 1.8461 2 3 cbr 210 ------- 0 0.0 3.1 192 511
> r 1.84612 3 2 cbr 210 ------- 1 3.0 1.0 196 603
> + 1.84612 2 1 cbr 210 ------- 1 3.0 1.0 196 603
> - 1.84612 2 1 cbr 210 ------- 1 3.0 1.0 196 603
> + 1.84625 3 2 cbr 210 ------- 1 3.0 1.0 199 612
> 
> 
> But I am not interested in this sort of output.
> 
> what I am interested is to get 
> 
> + 1.84375 0 2 cbr 210 ------- 0 0.0 3.1 225 610
> 
> and then 
> 
> - 1.84375 0 2 cbr 210 ------- 0 0.0 3.1 225 610
> 
> as they are generated....
> 
> I am particular about this because as i get these lines, i want to send it to a routine where i want to calculate arrival and service envelopes.This routine will be implemented as a c module. So i want to see the output as they are generated.
> 
> Can you please let me know if this is possible and if so is it just changing the trace.cc like mentioned earlier.
> 
> Thanks a lot!!
> 

You could pipe it to an awk script to do the filter this then pipe it to
your c program, from the tcl script. I've done this, at some memory and
cpu expense... 

Altering the way tracing is done could work out if you wanted to suppress
some events, from being traced not to trace according to a, say, pair
src/dst.