-
null
The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
Tracing is a function that logs internal events. Trace files containing trace messages are automatically created and saved to the tracelogs directory on the hard disk: file system on the router, which stores tracing files in bootflash:
The contents of trace files are useful for the following purposes:
Tracing logs the contents of internal events on the router. Trace files with all trace output for a module are periodically created and updated and are stored in the tracelog directory.
Trace files can be erased from this directory to recover space on the file system without impacting system performance. The files can be copied to other destinations using file transfer functions (such as FTP, TFTP) and opened using a plain text editor. Tracing cannot be disabled on the router.
show platform software trace message
Shows the most recent trace information for a specific module. Can be used in privileged EXEC and diagnostic modes. When used in diagnostic mode, this command can gather trace log information during a Cisco IOS XE failure.
Sets a tracing level that determines the types of messages which are output. For more information on tracing levels, see the “Tracing Levels” section.
Tracing levels determine how much information about a module should be stored in the trace buffer or file.
Table 10-1 shows all of the tracing levels that are available and provides descriptions of what types of messages are displayed with each tracing level.
Table 10-1 Tracing Levels and Descriptions
If a tracing level is set, messages are collected from both lower tracing levels and from its own level.
For example, setting the tracing level to 3 (error) means that the trace file will contain output messages for levels: 0 (emergencies), 1 (alerts), 2 (critical), and 3 (error).
If you set the trace level to 4 (warning) this results in output messages for levels: 0 (emergencies), 1 (alerts), 2 (critical), 3 (error), and 4 (warning).
The default tracing level for every module on the router is 5 (notice).
A tracing level is not set in a configuration mode, which results in tracing level settings being returned to default values after the router reloads.
By default, all modules on the router are set to 5 (notice). This setting will be maintained unless changed by a user.
To see the tracing level for any module on the router, enter the
show platform software trace level
command in privileged EXEC or diagnostic mode.
In the following example, the show platform software trace level command is used to view the tracing levels of the forwarding manager processes on the active RP:
To set a tracing level for any module on the router, or for all modules within a process on the router, enter the set platform software trace privileged EXEC and diagnostic mode command.
In the following example, the tracing level for the ACL module in the Forwarding Manager of the ESP processor in slot 0 is set to “info”.
To view the trace messages in the trace buffer or file, enter the
show platform software trace message
command in privileged EXEC or diagnostic mode.
In the following example, the trace messages for the Host Manager process in Route Processor slot 0 are viewed using the show platform software trace message command: