Monitoring QoS Statistics

About QoS Statistics

You can display various QoS statistics for the device. By default, statistics are enabled, but you can disable this feature. For more information, see the Configuration Examples For Monitoring QoS Statistics section.

Prerequisites for Monitoring QoS Statistics

Monitoring QoS statistics has the following prerequisites:

  • You must be familiar with using modular QoS CLI.

  • You are logged on to the device.

Guidelines and Limitations for Monitoring QoS Statistics

Monitoring QoS statistics has the following guidelines and limitations:

  • show commands with the internal keyword are not supported.

  • In 64 bit architecture:

    • The queuing tabular output will retain same value of 15 seconds.

    • The tabular output after clear statistics, will hold zero statistics for maximum of 15 seconds.

  • The show queuing interface command can display information about internal interfaces.

    The command format for this information is specified as ii x/y/z . Where x is the module number, y is the value 1, and z is the internal interface number within the module.


    Note


    The number of internal interfaces within a module varies based on the type of the line card.



    Note


    Alternatively, you can display information about internal interfaces by providing the module number in the show queuing command. By including the module number, queuing information for both front-panel and internal interfaces of the module are displayed together.


    Example:

    
    switch# show queuing interface ii 4/1/2
    
    slot  4
    =======
    
    
    Egress Queuing for ii4/1/2 [System]
    ------------------------------------------------------------------
    QoS-Group# Bandwidth% PrioLevel                Shape
                                       Min          Max        Units
    ------------------------------------------------------------------
          3             -         1           -            -     -
          2             0         -           -            -     -
          1             0         -           -            -     -
          0           100         -           -            -     -
    +-------------------------------------------------------------------+
    |                              QOS GROUP 0                          |
    +-------------------------------------------------------------------+
    |                |  Unicast       | OOBFC Unicast  |  Multicast     |
    +-------------------------------------------------------------------+
    |        Tx Pkts |               0|               0|          235775|
    |        Tx Byts |               0|               0|        22634400|
    |   Dropped Pkts |               0|               0|               0|
    |   Dropped Byts |               0|               0|               0|
    |   Q Depth Byts |               0|               0|               0|
    +-------------------------------------------------------------------+
    |                              QOS GROUP 1                          |
    +-------------------------------------------------------------------+
    |                |  Unicast       | OOBFC Unicast  |  Multicast     |
    +-------------------------------------------------------------------+
    |        Tx Pkts |               0|               0|               0|
    |        Tx Byts |               0|               0|               0|
    |   Dropped Pkts |               0|               0|               0|
    |   Dropped Byts |               0|               0|               0|
    |   Q Depth Byts |               0|               0|               0|
    +-------------------------------------------------------------------+
    |                              QOS GROUP 2                          |
    +-------------------------------------------------------------------+
    |                |  Unicast       | OOBFC Unicast  |  Multicast     |
    +-------------------------------------------------------------------+
    |        Tx Pkts |               0|               0|               0|
    |        Tx Byts |               0|               0|               0|
    |   Dropped Pkts |               0|               0|               0|
    |   Dropped Byts |               0|               0|               0|
    |   Q Depth Byts |               0|               0|               0|
    +-------------------------------------------------------------------+
    |                              QOS GROUP 3                          |
    +-------------------------------------------------------------------+
    |                |  Unicast       | OOBFC Unicast  |  Multicast     |
    +-------------------------------------------------------------------+
    |        Tx Pkts |               0|               0|               0|
    |        Tx Byts |               0|               0|               0|
    |   Dropped Pkts |               0|               0|               0|
    |   Dropped Byts |               0|               0|               0|
    |   Q Depth Byts |               0|               0|               0|
    +-------------------------------------------------------------------+
    |                      CONTROL QOS GROUP                            |
    +-------------------------------------------------------------------+
    |                |  Unicast       | OOBFC Unicast  |  Multicast     |
    +-------------------------------------------------------------------+
    |        Tx Pkts |               0|               0|               0|
    |        Tx Byts |               0|               0|               0|
    |   Dropped Pkts |               0|               0|               0|
    |   Dropped Byts |               0|               0|               0|
    |   Q Depth Byts |               0|               0|               0|
    +-------------------------------------------------------------------+
    |                         SPAN QOS GROUP                            |
    +-------------------------------------------------------------------+
    |                |  Unicast       | OOBFC Unicast  |  Multicast     |
    +-------------------------------------------------------------------+
    |        Tx Pkts |               0|               0|               0|
    |        Tx Byts |               0|               0|               0|
    |   Dropped Pkts |               0|               0|               0|
    |   Dropped Byts |               0|               0|               0|
    |   Q Depth Byts |               0|               0|               0|
    +-------------------------------------------------------------------+
    Cannot get ingress statistics for if_index: 0x4a180001 Error 0xe
    
    Port Egress Statistics
    --------------------------------------------------------
    WRED Drop Pkts                              0
    
    PFC Statistics
    ----------------------------------------------------------------------------
    TxPPP:                    0, RxPPP:                    0
    ----------------------------------------------------------------------------
    COS QOS Group        PG   TxPause   TxCount         RxPause         RxCount
       0         -         -  Inactive         0        Inactive               0
       1         -         -  Inactive         0        Inactive               0
       2         -         -  Inactive         0        Inactive               0
       3         -         -  Inactive         0        Inactive               0
       4         -         -  Inactive         0        Inactive               0
       5         -         -  Inactive         0        Inactive               0
       6         -         -  Inactive         0        Inactive               0
       7         -         -  Inactive         0        Inactive               0
    ----------------------------------------------------------------------------
    
    

Enable or disable QoS statistics

By default, QoS statistics are enabled. Use this task to enable or disable global QoS statistics as needed.

Procedure


Step 1

Run the configure terminal command to enter global configuration mode.

Example:

configure terminal

Step 2

Run the qos statistics command to enable QoS statistics on all interfaces.

Example:

qos statistics

Step 3

Run the no qos statistics command to disable QoS statistics on all interfaces.

Example:

no qos statistics

Step 4

(Optional) Verify the statistics status and configured policy maps.

  1. Run the show policy-map interface command to check the detailed statistics status.

    Example:

    show policy-map interface
  2. Run the show policy-map interface command to check the brief policy map summary (policy names up to 25 characters).

    Example:

    show policy-map interface brief

Step 5

(Optional) Save the running configuration:

Example:

copy running-config startup-config

QoS statistics are enabled or disabled on all interfaces according to your configuration. If you save the configuration, your changes are preserved.

Monitor QoS statistics

You can view real-time QoS statistics for interfaces. These statistics help you monitor network performance and the policies that have been applied.

Follow these steps to monitor QoS-related statistics for all interfaces or a selected interface, including information filtered by direction or policy type.

Procedure


Run the show policy-map [policy-map-name] [interface [input | output]] [type {control-plane | network-qos | qos | queuing}] command to view policy-map statistics

Example:

switch# show policy-map interface ethernet 2/1

Displays statistics and the configured policy maps on all interfaces, a specified interface, or by data direction or QoS type.

Note

 

The show queuing command on the Cisco Nexus 9336C-SE1 switches works independently of the qos statistics configuration.


Clear QoS Statistics

You can clear QoS statistics for all interfaces. Alternatively, you can clear statistics for a selected interface, data direction, or QoS type.

Procedure


Run the clear qos statistics [interface [input | output] [type {qos | queuing}]] command to clear QoS statistics and the configured policy maps on all interfaces.

Example:

switch# clear qos statistics type qos
You can also use this command to clear statistics for a specific interface, for a particular data direction, for a specific QoS type, or to clear the configured policy maps.

Configuration Examples For Monitoring QoS Statistics

The following example shows how to display the QoS statistics:


Global statistics status :   enabled

Ethernet6/1
          Service-policy (queuing) output:   default-out-policy 

            Class-map (queuing):   c-out-q3 (match-any)
              priority level 1

            Class-map (queuing):   c-out-q2 (match-any)
              bandwidth remaining percent 0

            Class-map (queuing):   c-out-q1 (match-any)
              bandwidth remaining percent 0

            Class-map (queuing):   c-out-q-default (match-any)
              bandwidth remaining percent 100

The following example shows how to obtain information about queuing and PFC related counters:


switch(config-vlan-config)# show queuing interface ethernet 2/1

Egress Queuing for Ethernet2/1 [System]
------------------------------------------------------------------
QoS-Group# Bandwidth% PrioLevel                Shape     
                                   Min          Max        Units
------------------------------------------------------------------
      3             -         1           -            -     -
      2             0         -           -            -     -
      1             0         -           -            -     -
      0           100         -           -            -     -
+-------------------------------------------------------------------+
|                              QOS GROUP 0                          |
+-------------------------------------------------------------------+
|        Tx Pkts |               0|   Dropped Pkts |               0|
+-------------------------------------------------------------------+
|                              QOS GROUP 1                          |
+-------------------------------------------------------------------+
|        Tx Pkts |               0|   Dropped Pkts |               0|
+-------------------------------------------------------------------+
|                              QOS GROUP 2                          |
+-------------------------------------------------------------------+
|        Tx Pkts |               0|   Dropped Pkts |               0|
+-------------------------------------------------------------------+
|                              QOS GROUP 3                          |
+-------------------------------------------------------------------+
|        Tx Pkts |               0|   Dropped Pkts |               0|
+-------------------------------------------------------------------+
|                      CONTROL QOS GROUP 4                          |
+-------------------------------------------------------------------+
|        Tx Pkts |              58|   Dropped Pkts |               0|
+-------------------------------------------------------------------+
|                         SPAN QOS GROUP 5                          |
+-------------------------------------------------------------------+
|        Tx Pkts |               0|   Dropped Pkts |             948|
+-------------------------------------------------------------------+