System Monitoring Command Reference for Cisco NCS 6000 Series Routers
Statistics Service Commands
Downloads: This chapterpdf (PDF - 1.26MB) The complete bookPDF (PDF - 3.28MB) | Feedback

Statistics Service Commands

Statistics Service Commands

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.

clear counters

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

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

Syntax Description

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.

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.

Command Default

Counters for all interfaces are cleared.

Command Modes

XR EXEC

Command History

Release

Modification

Release 5.0.0

This command was introduced.

Usage Guidelines

To use this command, 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 a command, contact your AAA administrator for assistance.

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

Task ID

Operations

interface

execute

Examples

This 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]

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

Command Default

seconds: 300 seconds (5 minutes)

Command Modes

Interface configuration

Command History

Release

Modification

Release 5.0.0

This command was introduced.

Usage Guidelines

To use this command, 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 a command, contact your AAA administrator for assistance.

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

This example shows how to configure the load interval to 30 seconds:

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