Conditional Debug

Conditional debugging is used to filter debugging messages:

R#debug condition ?
  application  Application
  called       called number
  calling      calling
  card         card
  glbp         interface group
  interface    interface
  ip           IP address
  mac-address  MAC address
  match-list   apply the match-list
  standby      interface group
  username     username
  vcid         VC ID
  vlan         vlan
  voice-port   voice-port number
  xconnect     Xconnect conditional debugging on segment pair

A quick example: filter RIP events only for interface Serial1/1.

We just need to enable a debug condition for interface S1/1:

R#debug condition interface s1/1

and enable rip events debug: R#debug ip rip events

The same feature is found on Cisco ASA code, like to filter a crypto debug to a specific peer:

ASA# debug crypto condition ?

  error      Display debug error messages regardless of filters
  group      Filter on a group name
  peer       Filter on a peer address or subnet
  reset      Clear the crypto debug filters
  spi        Filter on an IPSec SPI
  unmatched  Display messages with insufficient context to match a filter
  user       Filter on a user name

LINK on Cisco Doc-CD

 
comments powered by Disqus