The function to collect statistics of a traffic policy needs to be enabled in prior to viewing statistics of this traffic policy.
Procedure
- Run system-view
The system view is displayed.
- Run traffic policy policy-name
A traffic policy is configured, and th traffic policy view is displayed.
- Run statistics enable
The function to collect statistics of the traffic policy is enabled.
- (Optional) Run share-mode
The shared mode is specified for the traffic policy.
To save memory resources, the function to collect statistics of a traffic policy is disabled by default. When users need to view statistics about a traffic policy, run the statistics enable command to enable this function.
The default attribute of a traffic policy is shared.
- After a traffic policy is applied to an interface, you cannot change the mode of the traffic policy, regardless of the shared or unshared mode. Before changing the mode of a traffic policy, you must disable the traffic policy on the interface.
- If a shared traffic policy is applied to different interfaces, this shared traffic policy collects statistics on the traffic of all the interfaces as a whole. That is, the shared traffic policy does not collect statistics on the traffic of interfaces individually.
- If an unshared traffic policy is applied to different interfaces, this unshared traffic policy collects statistics on the traffic of the interfaces individually.
- A traffic policy collects statistics on incoming traffic and outgoing traffic individually, whether its attribute is shared or unshared.
- Run commit
The configuration is committed.