The statistic enable command enables the traffic statistics function on a VLANIF interface.
The undo statistic enable command disables the traffic statistics function on a VLANIF interface.
By default, the traffic statistics function is disabled on a VLANIF interface.
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 this command.
statistic enable { both | inbound | outbound }
undo statistic enable { both | inbound | outbound }
Parameter |
Description |
Value |
---|---|---|
both |
Enables the traffic statistics function for incoming and outgoing traffic. |
- |
inbound |
Enables the traffic statistics function for incoming traffic. |
- |
outbound |
Enables the traffic statistics function for outgoing traffic. |
- |
Usage Scenario
To check the network status or locate network faults, you can use the statistic enable command to enable the traffic statistics function on VLANIF interfaces. The switch then collects traffic statistics on the VLANIF interfaces.
Precautions
On the S5720-EI, S6720S-EI and S6720-EI, if the traffic statistics function is enabled in the VLAN corresponding to the VLANIF interface, the traffic statistics function is invalid on the VLANIF interface in the outbound direction.
After you run the undo statistic enable command on a VLANIF interface, the switch stops collecting traffic statistics on the VLANIF interface, and the collected traffic statistics are deleted.
The switch uses ACL resources when collecting traffic statistics. If the traffic statistics function is enabled on too many VLANIF interfaces, other services may fail to obtain ACL resources. The device supports traffic statistics on a maximum of 100 VLANIF interface.
Traffic statistics on VLANIF interfaces is unavailable for error packets.
On the VLANIF interface enabled with the traffic statistics function, the packets such as ping packets sent from the device cannot be counted.
After enabling the traffic statistics function in a VLANIF, you can use the display interface vlanif command to view traffic statistics in the VLANIF.
A higher number of VLANIF interfaces configured with the traffic statistics function leads to higher CPU usage.