|
This appendix provides an overview of the debug commands that might be helpful when troubleshooting your switch router.
This appendix consists of the following sections:
Use debug commands to isolate problems, not to monitor normal network operation. Because the high overhead of debug commands can disrupt switch router operation, use debug commands only when you are looking for specific types of traffic or problems and have narrowed your problems to a likely subset of causes.
Output formats vary with each debug command. Some generate a single line of output per packet, and others generate multiple lines of output per packet. Some generate large amounts of output, and others generate only occasional output. Some generate lines of text, and others generate information in field format.
Follow these steps to minimize the negative impact of using debug commands:
Step 2 Use Telnet to connect to a switch router port, and enter the enable EXEC command.
Step 3 Use the terminal monitor command to copy debug command output and system error messages to your current terminal display.
As a result, you can view debug command output remotely, without being connected through the console port.
Because the console port no longer has to generate character-by-character processor interrupts, following this procedure minimizes the load created by using debug commands.
If you intend to keep the output of the debug command, spool the output to a file. The procedure for setting up such a debug output file is described in the Cisco IOS Debug Command Reference publication. This publication provides complete details regarding the function and output of debug commands, and includes specific debug commands that are useful when troubleshooting specific problems.
This section explains how to diagnose and resolve internetworking problems by using debug commands, and covers the following topics:
All debug commands are entered in privileged EXEC mode, and most debug commands take no arguments. For example, to enable the debug atm packet command, enter the following in privileged EXEC mode at the command line:
To display the status of each debugging option, enter the show debugging command in privileged EXEC mode:
To turn off the debug atm packet command in privileged EXEC mode, enter the no form of the command at the command line:
To list and see a brief description of all the debug command options, at the command line enter the debug ? command in privileged EXEC mode, as shown in the following example:
Note Not all debug commands listed in the output of the debug ? command are described in this document. Commands included here assist you in diagnosing network problems. |
To enable all system diagnostics, you can enter the debug all command in privileged EXEC mode at the command line.
The no debug all command turns off all diagnostic output. Using this command is a convenient way to ensure that you have not accidentally left any debug commands turned on.
Enabling a debug command can result in output similar to the following example for the debug lane client all command:
The switch router continues to generate such output until you enter the corresponding no debug command (in this case, no debug lane client all).
If you enable a debug command and no output is displayed, consider the following possibilities:
By default, the network server sends the output from debug commands and system error messages to the console terminal. If you use this default, monitor debugging output with a virtual terminal connection, rather than the console port.
To redirect debugging output, use the variations of the logging command within configuration mode as described in the following sections.
Possible destinations include the console terminal, 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.
Note Be aware that the debugging destination you use affects system overhead. Logging messages to the console produces very high overhead, whereas logging messages to a virtual terminal produces less overhead. Logging messages to a syslog server produces even less, and logging them to an internal buffer produces the least overhead of any method. |
To configure message logging, you need to be in configuration command mode. To enter this mode, use the configure terminal command at the EXEC prompt.
By logging messages you can redirect debug output to a file, memory, or a remote host connection.
This section contains the following:
To configure message logging, use any of the following global configuration commands. Use the no form of the command to assign the default value:
1SNMP = Simple Network Management Protocol |
To enable message logging to all supported destinations other than the console, enter the logging on command as in the following example:
To direct logging to the console terminal only and disable logging output to other destinations, enter the no logging on command as in the following example:
You can set the logging levels when you log messages to the following devices:
Table A-1 lists and briefly describes the logging levels and corresponding keywords you can use to set the logging levels for these types of messages. The highest level of message is 0, emergencies. The lowest level is 7, debugging, which also displays the largest number of messages.
For information about limiting these messages, refer to the sections that follow.
The logging console command limits the logging messages displayed on the console terminal to messages up to and including the specified severity level, which is specified by the level argument.
The level argument is one of the keywords listed in Table A-1. Keywords are listed in order from the most severe level to the least severe level.
The no logging console command disables logging to the console terminal.
The following example sets console logging of messages at the debugging level, which is the least severe level and displays all logging messages:
The logging buffered command copies logging messages to an internal buffer instead of writing them to the console terminal. The buffer is circular in nature, so newer messages overwrite older messages. To display the messages that are logged in the buffer, use the show logging privileged EXEC command. The first message displayed is the oldest message in the buffer. The no logging buffered command cancels the use of the buffer and writes messages to the console terminal, which is the default setting.
The following example copies logging messages to buffered memory and sets the memory buffer space as 10,000 bytes:
The logging monitor command limits the logging messages that are displayed on terminal linesother than the console lineto messages with a level up to and including the specified level argument. The level argument is one of the keywords listed in Table A-1. To display logging messages on a terminal (virtual console), use the terminal monitor privileged EXEC command.
The no logging monitor command disables logging to terminal lines other than the console line.
The following example sets the level of messages displayed on monitors other than the console to notification level:
The logging command identifies a syslog server host to receive logging messages. The ip-address argument is the IP address of the host. By issuing this command more than once, you build a list of syslog servers that receive logging messages.
The no logging command deletes the syslog server with the specified address from the list of syslogs.
The following example configures syslog server host diablo.cisco.com to receive the logging messages:
To set up the syslog daemon on a 4.3 BSD UNIX system, include a line such as the following in the file /etc/syslog.conf:
The local7 keyword specifies the logging facility to be used. The debugging keyword specifies the syslog level. See Table A-1 for other keywords that can be listed.
The UNIX system sends messages at or above this level to the specified file, in this case /usr/adm/logs/tiplog. The file must already exist, and the syslog daemon must have permission to write to the specific file. For System V UNIX systems, the line should read as follows:
The logging trap command limits the logging messages sent to syslog servers to messages with a level up to and including the specified level argument. The level argument is one of the keywords listed in Table A-1.
To send logging messages to a syslog server, specify its host address with the logging command. The default trap level is the informational level. The no logging trap command disables logging to syslog servers.
The following example configures traps sent to the syslog server as informational:
To display the logging configuration, use the following command in user EXEC mode:
The following example shows the addresses and levels associated with the current logging setup. The command output also includes ancillary statistics.
Posted: Wed Jan 22 00:09:27 PST 2003
All contents are Copyright © 1992--2002 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.