< Home

reset counters interface

Function

The reset counters interface command clears traffic statistics about a specified interface.

Format

reset counters interface [ interface-type [ interface-number ] ]

Parameters

Parameter

Description

Value

interface-type [ interface-number ]

Clears traffic statistics on a specified interface.
  • interface-type specifies the interface type.
  • interface-number specifies the interface number.

If an interface type is specified but no interface number is specified, traffic statistics on all interfaces of the specified type are cleared.

-

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

Before collecting traffic statistics on an interface within a certain period, run the reset counters interface command to clear existing traffic statistics.

Precautions

  • Statistics cannot be restored after being cleared. Therefore, exercise caution before clearing the statistics.

  • Traffic accounting is based on the packet statistics on an interface. The clearing of the packet statistics on an interface by using the reset counters interface command affects the traffic accounting result. Therefore, do not randomly clear the packet statistics on an interface in a normal application environment.

  • If no interface type is specified, traffic statistics on all types of interfaces are cleared. If an interface type is specified but no interface number is specified, traffic statistics on all interfaces of the specified type are cleared.

  • Running the reset counters interface command clears the last part of the display interface command output. That is, statistics about received and transmitted packets on the interface are cleared.

Example

# Clear traffic statistics on all interfaces.

<HUAWEI> reset counters interface

# Clear traffic statistics on VLANIF10.

<HUAWEI> reset counters interface vlanif 10
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >