clear counters interface

Clears counters of the specified interface.

Syntax

clear counters interface ethernet [ IFNAME | all ]
clear counters interface management 0
clear counters interface port-channel number

Parameters

ethernet
Specifies the counters of ethernet interface.
IFNAME
Specifies the ethernet interface name in slot/port format. Example: 1/1 Range: 1/1-3, 5, 7-9.
all
Clears all ethernet interface statistics.
Management 0
Specifies the management interface.
port-channel number
Specifies the port-channel interface. Valid values are 1 through 255.

Modes

Exec mode

Usage Guidelines

This command is available only to users with admin role.

Table 1. Error messages
Message Reason
Error: Command supported on active interfaces only The specified interface must be active.

Examples

The following example clears counters of the ethernet interface on slot/port 1/1.

device# clear counters interface ethernet 1/1
device#

The following example clears counters on management interface 0.

device# clear counters interface management 0
device#

The following example clears port-channel 1 counters.

device# clear counters interface port-channel 1
device#

The following example clears counters for all ethernet interfaces.

device# clear counters interface ethernet all
device#