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

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

目录

11-GOLD命令

本章节下载 11-GOLD命令  (151.16 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S12500/S12500-F/Command/Command_Manual/H3C_S12500-F_CR(R103x)-6W100/11/201706/1002505_30005_0.htm

11-GOLD命令


1 GOLD

说明

目前,仅网板支持配置HGMonitor测试例。

 

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 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 ]

【缺省情况】

未开启监控诊断测试例。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

slot slot-number-list:槽位号列表,表示同时使能多个单板的测试例。表示方式为slot-number-list = { slot-number [ to slot-number ] }&<1-7>。其中,slot-number表示单板所在的槽位号,&<1-7>表示前面的参数最多可以输入7次。(独立运行模式)

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:指定测试例的名称,为1~31个字符的字符串,不区分大小写。不指定该参数时,表示使能指定单板上的所有监控诊断测试例。

【使用指导】

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

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

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

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

【举例】

# 使能10号单板上的测试例HGMonitor。(独立运行模式)

<sysname> system-view

[sysname] diagnostic monitor enable slot 10 test HGMonitor

# 使能2号成员设备的10号单板上的测试例HGMonitor。(IRF模式)

<sysname> system-view

[sysname] diagnostic monitor enable chassis 2 slot 10 test HGMonitor

【相关命令】

·     diagnostic monitor interval

1.1.3  diagnostic monitor interval

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

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

【命令】

独立运行模式:

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

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 time

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

【缺省情况】

监控诊断测试例时间间隔为10秒。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

slot slot-number-list:槽位号列表,表示同时配置多个单板的测试例的时间间隔。表示方式为slot-number-list = { slot-number [ to slot-number ] }&<1-7>。其中,slot-number表示需要配置的单板所在的槽位号。&<1-7>表示前面的参数最多可以输入7次。(独立运行模式)

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:指定测试例的名称,为1~31个字符的字符串,不区分大小写。不指定该参数时,表示指定单板上的所有监控诊断测试例。

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

【使用指导】

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

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

【举例】

# 配置10号单板上测试例HGMonitor的时间间隔为1分钟。(独立运行模式)

<sysname> system-view

[sysname] diagnostic monitor interval slot 10 test HGMonitor time 00:01:00

# 配置2号框中10号单板上测试例HGMonitor的时间间隔为1分钟。(IRF模式)

<sysname> system-view

[sysname] diagnostic monitor interval chassis 2 slot 10 test HGMonitor time 00:01:00

【相关命令】

·     diagnostic monitor enable

·     display diagnostic content

1.1.4  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

【参数】

slot slot-number-list:槽位号列表,表示同时模拟多个单板的测试例。表示方式为slot-number-list = { slot-number [ to slot-number ] }&<1-7>。其中,slot-number表示需要模拟的单板所在的槽位号。&<1-7>表示前面的参数最多可以输入7次。(独立运行模式)

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:指定进行模拟诊断的测试例名称,为1~31个字符的字符串,不区分大小写。

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

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

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

【使用指导】

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

【举例】

# 配置10号单板上的HGMonitor模拟诊断失败。(独立运行模式)

<sysname> diagnostic simulation slot 10 test HGMonitor failure

# 配置成员设备1的10号单板上的HGMonitor模拟诊断失败。(IRF模式)

<sysname> diagnostic simulation chassis 1 slot 10 test HGMonitor failure

【相关命令】

·     display diagnostic simulation

1.1.5  diagnostic start test

diagnostic start test命令用来启动全局按需诊断测试例。

【命令】

diagnostic start test test-name

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

test test-name:指定测试例的名称,为1~31个字符的字符串,不区分大小写。

【使用指导】

执行本测试例时,设备需要以出厂配置启动,且各业务端口不能连接电缆和光模块。

本测试例执行完成后,必须整机重启设备。

【举例】

# 执行全局诊断测试例

<Sysname>diagnostic start test EquipSelfCheck                                      

This command requires null configuration and reboot device aferwards. Continue?

[Y/N]:y                                                                        

=================================================                              

  ===============display clock===================                              

10:55:19 UTC Fri 06/27/2014                                                    

  ===============system-view=====================                              

System View: return to User View with Ctrl+Z.                                  

  ===============undo stp enable=====================                          

  ===============probe-view=====================                               

  ===========undo monitor inner-channel=================                       

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 [ slot slot-number ]:chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。不指定chassis时,显示所有设备的诊断结果。指定chassis未指定槽位号时,显示指定设备所有单板的测试例内容。(IRF模式)

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

【举例】

# 显示10号单板上诊断测试例的简要信息。(独立运行模式)

<sysname> display diagnostic content slot 10

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

Name                      Attributes              Interval

IPCMonitor                      **M*PA                 00:01:00                

BoardStatusMonitor              **M*PA                 00:00:06                

TaskMonitor                     **M*PA                 00:00:10                

PortMonitor                     **M*PA                 00:00:10                

ComponentMonitor                **M*PA                 00:00:30                

HGMonitor                       **M*PI                 00:00:10

# 显示成员设备1的10号单板上诊断测试例的简要信息。(IRF模式)

<sysname> display diagnostic content chassis 1 slot 10

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

 

Chassis 1 slot 10:

Name                      Attributes              Interval

IPCMonitor                      **M*PA                 00:01:00                

BoardStatusMonitor              **M*PA                 00:00:06                 

TaskMonitor                     **M*PA                 00:00:10                

PortMonitor                     **M*PA                 00:00:10                

ComponentMonitor                **M*PA                 00:00:30                 

HGMonitor                       **M*PI                 00:00:10

# 显示1号单板上诊断测试例的详细信息。(独立运行模式)

<sysname> display diagnostic content slot 10 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 10:

Test name        : IPCMonitor                                                  

Test attributes  : **M*PA                                                      

Test interval    : 00:01:00                                                    

Min interval     : 00:01:00                                                    

Correct-action   : -NA-                                                        

Description      : A Real-time test, disabled by default that checks ipc between

 switch units.                                                                 

Exec             : -NA-                                                         

                                                                               

Test name        : BoardStatusMonitor                                          

Test attributes  : **M*PA                                                       

Test interval    : 00:00:06                                                    

Min interval     : 00:00:06                                                    

Correct-action   : -NA-                                                         

Description      : A Real-time test, disabled by default that checks board statu

s between local master and other local boards.                                 

Exec             : -NA-

# 显示成员设备1的10号单板上诊断测试例的详细信息。(IRF模式)

<sysname> display diagnostic content chassis 1 slot 10 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

 

Chassis 1 slot 10:

Test name        : IPCMonitor                                                  

Test attributes  : **M*PA                                                      

Test interval    : 00:01:00                                                    

Min interval     : 00:01:00                                                    

Correct-action   : -NA-                                                        

Description      : A Real-time test, disabled by default that checks ipc between

 switch units.                                                                 

Exec             : -NA-                                                        

                                                                                

Test name        : BoardStatusMonitor                                          

Test attributes  : **M*PA                                                      

Test interval    : 00:00:06                                                     

Min interval     : 00:00:06                                                    

Correct-action   : -NA-                                                        

Description      : A Real-time test, disabled 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/*

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

Test name

测试例的名称

Test attributes

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

Test interval

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

Min interval

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

Correct-action

测试失败时的触发动作

Description

测试例的描述信息

Exec

和测试例绑定的Tcl脚本的路径。当测试例没有和Tcl脚本绑定时,显示为-NA-

 

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日志的信息。(独立运行模式)

<sysname> display diagnostic event-log

Event: E_INFO, Sun Jul 28 15:33:06:372 2013, -Slot=10 TestName->HGMonitor, Event_INFO: Result->Success.                             

Event: E_INFO, Sun Jul 28 15:34:06:372 2013, -Slot=10 TestName->HGMonitor, Event_INFO: Result->Success

# 显示所有错误相关的GOLD日志的信息。(IRF模式)

<sysname> display diagnostic event-log error

Event: E_ERROR, Sun Jul 28 15:33:06:372 2013, -Chassis=2-Slot=15 TestName->HGMonitor, Event_INFO: Result->Failure Reason->Port Link Error.

Event: E_ERROR, Sun Jul 28 15:33:06:372 2013, -Chassis=2-Slot=15 TestName->HGMonitor, Event_INFO: Result->Failure Reason->Port Link Error.

# 显示所有非错误的GOLD日志的信息。(IRF模式)

<sysname> display diagnostic event-log info

Event: E_INFO, Sun Jul 28 15:33:06:372 2013, -Chassis=2-Slot=15 TestName->HGMonitor, Event_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 slot slot-numberchassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。不指定chassis时,显示所有成员设备上测试例的诊断结果。指定chassis不指定slot参数时,显示指定成员设备所有单板上测试例的执行结果。(IRF模式)

test test-name:指定测试例的名称,为1~31个字符的字符串,不区分大小写。不指定该参数时,表示指定单板上的所有测试例。

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

【举例】

# 显示10号单板上所有测试例的简要诊断结果。(独立运行模式)

<sysname> display diagnostic result slot 10

Slot 10:

  Name                    Run count    Failure count    Last result

  HGMonitor               10           3                Failure

# 显示成员设备1中10号单板上所有测试例的简要诊断结果。(IRF模式)

<sysname> display diagnostic result chassis 1 slot 10

Chassis 1 slot 10:

  Name                    Run count    Failure count    Last result

  HGMonitor               10           3                Failure

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

<sysname> display diagnostic result verbose

Slot 10:

  Test name                : HGMonitor

  Total run count          : 1837

  Total failure count      : 1609

  Consecutive failure count: 0

  Last execution time      : Wed Dec 26 15:03:11 2012

  First failure time       : Wed Dec 26 10:27:07 2012

  Last failure time        : Wed Dec 26 15:03:01 2012

  Last pass time           : Wed Dec 26 15:03:11 2012

  Last execution result    : Success

  Last failure reason      : -NA-

  Next execution time      : Wed Dec 26 15:03:21 2012

  Port link status : Normal

表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

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

 

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 [ slot slot-number ]:chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号,不指定chassis时,显示所有设备的模拟诊断配置。指定chassis未指定槽位号时,显示指定设备所有板的模拟诊断配置。(IRF模式)

【使用指导】

该命令用来显示模拟诊断的配置信息。如果指定的槽号上没有配置模拟诊断,则不显示任何内容。

【举例】

# 显示10号单板上配置的模拟诊断配置信息。(独立运行模式)

<sysname> diagnostic simulation slot 10 test HGMonitor failure

<sysname> display diagnostic simulation slot 10

Slot 10:

Name                            Mode

HGMonitor                       failure

# 显示10号单板上配置的模拟诊断配置信息。(IRF模式)

<sysname> diagnostic simulation chassis 1 slot 10 test HGMonitor failure

<sysname> display diagnostic simulation chassis 1 slot 10

Chassis 1 slot 10:

  Name                            Mode

  HGMonitor                       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 [ slot slot-number ]:chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。不指定chassis时,清除所有设备的结果。指定chassis未指定槽位号时,清除指定设备所有板的结果。(IRF模式)

test test-name:指定测试例的名称,为1~31个字符的字符串,不区分大小写。不指定该参数时,表示指定单板上的所有测试例。

【使用指导】

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

【举例】

# 清除10号单板上HGMonitor的测试结果。(独立运行模式)

<sysname> reset diagnostic result slot 10 test HGMonitor

# 清除成员设备1的10号单板上HGMonitor的测试结果。(IRF模式)

<sysname> reset diagnostic result chassis 1 slot 10 test HGMonitor

【相关命令】

·     display diagnostic result

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

新华三官网
联系我们