The statistic enable command enables the traffic statistics function in a VLAN.
The undo statistic enable command disables the traffic statistics function in a VLAN.
By default, the traffic statistics function is disabled in a VLAN.
Usage Scenario
To check the network status or locate network faults, you can use the statistic enable command to enable the traffic statistics function in a VLAN.
After the traffic statistics function is enabled in a VLAN, the device collects statistics on unicast packets, broadcast packets, and broadcast packets transmitted in the VLAN.
Precautions
Traffic statistics are accumulative and cannot be cleared by the system. To clear traffic statistics in a VLAN, run the reset vlan statistics command in the VLAN.
The traffic statistics function occupies system resources. If system resources are insufficient, the configuration may fail. Disable this function when traffic statistics do not need to be collected.
After enabling the traffic statistics function in a VLAN, you can use the display vlan vlan-id statistics command to view traffic statistics in the VLAN.
On the S2720-EI, S5720I-SI, S5720-LI, S5735-L, S5735S-L, S5735S-L-M, S5720S-LI, S5720S-SI, S5720-SI, S5735-S, S5735S-S, S5735-S-I, S5730S-EI, S5730-SI, S6720-LI, S6720S-LI, S6720S-SI, and S6720-SI, if the traffic policy is bound to the traffic behavior containing traffic statistics and is applied to an interface in the inbound direction, and the statistic enable command is enabled in the VLAN that the interface joins, the statistic enable command cannot collect statistics on packets in the inbound direction of the interface.