There are two types of trace statement: traceoptions and tracefile.
The traceoptions trace statement controls tracing options.
gated's tracing options may be
configured at many levels. Tracing options include the file specifications,
control options, and global and protocol-specific tracing options. Unless
overridden, tracing options from the next higher level are inherited by lower
levels. For example, BGP peer tracing options are
inherited from BGP group tracing options, which are
inherited from global BGP tracing options, which
are inherited from global gated tracing options. At each level,
tracing specifications override the inherited options.
Tracing options are:
all
Turn on all of the tracing options below except nostamp.
none
Turn off all tracing options.
general
Turn on internal, external, and route.
internal
Internal errors and informational messages.
external
External errors.
nostamp
Do not timestamp all messages in the tracefile.
mark
Output a message to the tracelog every
10 minutes to ensure gated is still running.
task
Task scheduling, signal handling, and packet reception.
timer
Timer scheduling.
parse
Trace the lexical analyzer and parser. Mostly used by gated developers
for debugging.
Tokens the parser recognizes in the configuration file.
route
Changes to the gated routing table.
kernel
Changes to the kernel's routing table.
bgp
BGP packets sent and received.
May be modified by update and protocol.
egp
EGP packets sent and received.
May be modified by update and protocol.
rip
RIP packets sent and received.
May be modified by update.
icmp
ICMP redirect packets sent and received.
May be modified by update.
Note that redirects processed are traced under the route option.
snmp
SNMP packets sent and received. May
be modified by update.
protocol
Provide messages about protocol state
machine transitions when used with EGP, BGP,
or OSPF.
update
Trace the contents of protocol packets.
Not all of the above options apply to all of the protocols.
In some cases, their use does not make sense.
When protocols inherit their tracing options from the global tracing options,
tracing levels that don't make sense (such as parse
tracing options) are masked out.
Global tracing statements have an immediate effect, especially parsing options
that affect the parsing of the configuration file. Tracing values inherited by
protocols specified in the configuration file are initially inherited from the
global options in effect as they are parsed, unless they are overridden by more
specific options.
After the configuration file is read, tracing options that were
not explicitly specified are inherited from the global options in effect at the
end of the configuration file.
specifies the file to receive tracing information. If this filename does
not begin with a slash (/), the directory where gated was started is
prepended to the name.
replace
specifies that tracing should start by replacing an existing file.
The default is to append to an existing file.
size size[k|m] files files
limits the maximum size of the tracefile to the specified size (minimum
10k). When the tracefile reaches the specified size, it is renamed to
file.0, then file.1, then file.2 up to the maximum number of files
(minimum specification is 2).