< Home

reset traffic policy statistics

Function

The reset traffic policy statistics command clears statistics on packets matching a traffic policy that has been applied to the specified object or each object.

Format

reset traffic policy statistics { global [ slot slot-id ] | interface interface-type interface-number [.subinterface-number ] | vlan vlan-id | ssid-profile ssid-profile-name } { inbound | outbound }

Only the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support sub-interfaces.

Only the S5720-HI, S5730-HI, S5731-H, S5731S-H, S5732-H, S6720-HI, S6730S-H, and S6730-H support ssid-profile ssid-profile-name.

reset traffic policy statistics policy-name policy-name

reset traffic policy statistics all

Parameters

Parameter

Description

Value

global

Clears statistics on packets matching a traffic policy in the system.

-

slot slot-id

Clears statistics on packets matching a traffic policy on a specified device. slot-id specifies the slot ID of the device.

The value range depends on the device configuration.

interface interface-type interface-number [.subinterface-number ]

Clears statistics on packets matching a traffic policy on a specified interface.
  • interface-type specifies the interface type.
  • interface-number [.subinterface-number ] specifies the interface or sub-interface number.

-

vlan vlan-id

Clears statistics on packets matching a traffic policy in a specified VLAN. vlan-id specifies the ID of the VLAN.

The value is an integer that ranges from 1 to 4094.

ssid-profile ssid-profile-name

Clears statistics on packets matching a traffic policy in a specified SSID profile. ssid-profile-name specifies the name of the SSID profile.

The value must the name of an existing SSID profile.

inbound

Clears traffic statistics in the inbound direction.

-

outbound

Clears traffic statistics in the outbound direction.

-

policy-name policy-name

Clears statistics on packets matching the specified traffic policy in each object.

The value must be the name of an existing traffic policy.

all

Clears statistics on packets matching a traffic policy in each object, including statistics on packets in the inbound and outbound directions in the system, on each interface, in each VLAN, and in each SSID profile.

-

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Before re-collecting statistics on packets matching a traffic policy in the specified object or each object, run the reset traffic policy statistics command to clear existing packet statistics. Then run the display traffic policy statistics command to view packet statistics.

Precautions

The traffic policies that can be deleted from the device every second are limited. If many traffic policies are applied to the device, it may take a long time to delete the traffic policies.

The cleared traffic statistics cannot be restored. Exercise caution when you use the command.

If no traffic policy is applied, the system displays an error message after the reset traffic policy statistics command is executed:
Error: The Policy is not applied in this view.
If you do not run the statistic enable (traffic behavior view) command in the view of the traffic behavior in a traffic policy, the system displays an error message after the reset traffic policy statistics command is executed:
Info: Statistic has not been enabled.

Example

# Clear traffic statistics on GE0/0/1 in the inbound direction to which a traffic policy has been applied.

<HUAWEI> reset traffic policy statistics interface gigabitethernet 0/0/1 inbound
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >