How to collect logs of a CE series switch


Log information is save in four types of log files including the diag.log, log.log, diagnose.log (one-click logs), (memory logs) files.

To analyze software issues, collect log information in the diag.log, log.log, diagnose.log (one-click logs are the most important) files.

To analyze hardware issues, collect log information in the diag.log, log.log, (memory logs, which are the most important logs) files, and other related command lines.

Collect log information using either of the following methods:

1. Collect diagnostic logs in one click.


[~HUAWEI] diagnose

[~HUAWEI-diagnose] display diagnostic-information >> diagnose.log


1. Executing the command takes about 5 minutes. Please wait.

2. The diagnose.log file is exported to the root directory of the active MPU.

< HUAWEI >cd flash:

<~HUAWEI >dir

3. Collect log information in the diag.log, log.log, and files.


[~HUAWEI] diagnose

[~HUAWEI-diagnose] collect diagnostic information
[~HUAWEI-diagnose] return
<HUAWEI >save logfile

<HUAWEI > cd logfile:

<HUAWEI >dir


You can run the mput * command to collect all logs.

[ftp]mput *

3. Run the following command lines to collect information to analyze hardware issues.


display startup

display version

display alarm active

display alarm history verbose

display device alarm hardware

display device

display device canbus (CE12800 series switches)

display device power sy

display device elabel

display device power

display health

display device board reset all (in the diagnostic view in some versions)

Other related questions:
How to collect logs on S series switches
The S series switches (except the S1700) support the storage of logs and alarms in log files. You can run the dir command in the user view to view the log files, which are named syslogfile or logfile. The syslogfile file is saved automatically every time the device restarts. The logfile file is automatically saved at regular intervals. Run the save logfile command to save information in the log buffer to syslogfile or logfile. In addition, if the system is faulty or under routine maintenance, you can run the display diagnostic-information [module-name] [ file-name ] command to view diagnosis information and check the running status of each module. In the command, file-name is the name of file that stores the diagnosis information.

You can perform the following steps to collect switch log files: 1. Run the save logfile command to save information in the log buffer to a log file. 2. Run the cd logfile command to access the directory where the log file is located. 3 Use FTP or TFTP to obtain the log.log and the log.dblg files from this directory.

For example, assume that the S series switch ( functions as the FTP client, and the PC ( functions as the FTP server. To upload the log.log and log.dblg files in the logfile directory of the switch to the PC, you must ensure that the switch and PC can communicate with each other and the FTP function is available. Use FTP to access the PC from the S series switch: cd logfile ftp //Enter the FTP user name and password put log.log put log.dblg

How to filter logs on CE series switches
Run the info-center filter-id { id | bymodule-alias modname alias } command in the system view to filter out the specified log information.
To filter out the log "ent_config_change", run the following commands:
<HUAWEI> system-view
[~HUAWEI] info-center filter-id bymodule-alias devm ent_config_change

How are logs of CE series switches stored
Logs generated by the system are first saved in the log buffer. The system automatically saves the logs to a log file (log.log or diag.log) every 30 minutes or when the log buffer is full. You can also manually save the logs in the log buffer to the log file using the command. User logs are saved in flash:/logfile/log.log and diagnostic logs are saved in flash:/logfile/diag.log. When the size of a log file reaches 8 MB, the system compresses the log file with the file name or Slot-id and time indicate the slot number and the generation time of the log file, respectively. The storage space for user logs and diagnostic logs is limited. You can run the display logfile storage-usage command to view its size and usage. Currently, the log storage space cannot be adjusted. If the available log storage space is less than 20%, the system will delete the earliest compressed log file to release space for the latest logs.

How are logs of CE series switches' VSs stored
VSs record only user logs in the log.log file, not diagnostic logs. Log files are saved in the logfile directory of VSs. In versions earlier than V100R006C00, the Admin-VS and VSs share the flash storage space, which is not fixed and restricted by the size of the upper-level directory. In V100R006C00 and later versions, independent flash storage space is allocated for VSs. In this case, the log storage space is restricted by the VS storage size.

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