26-12
Catalyst 2940 Switch Software Configuration Guide
78-15507-02
Chapter26 Troubleshooting
Using Debug Commands
Enabling Debugging on a Specific Feature
All debug commands are entered in privileged EXEC mode, and most debug commands take no
arguments. For example, beginning in privileged EXEC mode, enter this c om mand t o en abl e th e
debugging for EtherChannel:
Switch# debug etherchannel
The switch continues to generate output until you enter t he no form of the command.
If you enable a debug command and no output appears, consi d er t hese possi biliti es:
The switch might not be properly configured to generate the type of t raffic that you want to monitor.
Use the show running-config command to verify the configuration.
Even if the switch is properly configured, it might not generate the type of traffic that you want to
monitor during the particular period that debugging is enabled. Depending on the featur e you are
debugging, you can use commands such as the TCP/IP ping command to generate net work t raffic.
To disable debugging of SPAN, enter this command in privileged EXEC mode:
Switch# no debug etherchannel
Alternately, in privileged EXEC mode, you can enter the undebug form of the command:
Switch# undebug etherchannel
To display the state of each debugging option, enter this command in privileged EXEC mode:
Switch# show debugging
Enabling All-System Diagnostics
Beginning in privileged EXEC mode, enter this command to enable all-system diagnostics:
Switch# debug all
Caution Because debugging output takes priority over other network traffic, and because the debug all privileged
EXEC command generates more output than any other debug command, it can severely diminish switch
performance or even render it unusable. In virtually all cases, it is best to use more specific debug
commands.
The no debug all privileged EXEC command disables all diagnostic output. Using the no debug all
command is a convenient way to ensure that you have not accidentally left any debug commands
enabled.
Redirecting Debug and Error Message Output
By default, the network server sends the output from debug commands and system error messages to the
console. If you use this default, you can use a virtual terminal connection to monitor debug output
instead of connecting to the console port.
Possible destinations include the console, virtual terminals, internal buffer, and UNIX hosts running a
syslog server. The syslog format is compatible with 4.3 Berkeley Standard Distribution (BSD) UNIX
and its derivatives.