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


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


Configuration Guide - Device Management

S1720, S2700, S5700, and S6720 V200R011C10

This document describes the principles and configurations of the Device Management features, and provides configuration examples of these features.
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).
Configuring the Device to Output Traps to a Log File

Configuring the Device to Output Traps to a Log File


A log file can save debugging messages, logs and traps. After you configure the trap output function, traps can be saved in log files so that you can check device operating information from the log files later.

Traps can be saved in user log files and diagnostic log files. 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 and date, for example, and The saved information includes information about important operations such as a switch restart.

On the S1720GFR, S2750EI, S5700LI, and S5700S-LI (except S5700S-X-LI), information about important operations such as a switch restart is saved in both the logfile folder and the resetinfo folder in standard zip format. The file generated after a system restart starts with reset-sysinfo, for example, The name of a file automatically generated at 00:00 starts with sysinfo, for example, The file saved in the resetinfo folder does not support the following configurations.


  1. Run system-view

    The system view is displayed.

  2. Run info-center logfile channel { channel-number | channel-name }

    A channel through which logs are output to a log file is specified.

    By default, the device uses channel 9 to output logs to a log file.

  3. Run info-center source { module-name | default } channel { channel-number | channel-name } trap { state { off | on } | level severity } *

    The rule for outputting logs to the specified channel is configured.

    By default, channel 9 is enabled to output traps and the lowest severity is debugging.

  4. (Optional) Run info-center logfile size size

    The log file size is set.

    By default, the log file size is 8 MB.

    If the size of a log file generated on the device exceeds the configured log file size, the system decompresses the log file into a zip file.

  5. (Optional) Run info-center max-logfile-number filenumbers

    The maximum number of log files that can be saved is set.

    By default, a maximum of 200 log files can be saved.

    If the number of log files generated on the device exceeds the limit, the system deletes the oldest log file.

    If the remaining flash memory space is less than 30 MB, earlier compressed log files are deleted. If no compressed log files can be deleted and the remaining flash memory space is less than 30 MB, no log files will be generated.

  6. Run the quit command to return to the user view.
  7. (Optional) Run save logfile or save logfile all

    Logs in the log buffer are saved to a log file. To view current log information, run this command to save the logs in the log buffer to a log file.

    Logs in the log buffer can be manually saved to a log file. These logs will also be saved in a log file in the following situations:
    • Since the device starts, logs in the log buffer will be automatically saved to a log file every 24 hours, and this saving interval cannot be configured.
    • When the 64 KB log buffer is full, logs in the log buffer will be automatically saved to a log file, and the log buffer size cannot be configured.

Updated: 2019-09-23

Document ID: EDOC1000178167

Views: 205727

Downloads: 989

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Previous Next