(Optional) Applying the Statistic Function of a Traffic Policy

To view the statistics about a traffic policy, you need to enable the statistic function for the traffic policy.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run traffic policy policy-name

    The defined policy view is displayed.

  3. Run statistics enable

    The statistic function of a traffic policy is enabled.

  4. (Optional) Run share-mode

    The shared mode is specified for the traffic policy.

    To save memory, the statistical function of traffic policies is disabled by default. To display the statistics about a traffic policy, you can enable statistics for the traffic policy by running the statistics enable command. The default attribute of a policy is shared.
    • After a traffic policy is applied to an interface, you cannot change the mode of the traffic policy, whether its attribute is shared or unshared. Before changing the shared or unshared mode of the 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.

  5. Run commit

    The configuration is committed.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >