Cisco IOS XR System Monitoring Command Reference, Release 3.8
Statistics Service Commands on Cisco IOS XR Software

Table Of Contents

Statistics Service Commands on Cisco IOS XR Software

clear counters

load-interval


Statistics Service Commands on Cisco IOS XR Software


This chapter describes the Cisco IOS XR commands related to the collection of interface statistics (StatsD). 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. The statistics manager is located on the node where the logical router (LR) controller is running (route processor [RP]).

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.

clear counters

To clear the interface counters, use the clear counters command in EXEC mode.

clear counters [all | type interface-path-id]

Syntax Description

all

(Optional) Clears counters on all interfaces.

type

Interface type. For more information, use the question mark (?) online help function.

interface-path-id

Physical interface or virtual interface.

Note Use the show interfaces command to see a list of all interfaces currently configured on the router.

For more information about the syntax for the router, use the question mark (?) online help function.


Defaults

Counters for all interfaces are cleared.

Command Modes

EXEC

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Release 3.5.0

No modification.

Release 3.6.0

No modification.

Release 3.7.0

No modification.

Release 3.8.0

No modification.


Usage Guidelines

To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.

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 y 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

Task ID
Operations

interface

execute


Examples

The following example shows how to clear counters on all interfaces:

RP/0/RP0/CPU0:router# clear counters all
Clear "show interface" counters on all interfaces [confirm]

The following example shows how to clear the interface counters for Packet-over-SONET/SDH (POS) interface 0/1/0/0:

RP/0/RP0/CPU0:router# clear counters POS 0/1/0/0
Clear "show interface" counters on this interface [confirm]

Related Commands

Command
Description

show interfaces

Displays statistics for all interfaces configured on the networking device.


load-interval

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

Syntax Description

seconds

Number of seconds for load calculation of an interface.Range is 0 to 600, in increments of 30 (such as 30, 60, 90, and so on). The default is 300. The value 0 disables load calculation.


Defaults

seconds: 300

Command Modes

Interface configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router.

Release 3.3.0

No modification.

Release 3.4.0

No modification.

Release 3.5.0

No modification.

Release 3.6.0

No modification.

Release 3.7.0

No modification.

Release 3.8.0

No modification.


Usage Guidelines

To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.

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

Task ID
Operations

interface

read/write


Examples

The following example shows how to configure the load interval to 30 seconds:

RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# interface pos 0/1/0/0
RP/0/RP0/CPU0:router(config-if)# load-interval 30