Trace Management - Cisco

Transcription

CH APT ER10Trace Management Tracing Overview, page 10-1 How Tracing Works, page 10-1 Tracing Levels, page 10-2 Viewing a Tracing Level, page 10-3 Setting a Tracing Level, page 10-4 Viewing the Content of the Trace Buffer, page 10-4Tracing OverviewTracing is a function that logs internal events. Trace files containing trace messages are automaticallycreated and saved to the tracelogs directory on the hard disk: file system on the router, which storestracing files in bootflash:The contents of trace files are useful for the following purposes: Troubleshooting—Helps locate and solve an issue with the router. The trace files can almost alwaysbe accessed in diagnostic mode even though other system issues are occurring. Debugging—Helps obtain a more detailed view of system actions and operations.How Tracing WorksTracing logs the contents of internal events on the router. Trace files with all trace output for a moduleare 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 systemperformance. 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 messageShows the most recent trace information for a specific module. Can be used in privileged EXEC anddiagnostic modes. When used in diagnostic mode, this command can gather trace log information duringa Cisco IOS XE failure.set platform software traceSets a tracing level that determines the types of messages which are output. For more information ontracing levels, see the “Tracing Levels” section on page 10-2.Software Configuration Guide for the Cisco ISR 4400 SeriesOL-29328-0210-1

Chapter 10Trace ManagementTracing LevelsTracing levels determine how much information about a module should be stored in the trace buffer orfile.Table 10-1 shows all of the tracing levels that are available and provides descriptions of what types ofmessages are displayed with each tracing level.Table 10-1 Tracing Levels and DescriptionsTracing LevelLevel NumberDescriptionEmergency0The message is regarding an issue that makes thesystem unusable.Alert1The message is regarding an action that must betaken immediately.Critical2The message is regarding a critical condition.This is the default setting for every module onthe router.Error3The message is regarding a system error.Warning4The message is regarding a system warningNotice5The message is regarding a significant issue, butthe router is still working normally.Informational6The message is useful for informationalpurposes only.Debug7The message provides debug-level output.Verbose8All possible tracing messages are sent.Noise-All possible trace messages for the module arelogged.The noise level is always equal to the highestpossible tracing level. Even if a future enhancement to tracing introduces a higher tracing levelthan verbose level, the noise level will becomeequal to the level of the newly introduced tracinglevel.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 messagesfor 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 returnedto default values after the router reloads.CautionSetting the tracing level of a module to debug level or higher can have a negative performance impact.Software Configuration Guide for the Cisco ISR 4400 Series10-2OL-29328-02

Chapter 10Trace ManagementCautionSetting high tracing levels on a large number of modules can severely degrade performance. If a hightracing level is needed in a specific context, it is almost always preferable to set the tracing level of asingle module to a higher level rather than setting multiple modules to high levels.Viewing a Tracing LevelBy default, all modules on the router are set to 5 (notice). This setting will be maintained unless changedby a user.To see the tracing level for any module on the router, enter theshow 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 tracinglevels of the forwarding manager processes on the active RP:Router# show platform software trace level forwarding-manager rp activeModule NameTrace ether-channelNoticeevlibNoticeevutilNoticefile allocNoticefman te-mapNoticesbcNoticeservicesNoticesw wdogNoticetdl acl config typeNoticeSoftware Configuration Guide for the Cisco ISR 4400 SeriesOL-29328-0210-3

Chapter 10tdl acl db typetdl cdlcore messagetdl cef config common typetdl cef config typetdl dpidb config typetdl fman rp comm typetdl fman rp messagetdl fw config typetdl hapi tdl typetdl icmp typetdl ip options typetdl ipc ack typetdl IPsec db typetdl mcp comm typetdl mlp config typetdl mlp db typetdl om typetdl ui messagetdl ui typetdl urpf config typetdllibtrans avluihandleruipeeruistatusurpfvistawccpTrace ticeNoticeNoticeNoticeNoticeSetting a Tracing LevelTo set a tracing level for any module on the router, or for all modules within a process on the router, enterthe 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 ESPprocessor in slot 0 is set to “info”.set platform software trace forwarding-manager F0 acl infoViewing the Content of the Trace BufferTo view the trace messages in the trace buffer or file, enter theshow 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 areviewed using the show platform software trace message command:Router# show platform software trace08/23 12:09:14.408 [uipeer]: (info):08/23 12:09:14.408 [uipeer]: (info):08/23 12:09:14.399 [uipeer]: (info):08/23 12:09:14.399 [uipeer]: (info):08/23 12:09:14.398 [uipeer]: (info):08/23 11:53:57.440 [uipeer]: (info):slot 008/23 11:53:47.417 [uipeer]: (info):slot 0message host-manager R0Looking for a ui req msgStart of request handling for con 0x100a61c8Accepted connection for 14 as 0x100a61c8Received new connection 0x100a61c8 on descriptor 14Accepting command connection on listen fd 7Going to send a status update to the shell manager inGoing to send a status update to the shell manager inSoftware Configuration Guide for the Cisco ISR 4400 Series10-4OL-29328-02

Chapter 10Trace ManagementSoftware Configuration Guide for the Cisco ISR 4400 SeriesOL-29328-0210-5

Chapter 10Trace ManagementSoftware Configuration Guide for the Cisco ISR 4400 Series10-6OL-29328-02

CHAPTER 10-1 Software Configuration Guide for the Cisco ISR 4400 Series OL-29328-02 10 Trace Management Tracing Overview, page 10-1 † How Tracing Works, page 10-1 † Tracing Levels, page 10-2 † Viewing a Tracing Level, page 10-3 † Setting a Tracing Level, page 10-4 † Viewing the Content of the Trace Buffer, page 10-4 Tracing Overview Tracing is a function that logs internal events.