Monitoring QoS Statistics

This chapter describes how to enable, display, and clear QoS statistics on the Cisco NX-OS device.

Finding Feature Information

Your software release might not support all the features documented in this module. For the latest caveats and feature information, see the Bug Search Tool at https://tools.cisco.com/bugsearch/ and the release notes for your software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the "New and Changed Information"chapter or the Feature History table in this chapter.

Information 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 the concepts in “Using Modular QoS CLI.”

  • You must log in to the switch.

  • You are in the correct VDC. A VDC is a logical representation of a set of system resources. You can use the switchto vdc command with a VDC number.

Enabling Statistics

You can enable or disable QoS statistics for all interfaces on the device. By default, QoS statistics are enabled.


Note


On M1 modules, when QoS statistics are disabled, the output from the show policy-map interface num type queuing command might be delayed by as much as 90 seconds.


Procedure

  Command or Action Purpose

Step 1

switch# configure terminal

Enters global configuration mode.

Step 2

switch(config)# [no] qos statistics

Enables QoS statistics on all interfaces.

The no option disables QoS statistic

Step 3

(Optional) switch(config)# show policy-map interface

(Optional)

Displays the statistics status and the configured policy maps on all interfaces.

Step 4

(Optional) switch(config)# show policy-map vlan

(Optional)

Displays the statistics status and the configured policy maps on all VLANs.

Step 5

(Optional) switch(config)# copy running-config startup-config

(Optional)

Saves the running configuration to the startup configuration.

Monitoring the Statistics

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

Procedure

Command or Action Purpose

switch# show policy-map [policy-map-name] [interface] [vlan] [input | output] [type {control-plane | network-qos | qos | queuing}]

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

Clearing Statistics

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

Procedure

Command or Action Purpose

switch# clear qos statistics [interface] [vlan] [input | output] [type {qos | queuing}]

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

Configuration Examples For Monitoring QoS Statistics

The following example shows how to display the QoS statistics:


switch(config)# show policy-map interface ethernet 8/1

Global statistics status: enabled
Ethernet8/1
Service-policy (qos) input: pmap
policy statistics status: enabled
Class-map (qos): map (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: cos 0
police cir 10 mbps bc 200 ms
conformed 0 bytes, 0 bps action: transmit
violated 0 bytes, 0 bps action: drop
Class-map (qos): map1 (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: dscp 0
police cir 10 mbps bc 200 ms
conformed 0 bytes, 0 bps action: transmit
violated 0 bytes, 0 bps action: drop
Class-map (qos): map2 (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: precedence 5
police cir 20 mbps bc 200 ms
conformed 0 bytes, 0 bps action: transmit
violated 0 bytes, 0 bps action: drop
Class-map (qos): map3 (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: cos 3
police cir 30 mbps bc 200 ms
conformed 0 bytes, 0 bps action: transmit
violated 0 bytes, 0 bps action: drop
Class-map (qos): map4 (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: packet length 100
police cir 40 mbps bc 200 ms
conformed 0 bytes, 0 bps action: transmit
violated 0 bytes, 0 bps action: drop
Class-map (qos): map5 (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: access-group foo
police cir 50 mbps bc 200 ms
conformed 0 bytes, 0 bps action: transmit
violated 0 bytes, 0 bps action: drop
Class-map (qos): class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
police cir 60 mbps bc 200 ms
conformed 0 bytes, 0 bps action: transmit
violated 0 bytes, 0 bps action: drop

The following example shows how to display the QoS statistics in the specified port channel:

switch(config)# show policy-map interface port-channel 6

Global statistics status: enabled

port-channel6

  Service-policy (queuing) input: default-8e-4q8q-in-policy
    SNMP Policy Index:  301993627

    Class-map (queuing): 8e-4q8q-in-q1 (match-any)
      queue-limit percent 10
      bandwidth percent 49
      queue dropped pkts: 0
      queue dropped bytes: 0
      queue transmit pkts: 2175032764  queue transmit bytes: 1051188564890

    Class-map (queuing): 8e-4q8q-in-q-default (match-any)
     queue-limit percent 88
      bandwidth percent 49
      queue dropped pkts: 0
      queue dropped bytes: 0  current depth bytes: 99
      queue transmit pkts: 518903560636  queue transmit bytes: 457520859584290

In this example, the current depth bytes field appears because of an active congestion.

The current depth bytes field appears for any physical interface when there is an active congestion and the software reads the counter. The value of the counter must be non zero. The current depth indicates that there are packets waiting in the buffer to be forwarded. The value of the current depth is in bytes.

For complete information on the show policy-map command, see the Cisco Nexus 7000 Series NX-OS Quality of Service Command Reference.

Feature History for Statistics

Your software release might not support all the features in this document. For the latest caveats and feature information, see the Bug Search Tool at https://tools.cisco.com/bugsearch/ and the release notes for your software release.

Table 1. Feature History for Statistics

Feature Name

Release

Feature Information

No changes from Release 4.1(2)

5.1(1)