• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

17-网络管理和监控命令参考

目录

15-GOLD命令

本章节下载 15-GOLD命令  (246.39 KB)

docurl=/cn/Service/Document_Software/Document_Center/Home/Security/00-Public/Command/Command_Manual/H3C_SecPath_M9000_E9X71-4322/17/202310/1951610_30005_0.htm

15-GOLD命令


1 GOLD

测试例的支持情况与设备的型号有关,请以设备的实际情况为准。GOLD配置命令举例中使用的测试例仅为示例,可在命令行中输入测试例名称位置输入“?”来获取设备支持的测试例的名称。

1.1  GOLD配置命令

1.1.1  diagnostic bootup level

diagnostic bootup level命令用来配置设备下次启动时,是否执行所有启动诊断测试例。

undo diagnostic bootup level命令用来恢复缺省情况。

【命令】

diagnostic bootup level { bypass | complete }

undo diagnostic bootup level

【缺省情况】

系统在启动时不执行任何启动测试例。

【视图】

系统视图

【缺省用户角色】

network-admin

context-admin

【参数】

bypass:所有测试例均不执行。

complete:执行所有的测试例。

【使用指导】

本命令配置后,将在设备下次启动时生效。

【举例】

# 配置设备下次启动时,执行所有启动诊断测试例。

<Sysname> system-view

[Sysname] diagnostic bootup level complete

【相关命令】

·     display diagnostic bootup level

1.1.2  diagnostic event-log size

diagnostic event-log size命令用来配置可存储的GOLD日志的最大条数。

undo diagnostic event-log size命令用来恢复缺省情况。

【命令】

diagnostic event-log size number

undo diagnostic event-log size

【缺省情况】

可存储的GOLD日志的最大条数为512条。

【视图】

系统视图

【缺省用户角色】

network-admin

context-admin

【参数】

number:可存储的GOLD日志的最大条数,取值范围为0~1024。

【使用指导】

执行该命令时,如果指定的number值小于当前已存储的GOLD日志的条数,则系统会自动删除最旧的GOLD日志,直到当前GOLD日志的条数为number

当设备当前已存储的GOLD日志的条数达到最大值,同时还有新的GOLD日志需要存储时,系统会删除最旧的日志来存储新的日志。

【举例】

# 配置可存储的GOLD日志的最大条数为600条。

<Sysname> system-view

[Sysname] diagnostic event-log size 600

1.1.3  diagnostic monitor action

diagnostic monitor action命令用来配置监控诊断测试例的纠错动作。

undo diagnostic monitor action命令用来恢复缺省情况。

【命令】

(独立运行模式)

diagnostic monitor action slot slot-number-list [ cpu cpu-number ] [ test test-name ] mode { none | self-reboot | service-restart | switchover | system-reboot }

undo diagnostic monitor action slot slot-number-list [ cpu cpu-number ] [ test test-name ]

(IRF模式)

diagnostic monitor action chassis chassis-number slot slot-number-list [ cpu cpu-number ] [ test test-name ] mode { none | self-reboot | service-restart | switchover | system-reboot }

undo diagnostic monitor action chassis chassis-number slot slot-number-list [ cpu cpu-number ] [ test test-name ]

【缺省情况】

不同监控诊断测试例的纠错动作不同,请使用display diagnostic content verbose命令查看,对于不支持纠错动作的测试例,对应项显示为-NA-。

【视图】

系统视图

【缺省用户角色】

network-admin

context-admin

【参数】

test test-name:指定监控诊断测试例的名称,区分大小写。具体取值可通过在test参数后输入问号来获取。不指定该参数时,表示所有监控诊断测试例。

none:表示当测试例检测到本板的特性功能异常时,如果本板的测试项的纠错动作配置了该参数,不触发动作。

self-reboot:表示当测试例检测到本板的特性功能异常时,如果测试项的纠错动作配置了该参数,触发本板重启的动作。

service-restart:表示当测试例检测到特性功能异常时,会自动重启该特性。

switchover:表示当测试例检测到特性功能异常时,会触发主用主控板和备用主控板之间倒换的动作。

system-reboot:表示当测试例检测到本板的特性功能异常时,如果测试项的纠错动作配置了该参数,触发整机重启的动作。

chassis chassis-number:表示设备在IRF中的成员编号。(IRF模式)

slot slot-number-list:槽位号列表。表示方式为slot-number-list = { slot-number [ to slot-number ] }&<1-7>。其中,slot-number表示单板所在的槽位号,&<1-7>表示前面的参数最多可以输入7次。

cpu cpu-number:表示指定CPU的编号。只有指定的slot支持多CPU时,才能配置该参数。

【举例】

# 配置slot 1上测试例MonitorTest的纠错动作为self-reboot。(独立运行模式)

<Sysname> system-view

[Sysname] diagnostic monitor action slot 1 test MonitorTest mode self-reboot

1.1.4  diagnostic monitor enable

diagnostic monitor enable命令用来开启监控诊断功能。

undo diagnostic monitor enable命令用来关闭监控诊断功能。

【命令】

(独立运行模式)

diagnostic monitor enable slot slot-number-list [ cpu cpu-number ] [ test test-name ]

undo diagnostic monitor enable slot slot-number-list [ cpu cpu-number ] [ test test-name ]

(IRF模式)

diagnostic monitor enable chassis chassis-number slot slot-number-list [ cpu cpu-number ] [ test test-name ]

undo diagnostic monitor enable chassis chassis-number slot slot-number-list [ cpu cpu-number ] [ test test-name ]

【缺省情况】

监控诊断功能处于开启状态。

【视图】

系统视图

【缺省用户角色】

network-admin

context-admin

【参数】

chassis chassis-number:表示设备在IRF中的成员编号。(IRF模式)

slot slot-number-list:槽位号列表。表示方式为slot-number-list = { slot-number [ to slot-number ] }&<1-7>。其中,slot-number表示单板所在的槽位号,&<1-7>表示前面的参数最多可以输入7次。

test test-name:指定测试例的名称,区分大小写。具体取值可通过在test参数后输入问号来获取。不指定该参数时,表示所有监控诊断测试例。

cpu cpu-number:表示CPU的编号。只有指定的slot支持多CPU时,才能配置该参数。

【使用指导】

监控诊断是指系统在运行过程中按照一定的时间间隔定时执行测试例,来检测系统中的硬件故障并记录诊断结果。监控诊断只能执行非破坏性的测试例。

破坏性和非破坏性是测试例的一个属性,由开发人员在设计测试例的时候指定。其中:

·     破坏性测试例在执行过程中会对设备当前正常运行的业务产生影响或导致业务无法运行,如内存耗尽测试例。

·     非破坏性测试例在执行过程中不会对设备当前正常运行的业务产生影响。

对于缺省启动的监控诊断测试例,在设备启动后会自动执行;对于缺省关闭的监控诊断测试例,须使用本命令才能执行。

【举例】

# 使能指定slot上的测试例MonitorTest。(独立运行模式)

<Sysname> system-view

[Sysname] diagnostic monitor enable slot 1 test MonitorTest

【相关命令】

·     diagnostic monitor interval

1.1.5  diagnostic monitor interval

diagnostic monitor interval命令用来配置监控诊断测试例的执行时间间隔。

undo diagnostic monitor interval命令用来恢复缺省情况。

【命令】

(独立运行模式)

diagnostic monitor interval slot slot-number-list [ cpu cpu-number ] [ test test-name ] time interval

undo diagnostic monitor interval slot slot-number-list [ cpu cpu-number ] [ test test-name ]

(IRF模式)

diagnostic monitor interval chassis chassis-number slot slot-number-list [ cpu cpu-number ] [ test test-name ] time interval

undo diagnostic monitor interval chassis chassis-number slot slot-number-list [ cpu cpu-number ] [ test test-name ]

【缺省情况】

不同测试例的执行时间间隔不同,请使用display diagnostic content命令查看。

【视图】

系统视图

【缺省用户角色】

network-admin

context-admin

【参数】

chassis chassis-number:表示设备在IRF中的成员编号。(IRF模式)

slot slot-number-list:槽位号列表。表示方式为slot-number-list = { slot-number [ to slot-number ] }&<1-7>。其中,slot-number表示单板所在的槽位号。&<1-7>表示前面的参数最多可以输入7次。

test test-name:指定测试例的名称,区分大小写。具体取值可通过在test参数后输入问号来获取。不指定该参数时,表示所有监控诊断测试例。

interval:监控诊断测试例的执行时间间隔,格式为hh:mm:ss(小时:分钟:秒)。其中hh取值范围为0~23,mm取值范围为0~59,ss取值范围为0~59。如果要设置成整分,则可以不输入秒;如果要设置成整时,则可以不输入分和秒。比如将interval参数设置为1表示执行时间间隔为1小时。

cpu cpu-number:表示CPU的编号。只有指定的slot支持多CPU时,才能配置该参数。

【使用指导】

使能监控诊断测试例后,测试例会按照一定的执行时间间隔周期执行,这个执行时间间隔可用该命令配置。

用户配置的执行时间间隔不能小于监控诊断测试例要求的最小值。监控诊断测试例要求的最小值可使用携带verbose参数的display diagnostic content命令查看。

【举例】

# 配置指定slot上测试例MonitorTest的执行时间间隔为1分钟。(独立运行模式)

<Sysname> system-view

[Sysname] diagnostic monitor interval slot 1 test MonitorTest time 00:01:00

【相关命令】

·     diagnostic monitor enable

·     display diagnostic content

1.1.6  display diagnostic bootup

display diagnostic bootup命令用来显示启动诊断测试例的信息。

【命令】

(独立运行模式)

display diagnostic bootup [ slot slot-number [ cpu cpu-number ] ] [ test test-name ]

(IRF模式)

display diagnostic bootup [ chassis chassis-number [ slot slot-number [ cpu cpu-number ] ] ] [ test test-name ]

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

context-admin

context-operator

【参数】

slot slot-number:表示单板所在的槽位号。不指定该参数时,表示所有单板。(独立运行模式)

chassis chassis-number:表示设备在IRF中的成员编号。不指定该参数时,表示所有成员设备。(IRF模式)

slot slot-number:表示单板所在的槽位号。不指定该参数时,表示指定成员设备的所有单板。(IRF模式)

cpu cpu-number:表示指定CPU的编号。只有指定的slot支持多CPU时,才能配置该参数。

test test-name:指定测试例的名称,区分大小写。具体取值可通过在test参数后输入问号来获取。不指定该参数时,表示所有测试例。

【举例】

# 显示指定slot上启动诊断测试例BootTest的信息。(独立运行模式)

<Sysname> display diagnostic bootup slot 1 test BootTest

slot 1:

  Test name                : BootTest

  ExtPara                  : 123

  State                    : Enabled

【相关命令】

·     diagnostic bootup enable test

1.1.7  display diagnostic bootup level

display diagnostic bootup level命令用来显示设备本次启动时生效的启动诊断的级别。

【命令】

display diagnostic bootup level

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

context-admin

context-operator

【举例】

# 显示设备本次启动时生效的启动诊断的级别。

<Sysname> display diagnostic bootup level

Current bootup diagnostic level: complete

【相关命令】

·     diagnostic bootup level

1.1.8  display diagnostic content

display diagnostic content命令用来显示测试例的内容。

【命令】

(独立运行模式)

display diagnostic content [ slot slot-number [ cpu cpu-number ] ] [ verbose ]

(IRF模式)

display diagnostic content [ chassis chassis-number [ slot slot-number [ cpu cpu-number ] ] ] [ verbose ]

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

context-admin

context-operator

【参数】

slot slot-number:表示单板所在的槽位号。不指定该参数时,表示所有单板。(独立运行模式)

chassis chassis-number:表示设备在IRF中的成员编号。不指定该参数时,表示所有成员设备。(IRF模式)

slot slot-number:表示单板所在的槽位号。不指定该参数时,表示指定成员设备的所有单板。(IRF模式)

cpu cpu-number:表示CPU的编号。只有指定的slot支持多CPU时,才能配置该参数。

verbose:显示测试例的详细信息;不指定该参数时,显示测试例的简要信息。

【举例】

# 显示指定slot上诊断测试例的简要信息。(独立运行模式)

<Sysname> display diagnostic content slot 1

Diagnostic test suite attributes:

#B/*: Bootup test/NA

#O/*: Ondemand test/NA

#M/*: Monitoring test/NA

#D/*: Disruptive test/Non-disruptive test

#P/*: Per port test/NA

#A/I/*: Monitoring test is active/Monitoring test is inactive/NA

 

Slot 1 cpu 0:

Name                            Attributes             Interval                

MonitorTest                     **M*PA                 01:00:00

# 显示指定slot上诊断测试例的详细信息。(独立运行模式)

<Sysname> display diagnostic content slot 1 verbose

Diagnostic test suite attributes:

#B/*: Bootup test/NA

#O/*: Ondemand test/NA

#M/*: Monitoring test/NA

#D/*: Disruptive test/Non-disruptive test

#P/*: Per port test/NA

#A/I/*: Monitoring test is active/Monitoring test is inactive/NA

 

Slot 1 cpu 0:

Test name        : MonitorTest                                          

Test attributes  : **M*PA                                                      

Test interval    : 01:00:00                                                    

Min interval     : 00:00:06                                                    

Correct-action   : -NA-                                                         

Description      : A Real-time test, enabled by default that checks board status

 between local master and other local boards.                                  

Exec             : -NA-

表1-1 display diagnostic content命令显示信息描述表

字段

描述

B/*

启动诊断测试例/非启动诊断测试例

O/*

按需诊断测试例/非按需诊断测试例

M/*

监控诊断测试例/非监控诊断测试例

D/*

破坏性测试例/非破坏性测试例

P/*

端口相关的测试例/不是端口相关的测试例

A/I/*

使能的监控诊断测试例/未使能的监控诊断测试例/非监控诊断测试例

Name

测试例的名称

Attributes

测试例的属性。从左到右依次为是否为启动诊断测试例,是否为按需诊断测试例,是否为监控诊断测试例,是否是破坏性测试例,是否是端口都相关的测试例,是否使能,对于不相关的属性用“*”表示

Interval

执行监控测试例的执行时间间隔,没有执行时间间隔用“-NA-”表示

Test name

测试例的名称

Test attributes

测试例的属性。从左到右依次为是否为启动诊断测试例,是否为按需诊断测试例,是否为监控诊断测试例,是否是破坏性测试例,是否是端口都相关的测试例,是否使能,对于不相关的属性用“*”表示

Test interval

执行监控测试例的执行时间间隔,没有执行时间间隔用“-NA-”表示

Min interval

执行监控测试例允许的最小执行时间间隔,没有最小执行时间间隔用“-NA-”表示

Correct-action

测试失败时的触发动作

Description

测试例的描述信息

Exec

测试例执行的脚本的路径。取值为“-NA-”时,表示测试例没有使用脚本

 

1.1.9  display diagnostic event-log

display diagnostic event-log命令用来显示GOLD日志的信息。

【命令】

display diagnostic event-log [ error | info ]

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

context-admin

context-operator

【参数】

error:显示所有错误相关的GOLD日志信息。

info:显示所有非错误的GOLD日志信息

【使用指导】

不指定errorinfo参数时,显示所有GOLD日志的信息。

系统在执行完诊断测试例后,会产生GOLD日志用于记录测试例相关执行情况,日志内容包括测试例的名称、执行时间、执行结果、失败原因等信息。由于所有测试例在执行过程都会产生日志,因此GOLD日志会较多,为了不影响信息中心的性能,GOLD日志独立存储和显示,不会发往信息中心统一处理。

设备重启或主用主控板和备用主控板倒换后,GOLD日志会全部被清除。(独立运行模式)

设备重启或全局主用主控板和全局备用主控板倒换后,GOLD日志会全部被清除。(IRF模式)

【举例】

# 显示所有GOLD日志的信息。(独立运行模式)

<Sysname> display diagnostic event-log

Event: E_INFO, Wed Jan  7 11:39:53:314 2017, -Slot=1-Cpu=0 TestName->IPCMonitor, Event_INFO: Result->Success.

1.1.10  display diagnostic result

display diagnostic result命令用来显示测试例的执行结果。

【命令】

(独立运行模式)

display diagnostic result [ slot slot-number [ cpu cpu-number ] [ test test-name ] ] [ verbose ]

(IRF模式)

display diagnostic result [ chassis chassis-number [ slot slot-number [ cpu cpu-number ] [ test test-name ] ] ] [ verbose ]

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

context-admin

context-operator

【参数】

slot slot-number:表示单板所在的槽位号。不指定该参数时,表示所有单板。(独立运行模式)

chassis chassis-number:表示设备在IRF中的成员编号。不指定该参数时,表示所有成员设备。(IRF模式)

slot slot-number:表示单板所在的槽位号。不指定该参数时,表示指定成员设备的所有单板。(IRF模式)

cpu cpu-number:表示指定CPU的编号。只有指定的slot支持多CPU时,才能配置该参数。

test test-name:指定测试例的名称,区分大小写。具体取值可通过在test参数后输入问号来获取。不指定该参数时,表示所有测试例。

verbose:显示当前处于使能状态的测试例或者累计执行次数大于0的测试例执行结果的详细信息,不包括统计信息。不指定该参数时,只显示累计执行次数大于0的测试例执行结果的简要信息。

【举例】

# 显示指定slot上所有测试例的简要诊断结果。(独立运行模式)

<Sysname> display diagnostic result slot 1

Slot 1 cpu 0:

  Name                            Run count    Failure count    Last result    

  MonitorTest                     386          0                Success        

# 显示所有测试例的详细诊断结果(独立运行模式)

<Sysname> display diagnostic result verbose

Slot 1 cpu 0:

  Test name                : MonitorTest                                

  Total run count          : 386                                               

  Total failure count      : 0                                                 

  Consecutive failure count: 0                                                 

  Last execution time      : Fri Nov 21 23:00:01 2014                          

  First failure time       : -NA-                                              

  Last failure time        : -NA-                                              

  Last pass time           : Fri Nov 21 23:00:01 2014                          

  Last execution result    : Success                                           

  Last failure reason      : -NA-                                              

  Next execution time      : Sat Nov 22 00:00:07 2014                          

  Slot  check status       : Normal

表1-2 display diagnostic result命令显示信息描述表

字段

描述

Name

测试例的名称

Run count

诊断执行的总次数

Failure count

诊断失败的总次数

Last result

最近一次诊断结果

Test name

测试例的名称

Total run count

诊断执行的总次数

Total failure count

诊断失败的总次数

Consecutive failure count

连续执行测试例失败的次数

Last execution time

最近一次测试执行的时间

First failure time

第一次诊断失败的时间。如果没有失败的测试例,此字段内容为-NA-

Last failure time

最近一次诊断失败的时间。如果没有失败的测试例,此字段内容为-NA-

Last pass time

最近一次诊断成功的时间。如果没有成功的测试例,此字段内容为-NA-

Last execution result

最近一次诊断结果

Last failure reason

最近一次诊断失败的原因。当用户配置模拟失败时,此字段内容即为Simulated Test;当诊断未失败时,此字段内容即为-NA-

Next execution time

下次诊断执行的时间。如果是监控诊断类型的测试例,下次执行时间为最后一次测试执行时间加上测试例的执行时间间隔;如果是按需诊断和启动诊断类型的测试例,则此字段的内容为-NA-

 

1.1.11  display diagnostic result statistics

display diagnostic result statistics命令用来显示与报文相关的测试例的统计信息。

【命令】

(独立运行模式)

display diagnostic result [ slot slot-number [ cpu cpu-number ] [ test test-name ] ] statistics

(IRF模式)

display diagnostic result [ chassis chassis-number [ slot slot-number [ cpu cpu-number ] [ test test-name ] ] ] statistics

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

context-admin

context-operator

【参数】

slot slot-number:表示单板所在的槽位号。不指定该参数时,表示所有单板。(独立运行模式)

chassis chassis-number:表示设备在IRF中的成员编号。不指定该参数时,表示所有成员设备。(IRF模式)

slot slot-number:表示单板所在的槽位号。不指定该参数时,表示指定成员设备的所有单板。(IRF模式)

cpu cpu-number:表示指定CPU的编号。只有指定的slot支持多CPU时,才能配置该参数。

test test-name:指定测试例的名称,区分大小写。具体取值可通过在test参数后输入问号来获取。不指定该参数时,表示所有测试例。

【举例】

# 显示指定slot上MonitorTest执行后的统计结果。(独立运行模式)

<Sysname> display diagnostic result slot 1 test MonitorTest statistics

Slot 1 cpu 0:

  Test name: MonitorTest

  Port    Packets sent    Packets received   Packets lost

  1       0               0                  0

  2       0               0                  0

  3       0               0                  0

  4       4               4                  0

  5       4               4                  0

  6       4               4                  0

  7       4               4                  0

  8       0               0                  0

表1-3 display diagnostic result statistics命令显示信息描述表

字段

描述

Test name

测试例的名称

Port

端口号

Packets sent

已发送数据包

Packets received

已接收数据包

Packets lost

丢失的数据包

 

1.1.12  reset diagnostic event-log

reset diagnostic event-log命令用来清除GOLD日志。

【命令】

reset diagnostic event-log

【视图】

用户视图

【缺省用户角色】

network-admin

context-admin

【举例】

# 清除GOLD日志。

<Sysname> reset diagnostic event-log

【相关命令】

·     display diagnostic event-log

1.1.13  reset diagnostic result

reset diagnostic result命令用来清除诊断测试结果。

【命令】

(独立运行模式)

reset diagnostic result [ slot slot-number [ cpu cpu-number ] [ test test-name ] ]

(IRF模式)

reset diagnostic result [ chassis chassis-number [ slot slot-number [ cpu cpu-number ] [ test test-name ] ] ]

【视图】

用户视图

【缺省用户角色】

network-admin

context-admin

【参数】

slot slot-number:表示单板所在的槽位号。不指定该参数时,表示所有单板。(独立运行模式)

chassis chassis-number:表示设备在IRF中的成员编号。不指定该参数时,表示所有成员设备。(IRF模式)

slot slot-number:表示单板所在的槽位号。不指定该参数时,表示指定成员设备的所有单板。(IRF模式)

cpu cpu-number:表示指定CPU的编号。只有指定的slot支持多CPU时,才能配置该参数。

test test-name:指定测试例的名称,区分大小写。具体取值可通过在test参数后输入问号来获取。不指定该参数时,表示所有测试例。

【使用指导】

本命令清除测试结果时,不会清除下次诊断执行时间。

【举例】

# 清除指定slot上MonitorTest的测试结果。(独立运行模式)

<Sysname> reset diagnostic result slot 1 test MonitorTest

【相关命令】

·     display diagnostic result

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们