The traffic-statistics enable command enables the traffic statistics collection function in an SR Policy attribute template.
The traffic-statistics disable command disables the traffic statistics collection function in an SR Policy attribute template.
The undo traffic-statistics enable command deletes the preceding configuration.
The undo traffic-statistics disable command deletes the preceding configuration.
By default, the traffic statistics collection function in an SR Policy attribute template is not enabled.
Usage Scenario
The traffic-statistics enable (SR Policy template view) command enables the traffic statistics collection function in an SR Policy attribute template, the srv6-te-policy traffic-statistics enable (Segment Routing IPv6 view) command globally enables the traffic statistics collection function for all SRv6 TE Policies in the Segment Routing IPv6 view, and the traffic-statistics enable (SRv6 TE Policy view) command enables the traffic statistics collection function for a single SRv6 TE Policy.
For the same SRv6 TE Policy, if the srv6-te-policy traffic-statistics enable (Segment Routing IPv6 view) and traffic-statistics enable (SRv6 TE Policy view) commands are both run and the template referenced by the primary path of the policy has traffic statistics collection configurations, the traffic-statistics enable (SRv6 TE Policy view) command configuration has the highest priority. The traffic-statistics enable (SR Policy template view) command configuration has the second highest priority, followed by the srv6-te-policy traffic-statistics enable (Segment Routing view) command configuration.