Debug configuration

The debug configuration commands enable detailed debugging information for various protocols.

Debug configuration in the classic CLI

The debug commands in the classic CLI are available by entering the debug configuration context. Debugging configuration is not persistent across CPM switchovers or router reboots.

Use the show debug command to display debugging information.

Show debug information

A:node-2# show debug
debug
    system
    netconf info
    exit
exit

The admin debug-save command saves the debugging configuration to config.dbg at the BOF primary-config location if a URL is not specified.

Save debug configuration

A:node-2# admin debug-save
Writing configuration to cf3:\config.dbg
Saving configuration OK
Completed.

For a description of individual debug commands, see the 7450 ESS, 7750 SR, 7950 XRS, and VSR Classic CLI Command Reference Guide.

Logging debug events in the classic CLI

The following example shows the configuration for debug events that are stored in destination CLI log identifier 7. The log entries wrap at 50 entries (the configured value of cli).

Configuration for stored debug events

A:node-2>config>log# log-id 7
*A:node-2>config>log>log-id$ from debug-trace
*A:node-2>config>log>log-id$ to cli 50
*A:node-2>config>log>log-id$ info
----------------------------------------------
            from debug-trace
            to cli 50
            no shutdown
----------------------------------------------

After the log is configured, execute the following tools command in the CLI session that is intended to display output of the debug events. See the 7450 ESS, 7750 SR, 7950 XRS, and VSR Clear, Monitor, Show, and Tools Command Reference Guide for more information about the tools command.

Subscribe to debug log output to the CLI session

*A:node-2# tools perform log subscribe-to log-id 7

The following example shows terminating the output of the logs to the CLI session using the unsubscribe-from command.

Unsubscribe from debug log output to the CLI session

A:node-2# tools perform log unsubscribe-from log-id 7

Debug events can be displayed using the show log command and cleared using the clear log command.

Display and clear debug log events

*A:node-2# show log log-id 7
===============================================================================
Event Log 7 log-name 7
===============================================================================
Description : (Not Specified)
Log contents  [size=50   next event=2  (not wrapped)]

---snip---

*A:node-2# clear log log-id 7

Debug configuration in the MD-CLI

The debug commands in the MD-CLI are available in an exclusive, private, or read-only session using the explicit or implicit configuration mode. The same configuration management commands that are available in the configure region are available in the debug region.

Debugging configuration is not persistent across router reboots.

Use the admin show configuration debug command to display debugging information. The command supports all configuration display formats, datastores, and output formats that are supported for other regions.

Display debug information

[/]
A:admin@node-2# admin show configuration debug
# TiMOS-B-22.2.R1 both/x86_64 Nokia 7750 SR Copyright (c) 2000-2022 Nokia.
# All rights reserved. All use subject to applicable license agreements.
# Built on Sat Feb 26 15:31:00 PST 2022 by builder in /builds/c/222B/R1/panos/main/sros
# Configuration format version 22.2 revision 0

# Generated 2022-03-07T16:51:54.1+00:00 by admin from Console

debug {
    system {
        management-interface {
            netconf info
        }
    }
}

# Finished 2022-03-07T16:51:54.1+00:00

The admin save debug command saves the debugging configuration to debug.cfg at the bof configuration primary-location if a URL is not specified.

Save debug configuration

[/]
A:admin@node-2# admin save debug
Writing configuration to cf3:\debug.cfg
Saving configuration OK
Completed.

For descriptions of individual debug commands, see the 7450 ESS, 7750 SR, 7950 XRS, and VSR MD-CLI Command Reference Guide.

Logging debug events in the MD-CLI

The following is an example configuration for debug events that are stored in destination CLI log identifier 7. The log entries wrap at 50 entries (the configured value of max-entries).

Configuration for stored debug events

(ex)[configure log]
A:admin@node-2# log-id 7

*(ex)[configure log log-id "7"]
A:admin@node-2# source debug

*(ex)[configure log log-id "7"]
A:admin@node-2# destination cli max-entries 50

*(ex)[configure log log-id "7"]
A:admin@node-2# info
    source {
        debug true
    }
    destination {
        cli {
            max-entries 50
        }
    }

After the commit command is issued to include the log in the running configuration, the following tools command can be executed in the CLI session that is intended to display output of the debug events. See the 7450 ESS, 7750 SR, 7950 XRS, and VSR Clear, Monitor, Show, and Tools Command Reference Guide for more information about the tools command.

Subscribe to debug log output to the CLI session

[/]
A:admin@node-2# tools perform log subscribe-to log-id 7

The following example shows terminating the output of the logs to the CLI session using the unsubscribe-from command.

Unsubscribe from debug log output to the CLI session

[/]
A:admin@node-2# tools perform log unsubscribe-from log-id 7

Debug events can be displayed using the show log command and cleared using the clear log command.

Display and clear debug log events

[/]
A:admin@node-2# show log log-id 7
===============================================================================
Event Log 7 log-name 7
===============================================================================
Description : (Not Specified)
Log contents  [size=50   next event=2  (not wrapped)]

---snip---

[/]
A:admin@node-2# clear log log-id 7

Debug configuration in mixed and model-driven mode

When debugging is configured in mixed or model-driven management mode, the following usage guidelines apply.

If the commands are available in the MD-CLI, the MD-CLI commands must be used to configure debugging.

  • The classic CLI cannot be used.

  • Debug configuration commands entered in the MD-CLI are only displayed in the MD-CLI info and admin show configuration debug output.

  • Debug configuration entered in the MD-CLI can be saved to debug.cfg or a file URL with the admin save debug command.
  • Debug configuration commands entered in the MD-CLI are not displayed in the classic CLI show debug output.

If the commands are not available in the MD-CLI, the classic CLI must be used to configure debugging.

  • The MD-CLI cannot be used.

  • Debug configuration commands entered in the classic CLI are only displayed in the classic CLI show debug output.

  • Debug configuration entered in the classic CLI can be saved to config.dbg or a file URL with the admin debug-save command.
  • Debug configuration commands entered in the classic CLI are not displayed in the MD-CLI info and admin show configuration debug output.

The user must manually remove the classic and model-driven debug configuration before changing the management interface configuration mode from model-driven to mixed mode. The system automatically removes the classic and model-driven debug configuration during all other mode switches.