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

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

目录

18-GOLD命令

本章节下载 18-GOLD命令  (209.63 KB)

docurl=/cn/Service/Document_Software/Document_Center/Routers/Catalog/SR_Router/SR8800-F/Command/Command_Manual/H3C_SR8800-F_CR-R7951PXX-6W102/14/202011/1358695_30005_0.htm

18-GOLD命令


1 GOLD

1.1  GOLD配置命令

1.1.1  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

【参数】

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

【使用指导】

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

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

【举例】

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

<Sysname> system-view

[Sysname] diagnostic event-log size 600

1.1.2  diagnostic monitor action

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

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

【命令】

(独立运行模式)

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

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

(IRF模式)

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

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

【缺省情况】

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

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

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

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

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

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次。

【举例】

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

<Sysname> system-view

[Sysname] diagnostic monitor action slot 3 test DBMMonitor mode self-reboot

1.1.3  diagnostic monitor enable

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

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

【命令】

(独立运行模式)

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

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

(IRF模式)

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

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

【缺省情况】

不同监控诊断测试例的功能开启情况不尽相同,请以在设备通过命令display diagnostic content显示的具体监控诊断测试例的开启情况为准。

【视图】

系统视图

【缺省用户角色】

network-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次。(独立运行模式)(IRF模式)

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

【使用指导】

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

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

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

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

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

【举例】

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

<Sysname> system-view

[Sysname] diagnostic monitor enable slot 3 test DBMMonitor

【相关命令】

·     diagnostic monitor interval

1.1.4  diagnostic monitor interval

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

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

【命令】

(独立运行模式)

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

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

(IRF模式)

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

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

【缺省情况】

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

【视图】

系统视图

【缺省用户角色】

network-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次。(独立运行模式)(IRF模式)

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

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

【使用指导】

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

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

【举例】

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

<Sysname> system-view

[Sysname] diagnostic monitor interval slot 3 test LIPCMonitor time 00:01:00

【相关命令】

·     diagnostic monitor enable

·     display diagnostic content

1.1.5  diagnostic simulation

diagnostic simulation命令用来设置诊断的执行方式为模拟方式。

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

【命令】

(独立运行模式)

diagnostic simulation slot slot-number-list test test-name { failure | random-failure | success }

undo diagnostic simulation slot slot-number-list test test-name

(IRF模式)

diagnostic simulation chassis chassis-number slot slot-number-list test test-name { failure | random-failure | success }

undo diagnostic simulation chassis chassis-number slot slot-number-list test test-name

【缺省情况】

诊断为非模拟方式。即启动测试例后,系统会真正执行该测试例。

【视图】

用户视图

【缺省用户角色】

network-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次。(独立运行模式)(IRF模式)

test-name:指定进行模拟诊断的测试例名称,区分大小写。具体取值可通过在test参数后输入问号来获取。

failure:假设模拟执行测试例失败,此时将输出测试失败的结果。

random-failure:表示随机选择模拟执行测试例的结果是成功还是失败。

success:假设模拟执行测试例成功,此时将输出测试成功的结果。

【使用指导】

配置该命令后,当测试例满足执行条件时,在执行测试例的时候就直接生成测试结果,并不真正执行测试例,也不会触发硬件纠正行为。该功能用于判断GOLD模块框架功能是否正常。

【举例】

# 配置指定slot上的LIPCMonitor模拟诊断失败。(独立运行模式)

<Sysname> diagnostic simulation slot 3 test LIPCMonitor failure

【相关命令】

·     display diagnostic simulation

1.1.6  display diagnostic content

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

【命令】

(独立运行模式)

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

(IRF模式)

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

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

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

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

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

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

【举例】

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

<Sysname> display diagnostic content slot 3

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 3:

Name                            Attributes             Interval

DBMMonitor                      **M**A                 -NA-

LIPCMonitor                     **M**A                 00:02:10

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

<Sysname> display diagnostic content slot 3 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 3:

Test name        : DBMMonitor

Test attributes  : **M**A

Test interval    : -NA-

Min interval     : -NA-

Correct-action   : self-reboot

Description      : This is a global monitor test.

Exec             : -NA-

 

Test name        : LIPCMonitor

Test attributes  : **M**A

Test interval    : 00:02:10

Min interval     : 00:01:00

Correct-action   : -NA-

Description      : This is a real-time test.

Exec             : -NA-

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

字段

描述

B/*

(暂不支持)启动诊断测试例/非启动诊断测试例

O/*

(暂不支持)按需诊断测试例/非按需诊断测试例

M/*

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

D/*

(暂不支持)破坏性测试例/非破坏性测试例

P/*

(暂不支持)端口相关的测试例/不是端口相关的测试例

A/I/*

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

Test name

测试例的名称

Test attributes

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

Test interval

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

Min interval

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

Correct-action

测试失败时的触发的纠错动作

Description

测试例的描述信息

 

1.1.7  display diagnostic event-log

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

【命令】

display diagnostic event-log [ error | info ]

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

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

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

【使用指导】

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

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

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

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

【举例】

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

<Sysname> display diagnostic event-log

Event: E_INFO, Tue Feb 19 16:59:35:596 2013, -Slot=1 TestName->LIPCMonitor, Even

t_INFO: Result->Success.

Event: E_INFO, Tue Feb 19 17:00:03:256 2013, -Slot=7 TestName->LIPCMonitor, Even

t_INFO: Result->Success.

1.1.8  display diagnostic result

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

【命令】

(独立运行模式)

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

(IRF模式)

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

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

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

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

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

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

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

【举例】

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

<Sysname> display diagnostic result slot 3

slot 3:

  Name                            Run count    Failure count    Last result

  LIPCMonitor                     224          0                Success

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

<Sysname> display diagnostic result verbose

slot 3:

  Test name                : DBMMonitor

  Total run count          : 0

  Total failure count      : 0

  Consecutive failure count: 0

  Last execution time      : -NA-

  First failure time       : -NA-

  Last failure time        : -NA-

  Last pass time           : -NA-

  Last execution result    : -NA-

  Last failure reason      : -NA-

  Next execution time      : -NA-

 

  Test name                : LIPCMonitor

  Total run count          : 224

  Total failure count      : 0

  Consecutive failure count: 0

  Last execution time      : Tue Feb 19 20:05:55 2013

  First failure time       : -NA-

  Last failure time        : -NA-

  Last pass time           : Tue Feb 19 20:05:55 2013

  Last execution result    : Success

  Last failure reason      : -NA-

  Next execution time      : Tue Feb 19 20:08:05 2013

表1-2 display diagnostic 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

下次诊断执行的时间。如果是监控诊断类型的测试例,下次执行时间为最后一次测试执行时间加上测试例的执行时间间隔

 

1.1.9  display diagnostic simulation

display diagnostic simulation命令用来显示模拟诊断的配置信息。

【命令】

(独立运行模式)

display diagnostic simulation [ slot slot-number ]

(IRF模式)

display diagnostic simulation [ chassis chassis-number [ slot slot-number ] ]

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

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

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

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

【举例】

# 显示指定slot上模拟诊断配置信息。(独立运行模式)

<Sysname> display diagnostic simulation slot 3

Slot 3:

  Name                            Mode

  LIPCMonitor                     failure

【相关命令】

·     diagnostic simulation

1.1.10  reset diagnostic event-log

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

【命令】

reset diagnostic event-log

【视图】

用户视图

【缺省用户角色】

network-admin

【举例】

# 清除GOLD日志。

<Sysname> reset diagnostic event-log

【相关命令】

·     display diagnostic event-log

1.1.11  reset diagnostic result

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

【命令】

(独立运行模式)

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

(IRF模式)

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

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

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

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

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

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

【使用指导】

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

【举例】

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

<Sysname> reset diagnostic result slot 3 test LIPCMonitor

【相关命令】

·     display diagnostic result

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

新华三官网
联系我们