No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Troubleshooting Guide

CloudEngine 16800, 12800, 12800E, 8800, 7800, 6800, and 5800 Series Switches

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
How Do I Collect Logs of a Device?

How Do I Collect Logs of a Device?

Logs, including user logs and diagnostic logs, record user operations, system faults, and system security information.

Table 22-83 Methods for collecting logs

Log Information

Operation

Remarks

User logs

<HUAWEI> save logfile

The collected log information is saved in the log.log file in flash:/logfile.

When the log.log file exceeds the specified size, the system compresses it into a zip file and names the compressed file log_slot-id_time.log.zip. In the log name, slot-id and time indicate the slot ID and log file generation time.

Diagnostic logs

<HUAWEI> system-view
[~HUAWEI] diagnose
[~HUAWEI-diagnose] save logfile diagnose-log

The collected log information is saved in the diag.log file in flash:/logfile.

When the diag.log file exceeds the specified size, the system compresses it into a zip file and names the compressed file diaglog_slot-id_time.log.zip. In the log name, slot-id and time indicate the slot ID and log file generation time.

Diagnostics information of the system

<HUAWEI> system-view
[~HUAWEI] diagnose
[~HUAWEI-diagnose] collect diagnostic information

The collected log information is saved in the diagnostic_information.zip file in flash:/logfile or flash:/.

If the collect diagnostic information command is executed repeatedly, the diagnostic_information.zip file will be updated and overwrite the old one.

If the collected log information is saved in the logfile, you can run the following command to enter the logfile and view log files that are generated when the fault occurs (for example, March 10, 2018), in order to export files.

<HUAWEI> cd logfile/      //Enter the logfile.
<HUAWEI> dir      //View files in the logfile.
Directory of flash:/logfile/                                                                                                        
  Idx  Attr     Size(Byte)  Date        Time       FileName                     
    0  -rw-      1,215,581  Mar 10 2018 01:28:07   diag.log
    1  -rw-        598,074  Mar 08 2018 18:00:28   diaglog_6_20180308180027.log.zip                                                 
    2  -rw-        585,565  Mar 09 2018 22:31:53   diaglog_6_20180309223152.log.zip                                                 
    3  -rw-        577,576  Mar 10 2018 05:39:09   diaglog_6_20180310053908.log.zip
    4  lrw-             42  Mar 10 2018 06:20:34   diagnostic_information.zip -> flash:/diagnostic_information.zip     //This file is a link file. -> indicates that the former one the link file of the latter one, and the operating system diagnosis information can be exported in both directories.
    5  -rw-      7,392,575  Mar 10 2018 19:22:18   log.log 
    6  -rw-        171,657  Mar 08 2018 13:44:38   log_6_20180308134437.log.zip                                                     
    7  -rw-         71,056  Mar 09 2018 02:44:38   log_6_20180309024438.log.zip                                                     
    8  -rw-         73,260  Mar 09 2018 15:33:09   log_6_20180309153309.log.zip                                                     
    9  -rw-         71,613  Mar 10 2018 04:21:34   log_6_20180310042134.log.zip                                                     

To collect logs of the standby MPU, you can run the cd slave#flash command to enter the directory of the standby MPU, then run the cd logfile/ command to enter the logfile, and run the dir to view the files in the logfile.

When the log files are generated, you can export the files from the device using FTP, SFTP, or SCP. For details, see Local File Management.

You can also run the display logbuffer and display trapbuffer commands to view the log and trap information on the device, and save the information in diagnostic files on a disk. For details, see Diagnostic File Obtaining Guide.

Translation
Download
Updated: 2020-01-07

Document ID: EDOC1000060766

Views: 610267

Downloads: 2956

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Share
Previous Next