Use Trace to Diagnose Problems
Use trace to observe the status of a software module at a given time.
About this task
For example, if you notice a CPU utilization issue (generally a sustained spike above 90%) perform a trace of the control plane activity.
Procedure
Example
Switch:1> enable
Clear the trace:
Switch:1# clear trace
Identify the module ID for which you want to use the trace tool:
Switch:1# show trace modid-list
0 - COMMON 1 - SNMP 2 - RMON 3 - PORT_MGR 4 - CHAS_MGR 5 - BRIDGE 6 - HWIF 7 - SIM 8 - CPP 9 - NETDRV 10 - VLAN_MGR 11 - CLI 12 - MAIN 12 - P2IP 12 - RCIP 15 - WEBSRV 16 - ACIF 17 - GBIF 18 - WDT 19 - TDP 20 - MAN_DIAG 21 - MAN_TEST --More-- (q = quit)
Begin the trace operation:
Switch:1# trace level 2 3
Stop tracing:
Switch:1# trace shutdown
Save the trace file to the internal flash card for retrieval:
Switch:1# save trace
Search trace results for a specific string value, for example, the word error:
Switch:1# trace grep error
Search trace results for a specific string value, for example, MAC address 00-1A-4B-8A-FB-6B:
Switch:1# trace grep 00-1A-4B-8A-FB-6B
Variable Definitions
The following table defines parameters for the trace command.
Variable |
Value |
---|---|
grep [WORD<0-128>] |
Search trace results for a specific string value, for example, the word error. Performs a comparison of trace messages. |
level [<Module_ID>] [<0-4>] |
Starts the trace by specifying the module ID and level.
|
shutdown |
Stops the trace operation. |
screen {disable|enable} |
Enables the display of trace output to the screen. |
The following table defines parameters for the save trace command.
Variable |
Value |
---|---|
file WORD<1–99> |
Specifies the file name in one of the following formats:
|