从S7700集群系统中获取诊断信息和日志文件
操作步骤
- 手动保存最新的日志文件。日志文件会定时进行保存,建议在获取日志文件时,手动将缓存区中的日志信息保存到日志文件。
<HUAWEI> save logfile all Info: Save logfile successfully. Info: Save diagnostic logfile successfully.
- 将设备的诊断信息保存到dia-info.txt文件中。
<HUAWEI> display diagnostic-information dia-info.txt Now saving the diagnostic information to the device 100% Info: The diagnostic information was saved to the device successfully.
- txt文件的缺省保存路径为设备存储器根目录,例如flash:/,用户视图下使用dir命令可以确认文件是否已生成。
- 该命令主要用于问题定位,搜集系统诊断信息,搜集时可能会影响系统的性能(例如CPU占用率升高等)。因此,在系统正常运行时不建议执行该命令。并且,严禁在连接到设备的多个终端上同时执行该命令,否则可能造成设备的CPU占用率明显增高,导致设备性能下降。
- 通过FTP方式将诊断信息文件和日志文件传输到文件服务器。这里集群系统作为FTP客户端,文件服务器作为FTP服务器端,文件服务器已开启FTP功能。
- 执行dir ?查看当前集群系统的存储器状态。通过下面的显示可以看出该集群系统4块主控板的存储器分别为:1/9#flash、1/10#flash、2/10#flash、2/9#flash。
<HUAWEI> dir ? 1/9#flash: Device name 1/10#flash: Device name 2/10#flash: Device name 2/9#flash: Device name /all List all files /all-filesystems List files on all filesystems STRING [drive][path][file name] flash: Device name
集群系统槽位号是二维的,由框ID和槽位号组成。如上:1/9、1/10、2/10和2/9表示集群系统的主控板槽位号。其中1和2表示框ID,9和10表示主控板所在的槽位号。真实环境中集群系统主控板槽位号可以通过执行命令display device获取。
- 集群系统与文件服务器建立FTP连接。192.168.1.6是文件服务器的IP地址。
<HUAWEI> ftp 192.168.1.6 Trying 192.168.1.6 ... Press CTRL+K to abort Connected to 192.168.1.6. 220 WFTPD 2.0 service (by Texas Imperial Software) ready for new user User(192.168.1.6:(none)):test 331 Give me your password, please Enter password: 230 Logged in successfully
- 将集群系统的诊断信息文件上传到文件服务器。
[ftp] put flash:/dia-info.txt 200 PORT command okay 150 "F:\ftp\dia-info.txt" file ready to receive in ASCII mode 226 Transfer finished successfully. FTP: 3361771 byte(s) sent in 5.995 second(s) 547.61Kbyte(s)/sec.
- 将4个主控板的用户日志文件和诊断日志文件上传到文件服务器。这里是以获取最新的诊断日志文件和用户日志文件为例,如果想要获取已经压缩的日志文件,只需要把文件名修改为压缩后的zip文件即可。
[ftp] put 1/9#flash:/logfile/log.log log-1-9.log 200 PORT command okay 150 "F:\ftp\log-1-9.log" file ready to receive in ASCII mode 226 Transfer finished successfully. FTP: 5573930 byte(s) sent in 12.232 second(s) 524.84Kbyte(s)/sec. [ftp] put 1/9#flash:/logfile/log.dblg log-1-9.dblg 200 PORT command okay 150 "F:\ftp\log-1-9.dblg" file ready to receive in ASCII mode 226 Transfer finished successfully. FTP: 5573930 byte(s) sent in 12.232 second(s) 524.84Kbyte(s)/sec. [ftp] put 1/10#flash:/logfile/log.log log-1-10.log 200 PORT command okay 150 "F:\ftp\log-1-10.log" file ready to receive in ASCII mode 226 Transfer finished successfully. FTP: 5573930 byte(s) sent in 12.232 second(s) 524.84Kbyte(s)/sec. [ftp] put 1/10#flash:/logfile/log.dblg log-1-10.dblg 200 PORT command okay 150 "F:\ftp\log-1-10.dblg" file ready to receive in ASCII mode 226 Transfer finished successfully. FTP: 5573930 byte(s) sent in 12.232 second(s) 524.84Kbyte(s)/sec. [ftp] put 2/9#flash:/logfile/log.log log-2-9.log 200 PORT command okay 150 "F:\ftp\log-2-9.log" file ready to receive in ASCII mode 226 Transfer finished successfully. FTP: 5573930 byte(s) sent in 12.232 second(s) 524.84Kbyte(s)/sec. [ftp] put 2/9#flash:/logfile/log.dblg log-2-9.dblg 200 PORT command okay 150 "F:\ftp\log-2-9.dblg" file ready to receive in ASCII mode 226 Transfer finished successfully. FTP: 5573930 byte(s) sent in 12.232 second(s) 524.84Kbyte(s)/sec. [ftp] put 2/10#flash:/logfile/log.log log-2-10.log 200 PORT command okay 150 "F:\ftp\log-2-9.log" file ready to receive in ASCII mode 226 Transfer finished successfully. FTP: 5573930 byte(s) sent in 12.232 second(s) 524.84Kbyte(s)/sec. [ftp] put 2/10#flash:/logfile/log.dblg log-2-10.dblg 200 PORT command okay 150 "F:\ftp\log-2-10.dblg" file ready to receive in ASCII mode 226 Transfer finished successfully. FTP: 5573930 byte(s) sent in 12.232 second(s) 524.84Kbyte(s)/sec. [ftp] quit
- 执行dir ?查看当前集群系统的存储器状态。通过下面的显示可以看出该集群系统4块主控板的存储器分别为:1/9#flash、1/10#flash、2/10#flash、2/9#flash。