Using trace CFM to Diagnose Problems

Use the following procedure to display trace information for CFM.

About this task

Use trace to observe the status of a software module at a certain time.

For example, if you notice a CPU utilization issue (generally a sustained spike above 90%) perform a trace of the control plane activity.

Use the trace level 120 <0–4> command to trace CFM module information, including CLI, instrumentation, show config, and platform dependent code. The CFM module ID is 120.

Use the trace cfm level <0–4> command to trace platform independent code and CFM protocol code.

Caution

Caution

Risk of traffic loss

Using the trace tool inappropriately can cause primary CPU lockup conditions, loss of access to the device, loss of protocols, and service degradation.

Procedure

  1. Enter Global Configuration mode:

    enable

    configure terminal

  2. Clear the trace:

    clear trace

  3. Begin the trace operation:

    trace cfm level <0-4>

    Wait approximately 30 seconds, and then stop trace.

  4. Stop tracing:

    trace shutdown

  5. View the trace results:

    show trace cfm

  6. Begin the trace operation for the CFM module:

    trace level 120 <0–4>

    Wait approximately 30 seconds, and then stop trace.

  7. View trace results:
    trace screen enable
    Important

    Important

    If you use trace level 3 (verbose) or trace level 4 (very verbose), do not use the screen to view commands due to the volume of information the system generates and the effect on the system.

  8. Save the trace file to the Compact Flash card for retrieval.

    save trace [file WORD<1–99>]

    If you do not specify a file name, the file name is systrace.txt. By default, the system saves the file to the external flash.

  9. Search trace results for a specific string value, for example, the word error:

    trace grep [WORD<0-128>]

    If you use this command and do not specify a string value, you clear the results of a previous search.

Example

Switch:1>enable
Switch:1#configure terminal
Switch:1(config)# clear trace
Switch:1(config)# trace cfm level 3
Switch:1(config)# trace shutdown
Switch:1(config)# show trace cfm
================================================================================
                                CFM Tracing Info
================================================================================
 Status    : Enabled 
 Level     : VERBOSE
Switch:1(config)#trace level 120 3
Switch:1(config)# save trace 
Switch:1(config)# trace grep error
Switch:1(config)#trace grep 00-1A-4B-8A-FB-6B

Variable Definitions

The following table defines parameters for the trace command.

Variable

Value

cfm level [<0-4>]

Starts the trace by specifying the level.
  • <0–4> specifies the trace level from 0–4, where 0 is disabled; 1 is very terse; 2 is terse; 3 is verbose, 4 is very verbose.

filter

Configures a filter trace for a file or module.

flags

Configures trace flags for IS-IS or OSPF.

grep [WORD<0-128>]

Searches 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.
  • <Module_ID> specifies the module for the trace. Different hardware platforms support different ID ranges because of feature support differences. To see which module IDs are available on the switch, use the show trace modid-list command or CLI command completion Help.

  • <0-4> specifies the trace level from 0–4, where 0 is disabled; 1 is very terse; 2 is terse; 3 is verbose, 4 is very verbose.

route-map

Enables or disables the trace route-map. The values are on and off.

screen {disable|enable}

Enables the display of trace output to the screen.

shutdown

Stops the trace operation.

spbm isis level [<0-4>]

Starts the trace by specifying the level.

  • <0-4> specifies the trace level from 0–4, where 0 is disabled; 1 is very terse; 2 is terse; 3 is verbose, 4 is very verbose.

The default is 1, very terse.

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:
  • a.b.c.d:<file>

  • x:x:x:x:x:x:x:x <file>

  • /intflash/<file>

  • /extflash/<file>

  • /usb/<file>

  • /mnt/intflash/ <file>

  • /mnt/extflash/ <file>

/mnt/intflash is the internal flash of the CPU.

/mnt/extflash is the external flash of the CPU.