01-GOLD配置
本章节下载: 01-GOLD配置 (184.30 KB)
目 录
GOLD(Generic OnLine Diagnostics,通用在线诊断)通过在设备上执行诊断测试例,来发现硬件故障,并进行问题报告。GOLD检查的硬件故障主要包括:端口、内存、芯片、连接、转发路径以及控制路径是否正常等。
GOLD目前仅支持监控诊断。
监控诊断(Monitoring Diagnostics):设备在运行过程中按照一定的时间间隔执行测试例,来周期检测系统中的硬件是否故障并记录诊断结果。监控诊断只能执行非破坏性的测试例。
GOLD使用测试例来描述诊断(测试)的内容。测试例的内容(参数)包括测试的名称、诊断的类型、描述信息、属性(破坏性的/非破坏性的等)、缺省是否执行以及执行的时间等。设备支持哪些测试例以及测试例内容的缺省值与设备的型号以及启动软件包版本有关,由开发人员根据产品需求在软件开发阶段指定。测试例的部分参数用户可以使用本文中提供的命令行修改,其它参数则不能修改。测试例压缩在System包中,和System包一起发布、安装。所有测试例开启后,均在后台执行,用户可以通过相应的display命令查看测试结果或者日志信息来判断设备是否出现了硬件故障。
GOLD配置任务如下:
(1) 配置诊断
¡ 配置监控诊断
(2) (可选)配置GOLD日志存储参数
对于缺省开启的监控诊断测试例,在设备启动后会自动执行;对于缺省没有开启的监控诊断测试例,需通过diagnostic monitor enable命令开启监控诊断功能。
开启监控诊断测试例后,测试例会按照指定的时间间隔执行。
(1) 进入系统视图。
system-view
(2) 开启监控诊断功能。
diagnostic monitor enable slot slot-number-list [ test test-name ]
缺省情况下,不同监控诊断测试例的开启/关闭状态不同,请使用display diagnostic content命令查看。
(3) 配置监控诊断测试例的执行时间间隔。
diagnostic monitor interval slot slot-number-list [ test test-name ] time interval
缺省情况下,不同测试例的执行时间间隔不同,请使用display diagnostic content命令查看。
interval的值不能小于监控诊断测试例要求的最小值。执行携带verbose参数的display diagnostic content命令,通过显示信息中的Min interval字段可获知监控诊断测试例要求的最小值。
GOLD会自动生成日志,用于记录测试例的执行结果等信息。用户可以通过display diagnostic event-log命令查看这些日志。
(1) 进入系统视图。
system-view
(2) 配置可存储的GOLD日志的最大条数。
diagnostic event-log size number
缺省情况下,可存储的GOLD日志的最大条数为512条。
当产生的日志条数超过用户配置的最大条数时,GOLD会自动删除最老日志。
在完成上述配置后,在任意视图下执行display命令可以显示配置后GOLD的运行情况,通过查看显示信息验证配置的效果。
在用户视图下执行reset命令可以清除GOLD日志信息和诊断测试结果。
表1-1 GOLD显示和维护
操作 |
命令 |
显示测试例的内容 |
display diagnostic content [ slot slot-number ] [ verbose ] |
显示GOLD日志的信息 |
display diagnostic event-log [ error | info ] |
显示测试例的执行结果 |
display diagnostic result [ slot slot-number [ test test-name ] ] [ verbose ] |
清除GOLD日志 |
reset diagnostic event-log |
清除诊断测试结果 |
reset diagnostic result [ slot slot-number [ test test-name ] ] |
在slot 1上,开启监控诊断测试例CpuVoqMonitor并配置测试例的时间间隔为1分钟。(测试例的支持情况与设备的型号有关,请以设备的实际情况为准。CpuVoqMonitor仅为示例)
# 查看slot 1上监控诊断测试例的缺省开启状态和时间间隔。
<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 :
Test name : CpuVoqMonitor
Test attributes : **M*PA
Test interval : 00:00:10
Min interval : 00:00:01
Correct-action : -NA-
Description : A Real-time test, enabled by default that checks cpu voq status.
Exec : -NA-
# 开启slot 1上的监控诊断测试例CpuVoqMonitor。
<Sysname> system-view
[Sysname] diagnostic monitor enable slot 1 test CpuVoqMonitor
# 配置slot 1上的监控诊断测试例CpuVoqMonitor的时间间隔为1分钟。
[Sysname] diagnostic monitor interval slot 1 test CpuVoqMonitor time 0:1:0
# 查看配置的结果。
[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:
Test name : CpuVoqMonitor
Test attributes : **M*PA
Test interval : 00:01:00
Min interval : 00:00:01
Correct-action : -NA-
Description : A Real-time test, enabled by default that checks cpu voq status.
Exec : -NA-
# 查看slot 1上监控诊断测试例的执行结果。
[Sysname] display diagnostic result slot 1 verbose
Slot 1:
Test name : CpuVoqMonitor
Total run count : 1247
Total failure count : 0
Consecutive failure count: 0
Last execution time : Mon Feb 25 18:09:21 2019
First failure time : -NA-
Last failure time : -NA-
Last pass time : Mon Feb 25 18:09:21 2019
Last execution result : Success
Last failure reason : -NA-
Next execution time : Mon Feb 25 18:10:21 2019
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!