设为首页收藏本站language→→ 语言切换

鸿鹄论坛

 找回密码
 论坛注册

QQ登录

先注册再绑定QQ

查看: 458|回复: 14
收起左侧

[分享] H3C路由器故障日志介绍

[复制链接]
发表于 2024-4-28 09:54:25 | 显示全部楼层 |阅读模式
logfile日志 logfileX.log 命令行记录、设备运行中产生的记录信息

diagfile日志 diagfileX.log 设备运行中产生的诊断日志信息,如系统运行到错误流程时的参数值、单板无法启动时的信息、主控板与接口板通信异常时的握手信息。

诊断信息 XXX.gz
系统当前多个功能模块运行的统计信息,包括设备状态、CPU状态、内存状态、配置情况、软件表项、硬件表项等收集诊断信息会导致设备性能下降,请谨慎使用

对于 logfile 日志和 diagfile 日志,当日志文件写满,产生新的日志文件时,设备会将旧的日志文件自动压缩成.gz 文件
顶.png
 楼主| 发表于 2024-4-28 09:55:16 | 显示全部楼层
logfile 日志
(1) 执行 logfile save 命令将日志文件缓冲区中的内容全部保存到日志文件中。日志文件缺省
存储在存储介质的 logfile 目录中。
<Sysname> logfile save
The contents in the log file buffer have been saved to the file
cfa0:/logfile/logfile8.log

(2) 查看日志文件的数目和名称。

查看设备的 logfile 日志:(集中式设备)
<Sysname> dir cfa0:/logfile/
Directory of cfa0:/logfile
0 -rw- 21863 Jul 11 2013 16:00:37 logfile8.log
1021104 KB total (421552 KB free)

查看主设备的 logfile 日志:(集中式 IRF 设备)
<Sysname> dir flash:/logfile/
Directory of flash:/logfile
0 -rw- 21863 Jul 11 2013 16:00:37 logfile.log
1021104 KB total (421552 KB free)
顶.png
沙发 2024-4-28 09:55:16 回复 收起回复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2024-4-28 09:58:06 | 显示全部楼层
查看成员设备的 logfile 日志:(集中式 IRF 设备)

<Sysname> dir slot2#flash:/logfile/
Directory of slot2#flash:/logfile
0 -rw- 21863 Jul 11 2013 16:00:37 logfile.log
1021104 KB total (421552 KB free)

查看设备主用主控板的 logfile 日志:(分布式设备-独立运行模式)
<Sysname> dir cfa0:/logfile/
Directory of cfa0:/logfile
0 -rw- 21863 Jul 11 2013 16:00:37 logfile8.log
1021104 KB total (421552 KB free)

查看设备备用主控板的 logfile 日志:(分布式设备-独立运行模式)
<Sysname> dir slot1#cfa0:/logfile/
Directory of slot1#cfa0:/logfile
0 -rw- 21863 Jul 11 2013 16:00:37 logfile8.log
1021104 KB total (421552 KB free)
0 -rw- 21863 Jul 11 2013 16:00:37 logfile8.log
1021104 KB total (421552 KB free
顶.png
板凳 2024-4-28 09:58:06 回复 收起回复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2024-4-28 09:58:45 | 显示全部楼层
查看主设备主用主控板的 logfile 日志:(分布式设备-IRF 模式)
<Sysname> dir cfa0:/logfile/
Directory of cfa0:/logfile
0 -rw- 21863 Jul 11 2013 16:00:37 logfile8.log
1021104 KB total (421552 KB free)

查看主设备备用主控板的 logfile 日志:(分布式设备-IRF 模式)
<Sysname> dir slot1#cfa0:/logfile/
Directory of slot1#cfa0:/logfile
0 -rw- 21863 Jul 11 2013 16:00:37 logfile8.log
1021104 KB total (421552 KB free)

查看成员设备主控板的 logfile 日志,如果备设备有两块主控板,则两块都需要检查:(分布式
设备-IRF 模式)
<Sysname> dir chassis2#slot0#cfa0:/logfile/
Directory of chassis2#slot0#cfa0:/logfile
0 -rw- 21863 Jul 11 2013 16:00:37 logfile8.log
1021104 KB total (421552 KB free)

使用 FTP、TFTP 或者 USB 接口将日志文件传输到指定位置。
顶.png
地板 2024-4-28 09:58:45 回复 收起回复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2024-4-28 09:59:20 | 显示全部楼层
diagfile 日志
(1) 执行 diagnostic-logfile save 命令将诊断日志文件缓冲区中的内容全部保存到诊断日
志文件中。诊断日志文件缺省存储在存储介质的 diagfile 目录中。
<Sysname> diagnostic-logfile save
The contents in the diagnostic log file buffer have been saved to the file
cfa0:/diagfile/diagfile18.log
顶.png
5# 2024-4-28 09:59:20 回复 收起回复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2024-4-28 09:59:43 | 显示全部楼层
查看诊断日志文件的数目和名称。
&#8226;查看设备的 diagfile 日志:(集中式设备)
<Sysname> dir cfa0:/diagfile/
Directory of cfa0:/diagfile
0 -rw- 161321 Jul 11 2013 16:16:00 diagfile18.log
1021104 KB total (421416 KB free)
顶.png
6# 2024-4-28 09:59:43 回复 收起回复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2024-4-28 10:00:10 | 显示全部楼层
查看主设备的 diagfile 日志:(集中式 IRF 设备)
<Sysname> dir flash:/diagfile/
Directory of flash:/diagfile
0 -rw- 161321 Jul 11 2013 16:16:00 diagfile18.log
1021104 KB total (421416 KB free)

查看成员设备的 diagfile 日志:(集中式 IRF 设备)
<Sysname> dir slot2#flash:/diagfile/
Directory of slot2#flash:/diagfile
0 -rw- 161321 Jul 11 2013 16:16:00 diagfile18.log
1021104 KB total (421416 KB free)
顶.png
7# 2024-4-28 10:00:10 回复 收起回复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2024-4-28 10:00:40 | 显示全部楼层
查看设备主用主控板的 diagfile 日志:(分布式设备-独立运行模式)
<Sysname> dir cfa0:/diagfile/
Directory of cfa0:/diagfile
0 -rw- 161321 Jul 11 2013 16:16:00 diagfile18.log
1021104 KB total (421416 KB free)

查看设备备用主控板的 diagfile 日志:(分布式设备-独立运行模式)
<Sysname> dir slot1#cfa0:/diagfile/
Directory of slot1#cfa0:/diagfile
0 -rw- 161321 Jul 11 2013 16:16:00 diagfile18.log
1021104 KB total (421416 KB free)
顶.png
8# 2024-4-28 10:00:40 回复 收起回复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2024-4-28 10:01:21 | 显示全部楼层
查看主设备主用主控板的 diagfile 日志:(分布式设备-IRF 模式)
<Sysname> dir cfa0:/diagfile/
Directory of cfa0:/diagfile
0 -rw- 161321 Jul 11 2013 16:16:00 diagfile18.log
1021104 KB total (421416 KB free)

查看主设备备用主控板的 diagfile 日志:(分布式设备-IRF 模式)
<Sysname> dir slot1#cfa0:/diagfile/
Directory of slot1#cfa0:/diagfile
0 -rw- 161321 Jul 11 2013 16:16:00 diagfile18.log
1021104 KB total (421416 KB free)

查看成员设备主控板的 diagfile 日志,如果成员设备有两块主控板,则两块都需要检查:(分布式设备-IRF 模式)
<Sysname> dir chassis2#slot0#cfa0:/diagfile/
Directory of chassis2#slot0#cfa0:/diagfile
0 -rw- 161321 Jul 11 2013 16:16:00 diagfile18.log
1021104 KB total (421416 KB free)

使用 FTP、TFTP 或者 USB 接口将诊断日志文件传输到指定位置
顶.png
9# 2024-4-28 10:01:21 回复 收起回复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2024-4-28 10:02:06 | 显示全部楼层
诊断信息可以通过两种方式收集:将诊断信息保存到文件,或者将诊断信息直接显示在屏幕上。为保证信息收集的完整性,建议您使用将诊断信息保存到文件的方式收集诊断信息。

需要注意的是,设备上单板越多,诊断信息收集的时间越长,信息收集期间不能输入命令,请耐心等待

通过 Console 口收集诊断信息所用的时间比通过业务网口收集所用的时间要长。在有可用业务网口或管理口的情况下,建议通过业务网口或管理口登录和传输文件
顶.png
10# 2024-4-28 10:02:06 回复 收起回复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2024-4-28 10:02:48 | 显示全部楼层
执行 screen-length disable 命令,以避免屏幕输出被打断(如果是将诊断信息保存到文件中,则忽略此步骤)。

<Sysname> screen-length disable

执行 display diagnostic-information 命令收集诊断信息。

<Sysname> display diagnostic-information

Save or display diagnostic information (Y=save, N=display)? [Y/N]
顶.png
11# 2024-4-28 10:02:48 回复 收起回复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2024-4-28 10:03:08 | 显示全部楼层
输入“Y”,以及保存诊断信息的路径和名称,将诊断信息保存至文件中。
Save or display diagnostic information (Y=save, N=display)? [Y/N] : Y
Please input the file name(*.tar.gz)[ cfa0:/diag.tar.gz] :cfa0:/diag.tar.gz
Diagnostic information is outputting to cfa0:/diag.tar.gz.
Please wait...
Save successfully.
<Sysname> dir cfa0:/
Directory of cfa0:
……
6 -rw- 898180 Jun 26 2013 09:23:51 diag.tar.gz
1021808 KB total (259072 KB free)
顶.png
12# 2024-4-28 10:03:08 回复 收起回复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2024-4-28 10:04:22 | 显示全部楼层
故障自己搞不定,最常见的方法就是下载日志文件,发给H3C后台技术支持人员。
然后坐等回复。
用户支持邮箱:service@h3c.com
技术支持热线电话:400-810-0504

顶.png
13# 2024-4-28 10:04:22 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2024-4-28 10:18:34 | 显示全部楼层
不错,加油,上次楼主分享的是命令总结,这次是日志的收集
14# 2024-4-28 10:18:34 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2024-5-12 03:01 , Processed in 0.068562 second(s), 12 queries , Redis On.  

  Powered by Discuz!

  © 2001-2024 HH010.COM

快速回复 返回顶部 返回列表