The log-threshold command sets the inbound and outbound bandwidth usage threshold for generating a log.
The undo log-threshold command restores the default inbound and outbound bandwidth usage threshold for generating a log.
By default, the inbound and outbound bandwidth usage threshold for generating a log is 90%.
log-threshold { input-rate | output-rate } bandwidth-in-use [ resume-rate resume-threshold ]
undo log-threshold { input-rate | output-rate }
| Parameter | Description | Value |
|---|---|---|
input-rate |
Indicates inbound bandwidth. |
- |
output-rate |
Indicates outbound bandwidth. |
- |
bandwidth-in-use |
Specifies the bandwidth usage threshold for generating a log. |
The value is an integer ranging from 1 to 100. The default value is 90. |
resume-rate resume-threshold |
Specifies the bandwidth usage threshold for clearing a log. |
The value is an integer ranging from 1 to the value of bandwidth-in-use. The default value is equal to the value of bandwidth-in-use. |
Ethernet interface view, Ethernet sub-interface view, Layer-2 Ethernet Interface view, Layer-2 Ethernet sub-interface view
This command can't be backed up to the standby device.
The device detects the interface bandwidth usage every 1s. If the bandwidth usage is higher than the upper threshold or lower than the recovery threshold constantly, the device does not send logs repeatedly.
Outbound bandwidth usage = (Outbound interface rate/Outbound physical interface bandwidth) x 100
Inbound bandwidth usage = (Inbound interface rate/Inbound physical interface bandwidth) x 100
If the offset between the value of bandwidth-in-use and the value of resume-threshold is too large or small, log information may be frequently displayed.
The trap-threshold { input-rate | output-rate } command is used to set the bandwidth usage threshold for generating a trap.
The log threshold must be lower than the trap threshold, providing efficient protection for services. For example, when the inbound bandwidth usage reaches 80%, a log is generated. If the inbound bandwidth usage continues to increase and reaches 95%, a trap is generated. This ensures that a log is generated for inbound bandwidth usage of 80%, and a trap is generated for inbound bandwidth usage of 95%. Either the log or the trap prompts for a bandwidth increase, preventing service interruption.
<sysname> system-view
[sysname] interface GigabitEthernet 0/0/1
[sysname-GigabitEthernet0/0/1] log-threshold output-rate 80
<sysname> system-view
[sysname] interface GigabitEthernet 0/0/1
[sysname-GigabitEthernet0/0/1] log-threshold output-rate 80 resume-rate 60