Statistics Profiles
Statistics profiles enable you to gather statistics for the rate at which packets are forwarded out of a queue and for the rate at which committed, conformed, or exceeded packets are dropped. Statistics profiles also enable you to use events to monitor the rate statistics. You can then use show commands to view the results of the statistics gathering.
You can create up to 250 statistics profiles on the E-series router. The profiles are referenced by a queue rule within a QoS profile.
When you create a statistics profile, you specify the time period over which statistics are gathered. To gather event statistics, you configure the thresholds for triggering rate-event reporting.
- Rate period—Time period, in seconds, over which statistics are gathered. For example, a 30-second rate period results in rate statistics being gathered over 30-second time segments.
- Forwarding rate threshold—Threshold for forwarding rate events. A forwarding-rate event is counted whenever the forwarding rate exceeds the specified threshold.
- Committed drop threshold—Threshold above which committed drop rate events are counted.
- Conformed drop threshold—Threshold above which conformed drop rate events are counted.
- Exceeded drop threshold—Threshold above which exceeded drop rate events are counted.
Rate Statistics
You can configure the E-series router to gather statistics for the rate at which queues forward and drop packets.
Queue rate statistics measure the forwarding and drop rates of each queue in bits per second. All bytes in the Layer 2 encapsulation are included in the rate calculation. For example, rates for a queue on Ethernet include the Ethernet and VLAN encapsulations.
For ATM modules, you can optionally configure queue statistics and queue rates to include the cell encapsulation and padding. Cell encapsulation and padding are referred to as the cell tax. The QoS shaping mode that you set on ATM line modules determines whether queue rate statistics include cell tax.
- If you use the qos-shaping-mode frame command, the egress queue statistics measure frame rates; an ATM cell tax is not included.
- If you use the qos-shaping-mode cell command, the egress queue statistics measure cell rates; cell rates include ATM Adaptation Layer 5 (AAL5) encapsulation and cell padding.
To configure the router to gather rate statistics on a queue, you create the statistics profile and configure the rate period for the profile. You then reference the statistics profile in a QoS profile, and attach the QoS profile to an interface. Finally, you use the show egress-queue rates command to display statistics that have been gathered.
To gather rate statistics, perform the following steps:
- Configure the statistics profile.
host1(config)#statistics-profile statpro-5host1(config-statistics-profile)#rate-period 45host1(config-statistics-profile)#exit- Reference the statistics profile by a QoS profile.
host1(config)#qos-profile qospro-3host1(config-qos-profile)#ip queue traffic-class tc1 scheduler-profile sp1 statistics-profile statpro-5- Attach the QoS profile to the appropriate interface.
host1(config)#interface gigabitEthernet 1/0host1(config-subif)#qos-profile qospro-3host1(config-subif)#exit- (Optional) Display the rate statistics.
host1#show egress-queue ratesEvent Statistics
You can configure the E-series router to count the number of times that forwarding or drop rates exceed a specific threshold. Events can be useful when you are monitoring service level agreements. For example, you might count the number of times that the drop rate of a queue is nonzero.
To configure the router to count rate events on a queue, you create the statistics profile and configure the event thresholds for the profile. You then reference the statistics profile in a QoS profile, and attach the QoS profile to an interface. Finally, you use the show egress-queue events command to display the event statistics that you have gathered.
To count rate events, perform the following steps:
- Configure the statistics profile.
host1(config)#statistics-profile statpro-1host1(config-statistics-profile)#rate-period 30host1(config-statistics-profile)#forwarding-rate-threshold 10000000host1(config-statistics-profile)#committed-drop-threshold 2000000host1(config-statistics-profile)#conformed-drop-threshold 4000000host1(config-statistics-profile)#exceeded-drop-threshold 6000000host1(config-statistics-profile)#exit- Reference the statistics profile by a QoS profile.
host1(config)#qos-profile qospro-1host1(config-qos-profile)#ip queue traffic-class tc1 scheduler-profile sp1 statistics-profile statpro-1- Attach the QoS profile to the appropriate interface.
host1(config)#interface gigabitEthernet 1/0host1(config-subif)#qos-profile qospro-1host1(config-subif)#exit- (Optional) Display the rate statistics.
host1#show egress-queue eventsMemory and Processor Use
The E-series router uses shared processing and memory when it gathers egress queue rate statistics and events. If sufficient memory is not available, the statistics gathering is temporarily disabled and the queues are considered to be in failover mode until memory becomes available.
The router displays a CLI message whenever queues are put into failover mode and when they recover from failover mode. The show egress-queue command displays the number of queues that are disabled due to no resources.
Configuring Statistics Profiles
To configure a statistics profile, perform the following steps:
- Create a statistics profile, and enter Statistics Profile Configuration mode.
host1(config)#statistics-profile statpro-1host1(config-statistics-profile)#- (Optional) Set the time period for calculating queue rate statistics.
host1(config-statistics-profile)#rate-period 30- (Optional) Set the threshold for logging events. You can set thresholds for committed drop, conformed drop, exceeded drop, and forwarding rate events.
host1(config-statistics-profile)#committed-drop-threshold 50000committed-drop-threshold
conformed-drop-threshold
exceeded-drop-threshold
- Use to set the threshold above which drop events are counted. A drop event occurs each time the number of packets dropped exceeds the threshold during the specified rate period.
- The committed-drop-threshold command sets a threshold for committed (green) packets.
- The conformed-drop-threshold command sets a threshold for conformed (yellow) packets.
- The exceeded-drop-threshold command sets a threshold for exceeded (red) packets.
- Drop rate threshold range is 0-1073741824 bps; default is no threshold.
- Example
host1(config-scheduler-profile)#committed-drop-rate 50000Use the no version to delete the drop rate threshold. forwarding-rate-threshold
- Use to set the threshold above which forwarding rate events are counted. This type of event occurs each time the forwarding rate exceeds the threshold during the specified rate period.
- Forwarding rate threshold range is 0-1073741824 bps; default is no threshold.
- Example
host1(config-scheduler-profile)#forwarding-rate-exceeded 100000Use the no version to delete the threshold. rate-period
- Use to set the length of time during which statistics are counted.
- Rate period range is 1-43200 seconds.
- Example
host1(config-scheduler-profile)#rate-period 30Use the no version to delete the rate period; statistics will not be gathered. statistics-profile
- Use to configure a statistics profile and enter Statistics Profile Configuration mode.
- The router supports up to 250 statistics profiles.
- Example
host1(config)#statistics-profile statpro-1host1(config-statistics-profile)#Use the no version to remove the statistics profile.