Where are log files of a switch saved and how to view log files

47

A switch can save logs and alarms in log files. The log file saving method varies depending on product models and versions.
All fixed switches running V200R002C00 or V200R003C00, and S5700SI, S5700EI, S5700HI, and S6700 running V200R005C00 or a later version:
User logs are created after the switch restarts or the save logfile command is executed. These logs are saved in the syslogfile folder in standard zip format. The file name of a log file starts with syslogfile, followed by the time when the file is created, for example, syslogfile-2013-06-26-09-59-10.zip.
Important information log files are created after a system restart and on 00:00 every day. These logs are saved in the resetinfo folder in standard zip format. The name of an important information log file created after a system restart starts with reset-sysinfo, for example, reset-sysinfo-2013-06-06-23-40-32.zip. The name of an important information log file automatically created on 00:00 starts with sysinfo, for example, sysinfo-2013-06-20-00-00-29.zip.

S1720, S2720, S2750, S5700LI, S5700S-LI, S5710-X-LI, S5720SI, S5720S-SI, S5710EI, S5720EI, S5710HI, S5720HI, and S6720EI running V200R005C00 or a later version:
The system periodically saves information in the log buffer to a user log file (log.log) and a diagnostic log file (log.dblg), which are saved in the logfile folder. When the two log files exceed the specified size, the system compresses them into zip packages and names the compressed files date time.log.zip and date time.dblg.zip, for example, 2013-08-14.04-55-23.log.zip and 2013-09-05.05-15-23.dblg.zip.
Important information log files are created after a system restart and on 00:00 every day. These logs are saved in the resetinfo folder in standard zip format. The name of an important information log file created after a system restart starts with reset-sysinfo, for example, reset-sysinfo-2013-06-06-23-40-32.zip. The name of an important information log file automatically created on 00:00 starts with sysinfo, for example, sysinfo-2013-06-20-00-00-29.zip.
Perform the following steps to obtain logs and alarms from log files:
Run the save logfile command to save information in the log buffer to a log file.
Upload all files in flash:/syslogfile/ (or flash:/logfile/ in V200R005C00 and later versions) and flash:/resetinfo/ to your computer through FTP or TFTP.
NOTE:
If a fault occurs in a stack, for example, the stack splits or restarts unexpectedly, collect log files on all the member switches.

Other related questions:
Where are log files saved
Log files of a switch are saved in the syslogfile or logfile folder in the flash memory. dir //Display all the files and folders in the flash memory. Directory of flash:/ Idx Attr Size(Byte) Date Time FileName 0 -rw- 1,766 Dec 24 2040 03:37:54 private-data.txt 3 drw- - Dec 24 2040 03:40:12 syslogfile 4 drw- - Dec 24 2040 03:37:58 compatible 16 -rw- 10,571 Jan 04 2041 03:51:18 elabel-slot0.fls ... cd logfile //Access the logfile folder. dir Directory of flash:/logfile/ Idx Attr Size(Byte) Date Time FileName 0 -rw- 10,824 Jan 24 2042 09:15:04 logfile-2042-01-24-09-15-03.zip 1 -rw- 15,334 Feb 03 2042 14:45:08 logfile-2042-02-03-14-45-08.zip

How are log files saved
The log files are saved when a storage device such as a Flash memory, a USB flash drive or an SD card is available. In the user view, run the save logfile command to save log files.

How to view logs and alarms on S series switches
For S series switches (except the S1700), logs are stored first in the log buffer. When the number of logs reaches the threshold, they will be stored in the syslogfile or logfile folder of the storage card on the device. To view log files and the log buffer, run the following commands: - To view log files in the logfile folder, run the following commands in the user view: cd logfile//Access the root directory of the logfile folder dir//Display all files in the root directory Directory of flash:/logfile/ Idx Attr Size(Byte) Date Time FileName 0 -rw- 516,885 Feb 14 2009 02:13:14 2009-02-14.02-13-00.dblg.zip 1 -rw- 479,440 Jan 17 2009 04:10:43 2009-01-17.04-10-30.dblg.zip 2 -rw- 484,459 Jan 25 2009 19:35:59 2009-01-25.19-35-45.dblg.zip 3 -rw- 160,660 Mar 17 2009 14:27:58 2009-03-17.12-27-52.dblg.zip - To check the detailed logs in the log files, run the display logfile logfile/xxxx command, in which xxxx indicates the log file name. - To view logs in the log buffer, run the display logbuffer command. - To view logs in the trap buffer, run the display trapbuffer command. - To view the uncleared alarms after the device starts, run the display alarm active command. - To view historical alarms recorded after the device starts, run the display alarm history command. - To view alarms related to device hardware management, run the display alarm urgent [ slot slot-id | time interval ] command. This command applies only to S series fixed switches. For the meaning of logs, you can log in to Huawei Enterprise Product & Service Support , download the appropriate Log Reference and Alarms Handling documents, and find the meaning for specific logs.

How can I view logs on a WLAN device
Logs generated on a WLAN device are saved in the log buffer. After the number of logs reaches the specified threshold, the logs are saved to the syslogfile or logfile folder in the device's flash memory. A device records user operations in logs, so you can also view the log file to check operations. To view the log buffer and log files on a WLAN device, perform the following operations: - To view the file logs in the logfile folder, run the following commands in the user view: cd logfile //Enter the root directory of the logfile folder. dir //Display all files in the root directory. Directory of flash:/logfile/ Idx Attr Size(Byte) Date Time(LMT) FileName 0 -ro- 861,301 Apr 15 2015 07:36:41 2015-04-15.07-36-36.dblg.zip 1 -ro- 883,298 Apr 27 2015 21:41:43 2015-04-27.21-41-38.dblg.zip 2 -ro- 1,071,688 Jun 11 2015 20:04:00 2015-06-11.20-03-54.dblg.zip 3 -ro- 826,422 Jun 24 2015 11:57:54 2015-06-24.11-57-49.log.zip 4 -ro- 630,868 Sep 12 2015 04:34:49 2015-09-12.04-34-45.log.zip 5 -rw- 1,392,179 Sep 14 2015 15:41:30 log.dblg 6 -rw- 5,108,562 Sep 14 2015 20:21:54 log.log The xx.dblg.zip file contains all archived logs, and you can open it after decompressing it. The log.dblg file can be displayed in the diagnostic view using the display diag-logfile command, and the log.log file can be displayed using the display logfile command. - To view detailed log information in a log file, run the display logfile logfile/xxxx command. xxxx specifies the log file name. - To view logs in the log buffer, run the display logbuffer command. - To view logs in the trap buffer, run the display trapbuffer command. For more information about logs, visit Huawei Enterprise Product & Service Support to download and view the Log Reference and Alarm Reference of the appropriate product.

Methods of outputting logs to log files on S series switches
The S series switches (except the S1700) support the storage of logs and alarms in the log files. You can run the dir command in the user view to view the log files, which are named syslogfile or logfile. Perform the following steps to obtain logs and alarms from log files: 1. Run the save logfile command to save information in the log buffer to syslogfile or logfile. Remarks: The device automatically saves logs at regular intervals. The syslogfile file is saved automatically every time the device restarts. The logfile file is automatically saved at regular intervals. 2. After running the save logfile command, you can transfer log files to the terminal (PC) through FTP or TFTP.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top