配置Debug信息输出到控制台

组网图形

图1 Debug信息输出到控制台组网图
  • 组网需求
  • 配置思路
  • 操作步骤
  • 检查配置结果
  • 配置脚本

组网需求

图1所示,PC终端通过Console口与DeviceA相连。用户希望在PC终端上查看DeviceA上ARP模块的Debug信息,以便定位DeviceA运行时的问题。

配置思路

采用如下思路进行本例的配置:

  1. 启用信息管理功能。
  2. 配置向控制台发送Debug信息的信息通道和输出规则。
  3. 打开终端显示开关,并打开Debug信息显示功能。
  4. 打开ARP模块的调试开关。

操作步骤

  1. 启用信息管理功能。
    <HUAWEI> system-view
    [HUAWEI] sysname DeviceA
    [DeviceA] info-center enable
  2. 配置向控制台发送Debug信息的信息通道和输出规则。# 配置Debug信息输出到控制台所使用的通道为0。
    [DeviceA] info-center console channel 0

    # 配置向信息通道输出Debug信息的规则,允许ARP模块的Debug信息在控制台输出,并且严重等级限制为debugging。

    [DeviceA] info-center source arp channel console debug level debugging
    [DeviceA] quit
  3. 打开终端显示开关,并打开Debug信息显示功能。
    <DeviceA> terminal monitor
    <DeviceA> terminal debugging
  4. 打开ARP模块的调试开关。
    <DeviceA> debugging arp packet

检查配置结果

# 查看配置的通道信息。

<DeviceA> display info-center channel 0
channel number:0, channel name:console
ModuID   Name          Enable LogLevel      Enable TrapLevel     Enable DebugLevel   
ffffffff default       Y      warning       Y      debugging     Y      debugging    
00000859 ARP           Y      warning       Y      debugging     Y      debugging

配置脚本

#
sysname DeviceA
#
info-center console channel 0
info-center source arp channel console debug level debugging
#
return
阅读剩余
THE END