[Click] nsclick wireless traces etc
David Bath
david.bath at triaddo.com
Mon Feb 26 13:39:03 EST 2007
Hi Mike,
Many thanks for your reply. Much appreciated. With a little help from
the guys on the ns list, I've spent the afternoon doing a bit of
debugging, and put a very tiny (and horrible) hack in. Essentially the
problem seems to stem from something probably in ns-clicknode.tcl
unsetting (or not honouring) the newtrace setting. I too found the
mobility-trace bit, and tried adding it to ClickNode, but it didn't make
a difference - I suspect there are bigger issues at play.
In the end, I just modified cmu-trace.cc around line 115ish, and forced
newtrace_ 1 instead of the default 0.
I tried doing it more elegantly in tcl (ns-default, ns-lib etc) but
nothing made a difference. I suspect something in ClickNode is
unsetting it somehow.
It works for now, and I get new trace format output, complete with the
mobility (which is on by default for newtrace), but I do get the feeling
its hanging by a thread...
I'll let you know the outcomes!
Best Regards,
Dave
-----Original Message-----
From: Michael Neufeld [mailto:mneufeld at bbn.com]
Sent: 26 February 2007 18:21
To: David Bath
Cc: click at amsterdam.lcs.mit.edu
Subject: Re: [Click] nsclick wireless traces etc
Hi-
OK, I've done a little poking around, though my memories of the tracing
code are
a little dim at this point... One thing that seems like it'd be worth
checking
out is the difference between the MobileNode TCL code and the ClickNode
TCL code
(in ns-mobilenode.tcl and ns-clicknode.tcl respectively). Specifically
I'm
seeing some calls to mobility-trace in the MobileNode code that aren't
in the
ClickNode code, e.g. in the add-interface method. It looks like
mobility-trace
has some effect on setting "newtrace" if I'm reading things correctly.
The
"add-interface" method was constructed using "copy/paste/modify" so it
is
especially vulnerable to changes in the mainline ns-2 code. Best of luck
with
this, as I recall getting the tracing code to work in the original
nsclick patch
gave me a fair bit of grief before I got things going. I'm not in a
position to
spend a whole lot of time on nsclick issues at this point, but
definitely feel
free to drop a line with questions -- I'll do my best to answer.
-Mike
David Bath wrote:
> Hey List,
>
> Sorry, me again. I've done a bit of ns debugging, and in cmu-trace.cc
> (which seems to handle the tracing) there's a function
CMUTrace::command
> which is responsible for setting the newtrace variable.
>
> CMUTrace::command(int argc, const char*const* argv) {
>
> if(argc == 3) {
> if(strcmp(argv[1], "node") == 0) {
> node_ = (MobileNode*)
> TclObject::lookup(argv[2]);
> if(node_ == 0)
> return TCL_ERROR;
> return TCL_OK;
> }
> if (strcmp(argv[1], "newtrace") == 0) {
> newtrace_ = atoi(argv[2]);
> return TCL_OK;
> }
> }
> return Trace::command(argc, argv);
> }
>
> However, although it's being called, argv[1] is always "namattach" or
> "attach" or "target", so the newtrace_ variable is never set.
>
> Any thoughts would be much appreciated!
>
> Best Regards,
>
> Dave
>
> -----Original Message-----
> From: click-bounces at pdos.csail.mit.edu
> [mailto:click-bounces at pdos.csail.mit.edu] On Behalf Of David Bath
> Sent: 25 February 2007 21:26
> To: click at pdos.csail.mit.edu
> Subject: Re: [Click] nsclick wireless traces etc
>
> Hi List,
>
> A small update on this. I've been working today to try and find a
more
> precise set of conditions. It seems I can't produce a new trace
format
> if I use the a mobile node of type Click.
>
> As suggested in the nsclick papers, I am using
>
> Simulator set node_factory_ Node/MobileNode/ClickNode
>
> As soon as I do that, the use-newtrace directive appears to be being
> ignored.
>
> I can't really find out a sensible combination of options to get more
> precise than this - purely that something about using a ClickNode
> prohibits traces in the new format.
>
> Any thoughts very gratefully received!
>
> Best Regards,
>
> Dave
>
> -----Original Message-----
> From: click-bounces at pdos.csail.mit.edu
> [mailto:click-bounces at pdos.csail.mit.edu] On Behalf Of David Bath
> Sent: 25 February 2007 01:17
> To: click at pdos.csail.mit.edu
> Subject: [Click] nsclick wireless traces etc
>
> Hi List,
>
> This may be the wrong place, but the nsclick lists appear to have
moved
> and I haven't managed to track them down. Please feel free to
redirect
> me if this is best answered somewhere else.
>
> I've been working with ns(2.3) and latest[checked out a few days ago]
> click(cvs).
>
> As far as I can tell, basic features are working fine. However, I'm
> having some problems with the trace format.
>
> I've tried the well documented:
>
> set tracefd [open "<filename>" w]
> $ns_ use-newtrace
> $ns_ trace-all $tracefd
>
> But the trace file comes out in the old format still.
>
> I also don't quite understand how the ClickNode factory works. Is the
> standard mobilenode creation process triggered?
>
> i.e. is $ns_ node-config .... etc valid syntax? (I ask because setting
> movementTrace ON like this seems to make no difference).
>
> Any help would be gratefully received. I seem to have run dry on web
> resources on this issue (at least, I am supposing it's an nsclick
thing
> as the standard instructions for ns don't seem to work).
>
> Cheers,
>
> Dave Bath
> University of Bristol
>
>
>
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>
--
*******************************
Michael J. Neufeld, Ph.D.
Network Scientist
BBN Technologies
10 Moulton St.
Cambridge, MA 02138
http://www.bbn.com
*******************************
More information about the click
mailing list