Obtaining Diagnostic Information and Log Files from an S7700 Stack System
Introduction
This document describes how to obtain diagnostic information and log files in a CSS of S series switches.
When a Cluster Switch System (CSS) is not operating properly, you can transfer the device diagnostic information and log files to a server to locate the fault.
Prerequisites
This document applies to all versions of S series modular switches. The command output is obtained from the lab environment. The command outputs in this document are for reference only.
To obtain diagnostic information and log files from a CSS, ensure that there are reachable routes between the server and CSS.
Procedure
- Save the latest log file manually. Log files will be saved periodically. You are advised to manually save log information in the log buffer to log files when obtaining log files.
<HUAWEI> save logfile all Info: Save logfile successfully. Info: Save diagnostic logfile successfully.
- Generate a diagnostic information file.
<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.
- The default path of a text file is the root directory of the device storage, for example, flash:/. You can run the dir command in the user view to check whether the text file has been created.
- The display diagnostic-information file-name command is used to collect system diagnostic information for fault location. Executing this command may affect the system performance. For example, it may cause a high CPU usage. Therefore, do not run this command when the system is operating properly. Additionally, do not simultaneously run this command on multiple terminals connected to the switch. Otherwise, the CPU usage of the switch will increase sharply, causing system performance deterioration.
- Transfer diagnostic information files and log files to the server through FTP. The CSS functions as the FTP client, and the server functions as the FTP server. The FTP function has been enabled on the server.
- Run the dir ? command to check the status of the CSS flash memory. The following command output shows that the flash memories of the four MPUs in the CSS are 1/9#flash, 1/10#flash, 2/10#flash, and 2/9#flash respectively.
<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
The slot information of a CSS consists of the chassis ID and slot ID. In the preceding command output, 1/9, 1/10, 2/10, and 2/9 indicate the slot IDs of MPUs in the CSS. 1 and 2 indicate the chassis IDs, and 9 and 10 indicate the slot IDs of the MPUs. You can run the display device command to check slot IDs of MPUs in a CSS.
- Set up an FTP connection between the CSS and the file server. 192.168.1.6 in the command is the IP address of the file server.
<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
- Upload the diagnostic information file of the CSS to the file server.
[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.
- Upload the diagnostic information files, user log files, and diagnostic log files of the four MPUs to the server.The following describes how to obtain the latest diagnostic log file and user log file. To obtain a compressed log file, change the file name in the command to that of the desired .zip file.
[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
- Run the dir ? command to check the status of the CSS flash memory. The following command output shows that the flash memories of the four MPUs in the CSS are 1/9#flash, 1/10#flash, 2/10#flash, and 2/9#flash respectively.