The info-center statistic-suppress enable command enables the suppression of statistics about consecutive identical logs.
The undo info-center statistic-suppress enable command disables the suppression of statistics about consecutive identical logs.
Suppressing the statistics about consecutive identical logs is enabled by default.
Usage Scenario
Plenty of repeated logs may be generated in a short time in some scenarios, for example, when Address Resolution Protocol (ARP) service features are enabled. This wastes both the storage space and CPU resources, and users do not hope to view these redundant logs. To suppress statistics about consecutive identical logs without affecting other logs, run the info-center statistic-suppress enable command. The device outputs a log immediately after receiving it. If the information center receives repeatedly generated logs within a period, it outputs the number of these logs and will output logs only when it receives a new log (a log with a different log ID).
For example, if the sequence of logs generated by a module is A(T1) A(T2) A(T2) B(T3) B(T4) B(T4) C(T5) D(T6) A(T7) B(T8) B(T8) B(T8) B(T9) A(T9) B(T10) E(T11) A(T11) A(T12) A(T12) A(T13) A(T14) A(T15) A(T16) A(T17) A(T18) B(T18), the output is as follows (A, B, C, D, and E are different logs, and T1, T2, T3, …, and Tn are serial numbers):
T1:A
T3: last message repeated 2 times
T3:B
T5: last message repeated 2 times
T5:C
T6:D
T8:B
T9: last message repeated 3 times
T9:A
T10:B
T11:E
T11:A
T13: last message repeated 3 times
T18: last message repeated 5 times
T18:B
There are two methods to trigger the output of consecutive repeated logs: 1. If the next log is a non-repeated log, the output of the previous consecutive repeated log is triggered, for example, T3: last message repeated 2 times. 2. If the time for collecting statistics on consecutive repeated logs exceeds the threshold (30 seconds, 120 seconds, or 600 seconds), the system records the statistics generated before the repeated log is triggered, for example, T13: last message repeated 3 times.
The device resets the counter each time statistics are output. In this case, log A is repeated nine times (1 + 3 + 5) in the period from T11 to T18.
The logs output by the device are sorted in the same order of log generation, facilitating subsequent review.
Precautions
Three time granularities are used to control the output of statistics about repeated logs. Statistics are output 30 seconds later for the first time, 120 seconds later for the second time, and 600 seconds later for the third time.
Two logs are consecutive identical logs only when all parameters, including the log ID, are the same, and no other logs exist between them. The logs following the order of A B A B A B A B are not consecutive identical logs, so statistics about these logs cannot be suppressed.