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

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



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.