Important information about Debug commands (1)

Source: Internet
Author: User
Tags high cpu usage

I. Introduction

This article describes some basic guiding principles for using the debugging functions provided on the Cisco IOS (r) platform, as well as examples of correct use of the debug ip packet command and conditional debugging.
Note: This document does not describe how to use and explain specific debug commands and outputs. For more information about specific debug commands, see the relevant Cisco debug command references.
The output of the debug Privileged EXEC command provides diagnostic information about various Internet events, which generally involve Protocol Status and network behavior.

PrerequisitesReaders of this article should understand the following knowledge:
Connect to the vro through the control panel, aux, and vty ports.
Basic IOS configuration problems.
Explain IOS debugging command output.
Warning use the debug command with caution. When solving a specific problem, we recommend that you use these commands only when the router technical support personnel provide guidance.
When the interconnected network is under high load, enabling the debugging function will interrupt the operation of the router. Therefore, if the log function is enabled, access to the server may experience intermittent interruption when the log message on the control panel port is overloaded.
Before starting the debug command, always consider the output and time consumed by the command. For example, if you have configured a router with a basic rate interface (BRI), debug isdn q931 may not cause harm to the system. However, if you perform the same debugging on the AS5800 with all E1 configurations, many inputs may be generated, causing the system to "Suspend" or stop responding.
Before debugging, run the show processes cpu command to view the CPU load. Verify that sufficient CPU is available before commissioning. For information about how to handle high CPU loads, see the document "solving high CPU usage problems on Cisco routers. For example, if a Cisco 7200 router with an ATM interface is used for bridging, a large number of CPUs may be used to restart the router based on the number of configured sub-interfaces. This is because: For each virtual circuit (VC), the Bridge Protocol Data Unit (BPDU) data packet must be generated. Enabling the debugging function during such an important period may increase the CPU usage rapidly and cause the system to be suspended or the network to be disconnected.
Note: during debugging, especially when a large number of debugging operations are performed, no router prompt appears. However, in most cases, you can use the no debug all or undebug all command to stop debugging. For more information about security use debugging, see the "get debugging output" chapter.
Ii. precautions before commissioning

In addition to the above, you must also understand the impact of debugging on the stability of the platform, and consider which interface to connect to the router. The following sections provide some guiding principles in this regard.
Obtain debugging output

The vro displays the debugging output of various interfaces, including the control panel, aux, and vty ports. The router can also record the log messages sent to the internal buffer to the external unix syslog server. The following describes how to use and pay attention to each method:
Control Panel Port
If you connect to the control panel under normal configuration, no additional work is required. Debugging output should be displayed automatically. However, you must set the logging console level as required and ensure that the log function is not disabled by the no logging console command. For more information, see the document "use Debug command.
Warning excessive debugging on the vro Control Panel port may cause the vro to be suspended. This is because the router automatically assigns priority to the control panel output before performing other router functions. If the router handles large debugging output sent to the control panel port, the router may be suspended. Therefore, if too many debugging outputs appear, use the vty (telnet) port or log buffer to obtain the debugging output. More information is provided below.
Note: by default, the log function on the control panel port is enabled. Even if some other ports or methods (such as Aux, vty, or buffer) are used to capture the output, the control panel Port usually needs to process the debug output. Therefore, we recommend that you always enable the no logging console command and use other methods to capture debugging output. If you need to use the control panel, temporarily set the logging console to enabled.
Aux port
If you use a secondary port for connection, type the terminal monitor command. Verify that the no logging on command on the vro。 is disabled. Note: If you use the Aux port to monitor the vro, always Note: When the vro is restarted, The Aux port does not display the startup sequence output. To view the startup sequence, connect to the control panel port.
VTY Port
To connect through a secondary port or remote logon, type the terminal monitor command and verify that the no logging on command is in unused state.
Record information to the internal buffer
The default log device is the control panel. Unless other devices are specified, all messages are displayed on the control panel. To record the log information to the internal buffer, use the log buffer router configuration command.
The syntax of this command is as follows:
Logging buffered
No logging buffered
The logging buffered Command copies log messages to the internal buffer, instead of writing these messages in the control panel. The buffer has the cyclic feature. New Messages overwrite old messages. To display the messages recorded in the buffer, use the show logging privilege EXEC command. The displayed 1st messages are the oldest messages in the buffer. You can specify the buffer size and the importance of the information to be recorded.
Tip: ensure that the device has sufficient available memory before entering the buffer size. Use the show proc mem IOS command to view available memory. You can use the no logging buffered command to disable the buffer and write messages to the control panel (by default ).
Record information to the UNIX Syslog Server
To record the log information to the syslog server host, use the log router configuration command. The syntax of this command is as follows:
Logging
No logging
Use the logging command to determine the syslog server host to receive log messages. The parameter is the IP address of the host. By publishing this command multiple times, you can create a list of syslog servers that receive log messages. You can use the no logging command to delete a syslog server with the specified address in the syslogs list. For more information about setting up syslog servers, see the document "use DEBUG commands.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.