The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This module describes the Cisco IOS XR software commands related to the collection of interface statistics (StatsD) for system monitoring on the router. Interface statistics on the router are found in hardware (most of the time) and software (exception packets). The counters are always local (relative to the CPU) to the node on which the interface is homed. The Cisco IOS XR software provides an efficient mechanism to collect these counters from various application-specific integrated circuits (ASICs) or NetIO and assemble an accurate set of statistics for an interface. After the statistics are produced, they can be exported to interested parties (command-line interface [CLI], Simple Network Management Protocol [SNMP], and so forth).
The Cisco IOS XR software statistics collection system provides a common framework to be used by all interface owners to export the statistics for interfaces they own. The system also defines a common set of statistics that are relevant to all interfaces and thereby provides a consistent and constant set of counters that are always associated and maintained with any interface on the router.
The statistics collection system includes the statistics manager, the statistics server, one or more statistics collectors, and the necessary libraries. Each node on a router houses one statistics server.
In addition to the statistics server, each node (that has interfaces) has one or more statistics collectors. Statistics collectors are platform specific and can obtain various hardware and software counters to satisfy requests from the statistics server.
The statistics manager does not attempt to produce statistics for interfaces for which no statistics collector has registered. Requests for statistics on interfaces for which no statistics collector has registered results in an error returned to the requestor by the statistics manager.
To use commands of this module, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using any command, contact your AAA administrator for assistance.
To clear the interface counters, use the clear counters command in EXEC mode mode.
clear counters [ all | type interface-path-id ]
all |
(Optional) Clears counters on all interfaces. |
||
type |
(Optional) Interface type. For more information, use the question mark (?) online help function. |
||
interface-path-id |
(Optional) Physical interface or virtual interface.
For more information about the syntax for the router, use the question mark (?) online help function. |
Counters for all interfaces are cleared.
Release |
Modification |
---|---|
Release 3.2 |
This command was introduced. |
Use the clear counters command to clear all the statistics counters displayed by the show interfaces command. If no optional arguments are supplied or if the all keyword is specified, then the counters for all interfaces are cleared. If an interface type is specified, then only the counters for that interface are cleared.
The clear counters command with the all option clears counters on all interfaces. When you enter this command, the system prompts you for confirmation. You must then press Enter or the y key for the clear counters command to take effect.
Note | This command does not clear counters retrieved using Simple Network Management Protocol (SNMP), but only those counters displayed with the show interfaces command. |
Task ID |
Operations |
---|---|
interface |
execute |
This example shows how to clear counters on all interfaces:
RP/0/0/CPU0:router# clear counters all
Clear "show interface" counters on all interfaces [confirm]
This example shows how to clear the interface counters for Packet-over-SONET/SDH (POS) interface 0/1/0/0:
RP/0/0/CPU0:router# clear counters POS 0/1/0/0
Clear "show interface" counters on this interface [confirm]
Command |
Description |
---|---|
show interfaces |
Displays statistics for all interfaces configured on the networking device. |
To specify the interval for load calculation of an interface, use the load-interval command in interface configuration mode. To reset the load interval to the default setting, use the no form of this command.
load-interval seconds
no load-interval seconds
seconds |
Number of seconds for load calculation of an interface. The value range is from 0 to 600 seconds and in increments of 30 (such as 30, 60, 90, and so on). The default is 300 seconds. |
seconds: 300 seconds (5 minutes)
Interface configuration
Release |
Modification |
---|---|
Release 3.2 |
This command was introduced. |
When load interval is set to zero, load calculation is disabled. If you set the load interval, you must use a multiple of 30 (up to 600 seconds).
Task ID |
Operations |
---|---|
interface |
read/write |
This example shows how to configure the load interval to 30 seconds:
RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# interface pos 0/1/0/0 RP/0/0/CPU0:router(config-if)# load-interval 30