< Home

log-threshold input-discard output-discard (interface view)

Function

The log-threshold input-discard command sets the threshold for packet loss caused by congestion and interval for collecting statistics on discarded packets in the inbound direction of an interface.

The log-threshold output-discard command sets the threshold for packet loss caused by congestion and interval for collecting statistics on discarded packets in the outbound direction of an interface.

The undo log-threshold input-discard command restores the default settings.

The undo log-threshold output-discard command restores the default settings.

By default, the threshold for packet loss caused by congestion in the inbound or outbound direction of an interface is 300, and the interval for collecting statistics on discarded packets in the inbound or outbound direction of an interface is 300s.

Format

log-threshold { input-discard | output-discard } [ threshold-value interval interval-value ]

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

Parameters

Parameter Description Value

input-discard

Records logs about packet loss caused by congestion in the inbound direction of an interface.

-

output-discard

Records logs about packet loss caused by congestion in the outbound direction of an interface.

-

threshold-value

Specifies the packet loss threshold for triggering a log.

The value is an integer in the range from 100 to 4294967295.

interval interval-value

Specifies the interval for collecting statistics on discarded packets due to congestion.

The value is an integer in the range from 60 to 86400, in seconds.

Views

Ethernet interface view, GE interface view, XGE interface view, 25GE interface view, MultiGE interface view, 40GE interface view, 100GE interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Network congestion during service transmission may cause packet loss. If a lot of packets are discarded, services are affected. To better monitor the number of discarded packets, you can run the log-threshold output-discard or log-threshold input-discard command to set the threshold for packet loss caused by congestion and interval for collecting statistics on discarded packets in the inbound or outbound direction of an interface. The device generates a log when the number of discarded incoming and outgoing packets on the interface in a specified period exceeds the threshold. Logs help you know the congestion on the interface. You can determine whether to increase the bandwidth or cancel the bandwidth limit on the interface based on the logs. In this way, the congestion problem can be solved.

Precautions

  • If the number of discarded incoming and outgoing packets falls below the threshold in a specified period, the device generates a log indicating that the number of discarded packets falls below the threshold.
  • If the number of discarded packets exceeds the threshold in an interval for collecting statistics on discarded packets, the device immediately generates a log indicating that the number of discarded packets exceeds the threshold, and enters the next statistics interval. In the next statistics interval, the number of discarded packets on an interface is calculated using the following formula:

    Number of discarded packets = Current number of discarded packets - Number of discarded packets in the beginning of the statistics interval

  • If the number of discarded packets exceeds the threshold in several consecutive statistics intervals, the device only generates a log in the first statistics interval, indicating that the number of discarded packets exceeds the threshold. If the number of discarded packets falls below the threshold, the device generates a log indicating that the number of discarded packets falls below the threshold. If the number of discarded packets on an interface exceeds the threshold again, the device will generate a log indicating that the number of discarded packets exceeds the threshold.
  • If the user log function is disabled in the system view, the user log function no longer takes effect in the interface view. To record user logs, run the log-threshold { input-discard | output-discard }* command in the system view to enable the log function first.

Example

# Set the threshold for packet loss caused by congestion to 100 and interval for collecting statistics on discarded packets to 60 seconds in the inbound direction of GE0/0/1.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] log-threshold input-discard 100 interval 60
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >