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

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



Well, then you have to change the source

Debo

On Thu, 1 Feb 2001, Archana Krishna wrote:

> Hi,
>  
> Your solution assumes that the out.tr is generated.
> But I dont want to wait till the out.tr is generated.
> 
> Say I have a pair src and dst, I want to know the time when a packet arrives at the src and the time it reaches the dst. I want it instantaneously not until the whole simulation is performed.... as far as I know if i try out your awk script it will just filter out from the generated out.tr .....  when do i run this script....do you mean after the whole simulation is performed. 
> 
> I need to perfrom some admission control decisions as flows enter the network....hence I need the arrival times of the packet at the src and the time it reaches the dst instantaneously i.e. as it happens .... not after the whole simulation is performed.
> 
> Thanks for your help....
> 
> Arch
> 
>  
> ------------------------------------------------------
> 
> On Thu, 1 Feb 2001 10:31:11   
>  Debojyoti Dutta wrote:
> >An easier solution to do this to write a simple awk script. A skeleton
> >would be like this
> >
> >awk -f out.tr '$3=="0" && $4=="2" { print ;}' > foo.tr
> >
> >Cheers
> >Debo
> >
> >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!!
> >> 
> >> -------------------------------------------------------
> >> 
> >> On Wed, 31 Jan 2001 05:24:35  
> >>  kunchanl wrote:
> >> >Oops...I thought he just wanted to print the trace file
> >> >contents to stdout...sorry for my oversight.
> >> >
> >> >Kun-chan Lan
> >> >
> >> >On Wed, 31 Jan 2001, Lloyd Wood wrote:
> >> >
> >> >> On Tue, 30 Jan 2001, kunchanl wrote:
> >> >> 
> >> >> > I think you can modify either trace.cc or cmu-trace.cc(for
> >> >> > wireless)to get what you want.
> >> >> 
> >> >> Well, no. That won't do it by itself.
> >> >> 
> >> >> A while back I looked at interfacing ns to something else; I had the
> >> >> crazy idea of parsing a custom ns tracefile as it was written and
> >> >> feeding stuff back into ns as sets of here's-one-we-prepared-earlier
> >> >> Tcl routines that would be executed inside a scheduled trace
> >> >> procedure to schedule future events; basically sourcing the execution
> >> >> of the program (commands followed by the next scheduled time to
> >> >> read stdin) from stuff fed into stdin.
> >> >> 
> >> >> Nasty, but hey, it's all just pipes - or parsing your own
> >> >> fully-recorded transaction logs each way, as your control program
> >> >> reads the custom ns tracefile of events thus far and writes a command
> >> >> log to change or reschedule the future before scheduling the next read
> >> >> of said log, and ns writes its tracefile and reads the command log to
> >> >> get more future events to schedule.
> >> >> 
> >> >> So tracefiles can be useful for control. And all you have to do is
> >> >> schedule a procedure to start sourcing from stdin at time 0, and
> >> >> you've pretty much bootstrapped this monstrosity.
> >> >> 
> >> >> That's not what would be ideal here, since the control decisions are
> >> >> entirely internal to ns and nothing to do with e.g. some corba
> >> >> management thing. But it strikes me as possibly a hell of a lot easier
> >> >> than rewriting chunks of ns to do so; see the custom tracefile, don't
> >> >> like the output traffic you see from an agent, write out the Tcl
> >> >> instructions to schedule a command to kill that agent asap. (There are
> >> >> possibly some very neat ways of doing this - especially if you're
> >> >> using an otcl interpreter - depending on how you design your tracefile
> >> >> format, which can be separate and parallel to the usual trace-all
> >> >> via minor hackery of trace.cc.)
> >> >> 
> >> >> I'd rather try a hack like that than have to try and figure out how to
> >> >> get a queue or classifier to safely kill an agent on a different
> >> >> node... but since you could be waiting on further scheduled input,
> >> >> simulation time could be _slow_.
> >> >> 
> >> >> L.
> >> >> 
> >> >> has no idea if they ever actually got around to implementing this.
> >> >> 
> >> >> <[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>
> >> >> 
> >> >> 
> >> >> > Kun-chan Lan
> >> >> > 
> >> >> > On Tue, 30 Jan 2001, Archana Krishna wrote:
> >> >> > >
> >> >> > > When a tcl code is written and simulation is performed, a trace
> >> >> > > file containing the output simulation is generated.
> >> >> > > 
> >> >> > > I need to perform some admission control decisions as flows are
> >> >> > > generated by the sources as to whether they should be admitted
> >> >> > > into the network. For this I would want the output to be viewed as
> >> >> > > they are generated and not wait until the whole trace file is
> >> >> > > generated....
> >> >> > > 
> >> >> > > Can anyone of you please let me know if its possible in ns and
> >> >> > > if so how to go about implementing it.
> >> >> > > 
> >> >> > > Thanks for your help
> >> >> > > Arch.
> >> >> 
> >> >> 
> >> >
> >> >
> >> 
> >> 
> >> Get your small business started at Lycos Small Business at http://www.lycos.com/business/mail.html
> >> 
> >> 
> >
> >
> 
> 
> Get your small business started at Lycos Small Business at http://www.lycos.com/business/mail.html
>