[Xorp-users] traceoptions.

Pavlin Radoslavov pavlin@icir.org
Tue, 21 Mar 2006 12:24:19 -0800


> 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.

> 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.

> 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.

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.

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.

Pavlin