Monitoring QoS Statistics
This chapter describes how to enable, display, and clear QoS statistics.
Information about QoS Statistics
Statistics are maintained for each policy, class action, and match criteria per interface. You can enable or disable the collection of statistics globally using the [no] qos statistics command. You can display statistics using the show policy-map interface command, and you can clear statistics based on an interface or policy map with the clear qos statistics command. Statistics are enabled by default and can be disabled globally.
Prerequisites for Monitoring QoS Statistics
Monitoring QoS statistics has the following prerequisites:
- You are logged in to the CLI in EXEC mode.
Enabling Statistics
You can enable or disable QoS statistics for all interfaces on the device.
BEFORE YOU BEGIN
- By default, QoS statistics are enabled.
SUMMARY STEPS
1. config t
2. qos statistics
3. show policy-map interface
4. copy running-config startup-config
DETAILED STEPS
|
|
|
Step 1 |
config t Example: switch# config t switch(config)# |
Places you into CLI Global Configuration mode. |
Step 2 |
qos statistics Example: switch(config)# qos statistics |
Enables QoS statistics on all interfaces. |
Step 3 |
show policy-map interface Example: switch(config)# show policy-map interface |
(Optional) Displays the statistics status and the configured policy maps on all interfaces. |
Step 4 |
copy running-config startup-config Example: switch(config)# copy running-config startup-config |
(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration. |
Displaying Statistics
Use this procedure to display QoS statistics for an interface.
BEFORE YOU BEGIN
Before beginning this procedure, you must know or do the following:
- You know the interface for which statistics are needed.
Note Statistics for individual interfaces are often the most useful.
SUMMARY STEPS
1. show policy-map { policy-map-name | interface [ brief | ethernet interface_number |
output type qos | port-channel number | vethernet interface_number | input type qos ] | type qos}
DETAILED STEPS
|
|
|
Step 1 |
show policy-map { interface { brief | ethernet slot_number | output type qos | port-channel number | vethernet interface_number | input type qos ] type qos | vlan } Example: switch# show policy-map interface ethernet 2/1 |
Displays the specified statistics. To achieve the best result when your system has a large number of policies, use this command with specific arguments, such as specifying a particular interface or port channel.
- interface: Show service policy on interface
– brief : Use this option to get a brief report of all policies attached to interfaces. – ethernet : Use this option to get statistics for an Ethernet IEEE 802.3z interface. – input type qos : Use this option to get statistics for QoS input policies. – output type qos : Use this option to get statistics for QoS output policies. – port-channel : Use this option to get statistics for a Port Channel interface. – vethernet : Use this option to get statistics for a Virtual Ethernet interface.
- type qos: Type of the policy-map
|
Clearing Statistics
Use this procedure to clear QoS statistics.
SUMMARY STEPS
1. clear qos statistics interface { ethernet interface_number | port-channel number | vethernet interface_number | output type qos | input type qos }
DETAILED STEPS
|
|
|
Step 1 |
clear qos statistics interface { brief | ethernet interface_number | slot_number | output type qos | port-channel number | vethernet interface_number | input type qos | type qos ]} Example: switch# clear qos statistics type qos |
Clears the specified QoS statistics. |
Example Policy Map Statistics
The following examples show statistics for a policy map.
n1000v(config)# show policy-map interface
Global statistics status : enabled
Service-policy (qos) input: new-policy
policy statistics status: enabled
Class-map (qos): class-default (match-any)
Service-policy (qos) output: new-policer
policy statistics status: enabled
Class-map (qos): new-class (match-all)
police cir 900 mbps bc 200 ms
conformed 505953339796 bytes, 899924196 bps action: transmit
violated 12285218014 bytes, 22283000 bps action: drop
n1000v(config)# show ip access-lists protoacl
10 permit icmp 7.120.1.10/32 7.120.1.20/32
20 permit tcp 7.120.1.10/32 7.120.1.20/32 dscp af11
30 permit udp 7.120.1.10/32 7.120.1.20/32 precedence critical
50 permit ip 7.120.1.20/32 7.120.1.10/32
60 permit ip 7.120.1.20/32 7.120.1.10/32 dscp af11
70 permit ip 7.120.1.20/32 7.120.1.10/32 precedence critical
n1000v(config)# show class-map class-protoacl
class-map type qos match-any class-protoacl
match access-group name protoacl
n1000v(config)# show policy-map policy-protoacl
policy-map type qos policy-proto acl
n1000v(config)# show policy-map interface vethernet 3
Global statistics status : enabled
Service-policy (qos) input: policy-protoacl
policy statistics status: enabled
Class-map (qos): class-protoacl (match-any)
Match: access-group protoacl
Example Policer Statistics
The following examples show policer statistics.
n1000v# show policy-map interface
Global statistics status : enabled
Service-policy (qos) output: new-policer
policy statistics status: enabled
Class-map (qos): newsched (match-all)
police cir 900 mbps bc 200 ms
conformed 3508440746 bytes, 896840681 bps action: transmit
violated 56543498 bytes, 14453859 bps action: drop
n1000v# show policy-map interface
Global statistics status : enabled
Service-policy (qos) input: 2r3c
policy statistics status: enabled
Class-map (qos): class-default (match-any)
police cir 200 mbps bc 200 ms pir 250 mbps be 200 ms
conformed 514043776 bytes, 197547687 bps action: transmit
exceeded 130494776 bytes, 50149311 bps action: set dscp dscp table cir-markdown-map
violated 67752080 bytes, 26037211 bps action: drop
Additional References
For additional information related to implementing system-level HA features, see the following sections:
Standards
|
|
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature. |
— |
RFCs
|
|
No RFCs are supported by this feature |
— |
Technical Assistance
|
|
Technical Assistance Center (TAC) home page, containing 30,000 pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users can log in from this page to access even more content. |
http://www.cisco.com/public/support/tac/home.shtml |
Feature History for QoS Statistics
This section provides the QoS statistics release history.
|
|
|
QoS Statistics |
4.0 |
This feature was introduced. |