< Home

log-threshold

Function

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%.

Format

log-threshold { input-rate | output-rate } bandwidth-in-use [ resume-rate resume-threshold ]

undo log-threshold { input-rate | output-rate }

Parameters

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.

Views

Ethernet interface view, Ethernet sub-interface view, Layer-2 Ethernet Interface view, Layer-2 Ethernet sub-interface view

Default Level

2: Configuration level

Usage Guidelines

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.

Bandwidth usage helps understand loads on the current device. If bandwidth usage exceeds a set threshold, a log or a trap is generated, indicating that bandwidth resources become insufficient and need an increase. For example, if bandwidth usage exceeds 95% of total bandwidth, a trap is generated, indicating that bandwidth is exhausted. Some services may be interrupted before the bandwidth increases. To help prevent service interruption, setting two bandwidth usage thresholds, one for generating a log and the other for generating a trap helps you increase bandwidth in time.

Outbound bandwidth usage = (Outbound interface rate/Outbound physical interface bandwidth) x 100

Inbound bandwidth usage = (Inbound interface rate/Inbound physical interface bandwidth) x 100

The log-threshold command with the following parameters provides various functions:
  • log-threshold input-rate bandwidth-in-use resume-rate resume-threshold: sets the inbound bandwidth usage threshold for generating a log to provide the following functions:
    • If inbound bandwidth usage value exceeds the value of bandwidth-in-use, an BWRATE_IN_RISING log is generated, indicating that inbound bandwidth usage exceeds the set threshold.
    • If inbound bandwidth usage value is lower than the value of resume-threshold, an BWRATE_IN_RESUME log is generated, indicating that inbound bandwidth usage is lower than the set threshold to provide the following functions:
  • log-threshold output-rate bandwidth-in-use resume-rate resume-threshold: sets the outbound bandwidth usage threshold for generating a log to provide the following functions:
    • If outbound bandwidth usage value exceeds the value of bandwidth-in-use, an BWRATE_OUT_RISING log is generated, prompting for a bandwidth increase request.
    • If outbound bandwidth usage goes below the threshold specified in resume-threshold, an BWRATE_OUT_RESUME log is generated, indicating that bandwidth usage has been restored.

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.

Example

# Set the outbound bandwidth usage threshold for generating a log to 80%.
<sysname> system-view
[sysname] interface GigabitEthernet 0/0/1
[sysname-GigabitEthernet0/0/1] log-threshold output-rate 80
# Set the outbound bandwidth usage threshold for generating a log to 80% and the outbound bandwidth usage threshold for clearing the log to 60%.
<sysname> system-view
[sysname] interface GigabitEthernet 0/0/1
[sysname-GigabitEthernet0/0/1] log-threshold output-rate 80 resume-rate 60
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >