[Xorp-users] traceoptions.

Kristian Larsson kristian@juniks.net
Tue, 21 Mar 2006 21:39:28 +0100


On Tue, Mar 21, 2006 at 12:24:19PM -0800, Pavlin Radoslavov wrote:
> > Hi!
> > 
> > While looking at Hassos patches I enabled the
> > traceoptions flag for ospf4...
> > right now it seems there is only one option, I
> > assume this will be expanded upon in the future
> > and additional flags will be added, right?
> 
> Yes. I believe the OSPF implementation supports internally a number
> of flags (see ospf/trace.hh), but currently only "all" is exported
> via the XRL/xorpsh interface.
Ahh, should be quite an easy fix then.

> > Is it possible to direct the output of a specific
> > trace to a file?
> 
> Not at this time, but eventually we should be able to do something
> like this in the future.
> For the time being you could redirect all output to a file and then
> use "grep" and friends to filter the output you want.
Yupp, already doing that :)

> > And would it be possible to add milliseconds to
> > the log file? When debugging SPF calculations it's
> > really nice to be able to the the exact time
> > something was performed.
> 
> Currently the default behavior in the log output is not to print
> anything smaller than a second, because typically you don't need
> this information and it will unnecessary make the log output more
> difficult to read.
Perhaps an option similar to Ciscos
service timestamp log <blablabla>
for changing this, but I too realize this is not
very high priority.
> 
> As a quick solution, you could replace the
> xlog_localtime2string_short() calls inside libxorp/xlog.c (lines
> 603, 611, 621 for xlog.c rev. 1.18) with xlog_localtime2string()
> which should print the microseconds as well.
Thanks.
> 
> Probably this replacement should be permanent for the
> XLOG_VERBOSE_HIGH case, but this should happen after
> XLOG_VERBOSE_LOW or XLOG_VERBOSE_MEDIUM replaces XLOG_VERBOSE_HIGH
> as the default verbosity level for all XORP processes.

  Kristian.