show policy

Syntax

show policy [interface <ID> [in]] [<POLICY-NAME>] [commands] [configuration]

show policy [hitcounts <POLICY-NAME> [interface <ID> [in]]] [vsx-peer]

Description

Shows various aspects of policies and their current use.

Use the show policy hitcounts command to display policy statistics.

Command context

Operator (>) or Manager (#)

Parameters

All parameters are optional.

interface <ID>

Specifies limiting the display to a specific interface.

in

Specifies limiting the display to ingress policies

<POLICY-NAME>

Specifies displaying information matching this policy name.

[commands]

Specifies display output as CLI commands showing the configured policy entries.

[configuration]

Specifies display policies that have been configured, including those policies not active because of issues with the command parameters or hardware issues. This parameter is useful if there is a mismatch between the entered configuration and the previous successfully programmed (active) policies.

hitcounts

Specifies display policy hit counts (statistics).

[vsx-peer]

Shows the output from the VSX peer switch. If the switches do not have the VSX configuration or the ISL is down, the output from the VSX peer switch is not displayed.

Authority

Operators or Administrators. Users without administrator authority can execute this command from the operator context (>) only.

Examples

Showing information for all policies:

switch# show policy
           Name
  Sequence Comment
           Class Type
                    action
-------------------------------------------------------------------------------
           MY_POLICY
        10 This is my QOS policy.
           class1 ip
                    dscp af21
                    drop
        20 This is my PBR policy.
-------------------------------------------------------------------------------

Showing policy CLI commands:

switch# show policies commands
policy MY_POLICY
       10 class ip MY_CLASS1 action dscp af21 action drop
       20 comment pbr policy string

Showing policy statistics for hit counts:

switch# show policy hitcounts MY_POLICY
Statistics for Policy MY_POLICY:
Interface 1/1/1* (in):
           Hit Count  Configuration
10 class ip MY_CLASS1 action dscp af21 action drop
                  20  10 match any any any count
* policy statistics are shared among all applied interfaces
  use 'policy NAME copy' to create a uniquely-named policy