Using the CLI to Collect Converged Switching Plane Information
Scenarios
Use the CLI to collect the following information:
- Logs
- Debugging information
- Trap information
Prerequisites
Conditions
WFTPD 4.2.4.610 or later has been installed. wftpd32.exe is a cross-platform tool used to transfer files from a PC to switch modules. This tool is a piece of third-party free software. Obtain it yourself.
Data
Parameter |
Example Value |
---|---|
IP address |
192.168.1.100 |
Subnet mask |
255.255.255.0 |
Default gateway |
0.0.0.0 |
The default user name of a switching plane is root, and the default password is Huawei12#$.
You can query and set IP addresses of all modules on the HMM WebUI. For details about how to log in to the HMM WebUI, see Logging In to the MM910 WebUI.
- For MM910 earlier than (U54) 2.20, choose System Management > Network Management > Switch Module > IP Address.
- For MM910 (U54) 2.20 or later, choose Chassis Settings > Network Settings > Switch Module.
Procedure
- Log in to the Ethernet switching plane CLI. For details, see Logging In to the MM910 CLI over a Network Port by Using PuTTY or Logging In to a Compute Node or a Switch Module over MM910 SOL.
- Configure an FTP server. For details, see Configuring an FTP Server.
- Log in through the serial port or SOL, and run the following commands on the Ethernet switching plane CLI to query whether an IP address is set for the management network port:
Skip this step if you log in to the switch module by using a network port.
<HUAWEI>system-view
[~HUAWEI]interface MEth 0/0/0
[~HUAWEI-MEth0/0/0]display this
- (Optional) After logging in to the Ethernet switching plane by using a serial port or the Serial over LAN (SOL) function, run the following commands on the switching plane CLI to query and set the IP address of the management network port so that the switch module can properly communicate with the FTP server:
Skip this step if you log in to the switch module by using a network port.
<HUAWEI>system-view
[~HUAWEI]interface MEth 0/0/0
[~HUAWEI-MEth0/0/0]ip address 192.168.100.123 24
[~HUAWEI-MEth0/0/0]commit
[~HUAWEI-MEth0/0/0]display this
# interface MEth0/0/0 ip address 192.168.100.123 255.255.255.0 # return
[~HUAWEI-MEth0/0/0]quit
[~HUAWEI]quit
- Obtain logs.
- View the log file system.
<HUAWEI>system-view
Enter system view, return user view with return command.
[~HUAWEI]diagnose
Warning: Enter diagnose view, return user view by pressing Ctrl+Z. Info: The diagnose view is used to debug system hardware and software. Misuse of some commands in this view will affect system performance. Therefore, use these commands with the guidance of Huawei engineers.
[~HUAWEI-diagnose]collect diagnostic information
Info: Succeeded in collecting diagnostic information in slot 3.
[~HUAWEI-diagnose]display diagnostic-information diag-info.txt
Now saving the diagnostic information to the device.......................................................................................................................................................... Info: The diagnostic information was saved to the device successfully.
[~HUAWEI-diagnose]return
<HUAWEI>save logfile
Info: Save logfile successfully.
<HUAWEI>dir
Directory of flash:/ Idx Attr Size(Byte) Date Time FileName 0 drwx - Apr 07 2014 22:32:50 $_checkpoint 1 dr-x - Feb 21 2014 15:03:54 $_security_info 2 -rw- 117,788,305 Jan 01 1970 00:03:53 xxx.cc 3 -rw- 117,784,209 Feb 21 2014 14:47:03 xxx.cc 4 -rw- 76,227,537 Feb 21 2014 14:41:45 xxx.cc 5 drwx - Jan 01 1970 00:00:19 POST 6 -rw- 10,568 Feb 21 2014 18:20:01 cfg_from_smm 7 -rw- 6,575 Mar 22 2014 04:14:27 cfg_local 8 -rw- 19,435 Mar 22 2014 04:14:24 device.sys 9 -rw- 1,130,184 Apr 08 2014 16:22:11 diagnostic_information.zip 10 drwx - Apr 08 2014 16:18:55 logfile 11 -rw- 1,838 Mar 22 2014 04:14:24 vrpcfg.zip 1,048,576 KB total (367,972 KB free)
<HUAWEI>dir logfile/
Directory of flash:/logfile/ Idx Attr Size(Byte) Date Time FileName 0 -rw- 7,971,326 Apr 08 2014 16:35:00 diag.log 1 -rw- 444,920 Feb 21 2014 18:23:11 diaglog_3_20140221182310.log.zip 2 -rw- 1,756,870 Apr 08 2014 16:18:55 diagnostic_information.zip 3 -rw- 4,269,737 Apr 08 2014 16:45:08 log.log 4 -rw- 354,428 Dec 22 2013 11:32:34 log_3_20131222113233.log.zip 5 -rw- 353,715 Jan 16 2014 08:50:19 log_3_20140116085018.log.zip 1,048,576 KB total (367,972 KB free)
- Query stack information.
Record the queried slot numbers and roles of the stacked switch modules.
<HUAWEI>display stack
-------------------------------------------------------------------------------- MemberID Role MAC Priority DeviceType Bay/Chassis -------------------------------------------------------------------------------- 2 Standby dcd2-fcf8-5600 100 CX310 2X/300 3 Master dcd2-fcf8-55c0 100 CX310 3X/300 --------------------------------------------------------------------------------
- Obtain the log file.
<HUAWEI>ftp 192.168.100.122
Trying 192.168.100.122 ... Press CTRL+K to abort Connected to 192.168.100.122. 220 WFTPD 2.0 service (by Texas Imperial Software) ready for new user User(192.168.100.122:(none)):huawei 331 Give me your password, please Enter password: 230 Logged in successfully
[ftp]binary
200 Type is Image (Binary)
# On the FTP server, create a log receiving directory for the master switch module in the stack. Replace 3 in swi3 with the actual stack ID of the master switch module. The stack ID is the switch module slot ID. (If the switch modules are not stacked, create a log receiving directory for the current switch module by replacing 3 in swi3 with the slot ID of the current switch module.)
[ftp]mkdir swi3
[ftp]cd swi3
[ftp]put flash:/diag-info.txt
200 Port command successful. 150 Opening data connection for diag-info.txt. / 100% [***********] 226 File received ok FTP: 1756870 byte(s) send in 0.308 second(s) 5570.431Kbyte(s)/sec.
[ftp]mput flash:/logfile/*
200 Port command successful. 150 Opening data connection for diag.log. / 100% [***********] 226 File received ok FTP: 7971326 byte(s) send in 0.798 second(s) 9755.010Kbyte(s)/sec. 200 Port command successful. 150 Opening data connection for diaglog_3_20140221182310.log.zip. / 100% [***********] 226 File received ok FTP: 444920 byte(s) send in 0.113 second(s) 3845.061Kbyte(s)/sec. 200 Port command successful. 150 Opening data connection for diagnostic_information.zip. / 100% [***********] 226 File received ok FTP: 1756870 byte(s) send in 0.308 second(s) 5570.431Kbyte(s)/sec. 200 Port command successful. 150 Opening data connection for log.log. / 100% [***********] 226 File received ok FTP: 4272491 byte(s) send in 3.492 second(s) 1194.832Kbyte(s)/sec. 200 Port command successful. 150 Opening data connection for log_3_20131222113233.log.zip. / 100% [***********] 226 File received ok FTP: 354428 byte(s) send in 0.238 second(s) 1454.289Kbyte(s)/sec. 200 Port command successful. 150 Opening data connection for log_3_20140116085018.log.zip. / 100% [***********] 226 File received ok FTP: 353715 byte(s) send in 0.265 second(s) 1303.486Kbyte(s)/sec.
[ftp]cd ..
# On the FTP server, create a log receiving directory for the standby or slave switch module in the stack. Replace 2 in swi2 with the actual stack ID of the standby or slave switch module. The stack ID is the switch module slot ID. (If the switch modules are not stacked, log in to the remaining switch modules and follow the preceding procedures to collect logs.)
[ftp]mkdir swi2
[ftp]cd swi2
[ftp]mput 2#flash:/logfile/*
[ftp]cd ..
[ftp]quit
221 Windows FTP Server (WFTPD, by Texas Imperial Software) says goodbye <HUAWEI>
- When you use the mput command on the FTP CLI, 2#flash:/ indicates the flash root directory of the switch module with the stack ID 2. You can obtain the stack ID and role information by using the display stack command.
- The flash root directory of the primary switch module in a stack is flash:/.
- If multiple switch modules are displayed after running the display stack command, obtain the log file of each switch module.
- View the log file in the FTP directory on the PC.
- View the log file system.