monitor counters interface

Function

The monitor counters interface command enables a device to monitor traffic statistics on an interface.

Format

monitor counters [ bit ] [ rate ] interface { interface-name | interface-type interface-number } [ [ interval interval-value ] [ times { times-value | infinity } ] | [ times { times-value | infinity } ] [ interval interval-value ] ]

Parameters

Parameter Description Value
bit

Displays the number of traffic bits per second. This parameter is supported only on Ethernet physical interfaces, their sub-interfaces, Eth-Trunk interfaces, and their sub-interfaces.This parameter is not supported on remote Eth-Trunk interfaces.

-

rate

Displays the traffic rate on an interface. If rate is not specified, the number of packets on an interface is displayed.

This parameter is supported only on an interface whose physical status is Up.

-

interface-name

Specifies the name of an interface.

-

interface-type interface-number

Specifies the type and number of an interface.

-

interval interval-value

Specifies the interval at which the running status and traffic statistics of an interface are monitored.

The value is an integer ranging from 2 to 600, in seconds. The default value is 10.

times times-value

Specifies the number of times that the running status and traffic statistics of an interface are monitored.

The value is an integer ranging from 1 to 999. The default value is 5.

infinity

Monitors the running status and traffic statistics of an interface for indefinite times. To stop the statistics display, press Ctrl+C.

-

Views

All views

Default Level

1: Monitoring level

Task Name and Operations

Task Name Operations
interface-mgr read

Usage Guidelines

Usage Scenario

To view real-time traffic statistics on an interface, run the monitor counters interface command to enable a device to monitor traffic statistics on the interface at a specified interval and display the statistics in real time. The traffic statistics include the number of unicast, multicast, and broadcast packets sent or received by the interface and the packet transmission rate.

By default, once this command is run, the system displays real-time traffic statistics at an interval of 10s for five times. To stop the statistics display, press Ctrl+C.

Prerequisites

  • To monitor traffic statistics and the traffic rate on an interface, ensure that traffic statistics collection has been enabled on the interface using the statistic enable mode port command. By default, this function is disabled.
  • To monitor traffic statistics and the traffic rate on a sub-interface, ensure that traffic statistics collection has been enabled on the sub-interface using the statistic enable command. By default, this function is disabled.

Example

# Set the interval for displaying the number of traffic bits on GE 0/1/0 to 3 seconds and set the number of times for displaying the number of traffic bits on this interface to 2.
<HUAWEI> monitor counters bit interface GigabitEthernet0/1/0 interval 3 times 2
Display counters of the interface at the interval of 3 seconds for up to 2 times. Press Ctrl + C to stop.
  0 seconds left
Times 1
Inbound
Interface           Octets(bits) Unicast(bits) Multicast(bits) Broadcast(bits)
GigabitEthernet0/1/0                  0             0               0            3107
Outbound
Interface           Octets(bits) Unicast(bits) Multicast(bits) Broadcast(bits)
GigabitEthernet0/1/0                  0             0               0            3084

  0 seconds left
Times 2
Inbound
Interface           Octets(bytes) Unicast(bits) Multicast(bits) Broadcast(bits)
GigabitEthernet0/1/0                  0             0               0            3108
Outbound
Interface           Octets(bytes) Unicast(bits) Multicast(bits) Broadcast(bits)
eigabitethernet1/0/0                  0             0               0            3085
# Set the interval for displaying traffic statistics on GE 0/1/0 to 3 seconds and set the number of times for displaying traffic statistics on this interface to 2.
<HUAWEI> monitor counters interface GigabitEthernet0/1/0 interval 3 times 2
Display counters of the interface at the interval of 3 seconds for up to 2 times. Press Ctrl + C to stop.
  0 seconds left
Times 1
Inbound
Interface           Octets(bytes) Unicast(pkts) Multicast(pkts) Broadcast(pkts)
GigabitEthernet0/1/0                  0             0               0            3107
Outbound
Interface           Octets(bytes) Unicast(pkts) Multicast(pkts) Broadcast(pkts)
GigabitEthernet0/1/0                  0             0               0            3084

  0 seconds left
Times 2
Inbound
Interface           Octets(bytes) Unicast(pkts) Multicast(pkts) Broadcast(pkts)
GigabitEthernet0/1/0                  0             0               0            3108
Outbound
Interface           Octets(bytes) Unicast(pkts) Multicast(pkts) Broadcast(pkts)
GigabitEthernet0/1/0                  0             0               0            3085
Table 1 Description of the monitor counters interface command output
Item Description
seconds left

Time elapsed since the next display of interface traffic statistics, in seconds.

Times

Number of displayed times. This field is displayed at the beginning of each query.

Inbound

Inbound traffic statistics on the interface.

Interface

Interface type and number.

Octets(bits)

Inbound/outbound packet rate of the interface, in bytes/s.

Unicast(bits)

Total number of inbound or outbound unicast packet bits on the interface.

Multicast(bits)

Total number of inbound or outbound multicast packet bits on the interface.

Broadcast(bits)

Total number of inbound or outbound broadcast packet bits on the interface.

Outbound

Outbound traffic statistics on the interface.

Octets(bytes)

Total number of inbound or outbound bytes on the interface.

Unicast(pkts)

Total number of inbound or outbound unicast packets on the interface.

Multicast(pkts)

Total number of inbound or outbound multicast packets on the interface.

Broadcast(pkts)

Total number of inbound or outbound broadcast packets on the interface.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >