Enabling duplicate log suppression
The output of consecutive duplicate logs at an interval of less than 30 seconds wastes system and network resources.
With this feature enabled, the system starts a suppression period upon outputting a log:
During the suppression period, the system does not output logs that have the same module name, level, mnemonic, location, and text as the previous log.
After the suppression period expires, if the same log continues to appear, the system outputs the suppressed logs and the log number and starts another suppression period. The suppression period is 30 seconds for the first time, 2 minutes for the second time, and 10 minutes for subsequent times.
If a different log is generated during the suppression period, the system aborts the current suppression period, outputs suppressed logs and the log number and then the different log, and starts another suppression period.
To enable duplicate log suppression:
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Enable duplicate log suppression. | info-center logging suppress duplicates | By default, duplicate log suppression is disabled. |