Trace Options
The trace command controls Advanced Routing Suite’s tracing options. These options can be configured at many levels.
Trace Options Overview
Tracing options include:
- file specifications
- global tracing options
- 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 Advanced Routing Suite tracing options. At each level, additional tracing specifications override the inherited options.
Global tracing configurations have an immediate effect. Tracing values inherited by protocols specified in a configuration are initially inherited from the global options that are currently in effect as the protocol configuration entries are entered, unless they are overridden by more specific options.
The file options in subsequent trace configurations with the same file name modify the previously set values for the files.
trace file
Name
trace file - specifies the file to receive tracing information, the size of the file, whether to overwrite existing files, and the maximum number of files allowed
Syntax
trace file file_name [no-timestamp ||
overwrite]?
no trace file file_name [no-timestamp ||
overwrite]?
Mode
Global Configuration
Parameters
file_name - specifies the name of the file to receive the tracing information. Note that the file name is not specified in quotes.
no-timestamp - specifies that a timestamp should not be prepended to all trace lines
overwrite - specifies to begin tracing by appending or truncating an existing file
Description
This command specifies a file for tracing of all protocols. The negative form of this command disables this tracing. The specific events that are traced are controlled by the trace flag command. The trace file command is also associated with each protocol, so that information pertaining to a single protocol can be written to its own file.
The no-timestamp option disables the pre-pending of a timestamp to all lines written to the trace file. The default is to prepend a timestamp to all lines written to a trace file.
The overwrite option specifies whether to start tracing by truncating or appending to an existing file.
Note: These options are not cumulative across multiple commands.
Default
Global tracing options are not configured by default.
Command History
NGC 2.2 - This command was introduced.
Examples
In the following example, tracing is written to the file "gated.log". No timestamp will display at the beginning of the trace lines.
(config)# trace file gated.log no-timestamp
trace flag
Name
trace flag - specifies global tracing options that are common across all protocols
Syntax
trace flag ( [ route | normal | state | policy | task |
timer | all ] )
no trace flag ( [ route | normal | state | policy | task |
timer | all ] )
Mode
Global Configuration
Parameters
[ route | normal | state | policy | task | timer | all ] - These tracing flags are common to all protocols. They cannot be associated with a send, receive, or send-receive action item. Similarly, you cannot specify to show detailed information when tracing these flags. These flags are defined as follows:
route - trace routing table changes for routes installed by this protocol or peernormal - trace normal protocol occurrences. Note: Abnormal protocol occurrences are always traced.state - trace state machine transition in the protocolpolicy - trace the application of protocol and user-specified policy to routes being imported or exportedtask - trace system interface and processing associated with this protocoltimer - trace timer usage by this protocolall - turns on all trace flags
Description
Use the trace flag command to specify global tracing flags. Each flag must reside on its own configuration line. For example, you cannot specify to trace both task and policy packets in the same command.
Default
The default is for no flags to be explicitly configured.
Command History
NGC 2.2 - This command was introduced.
Examples
In the following example, flags specify to trace both timer usage and state machine transition. This tracing information will be written to the file gated.log.
(config)# trace file gated.log
(config)# trace flag timer
(config)# trace flag state
|