The collect counters top command sets the parameters for top N interface traffic statistics and enables the function to generate top N interface traffic statistics reports.
collect counters top [ number ] interface { interface-type | all | layer-2 | layer-3 } [ sort-by statistics-type | interval interval-value ] *
Parameter | Description | Value |
---|---|---|
number |
Specifies the number of busiest interfaces for which traffic statistics reports are to be generated. For example, if the value is 10, a traffic statistics report about top 10 busiest interfaces is generated. If you do not specify this parameter, a traffic statistics report about top 20 busiest interfaces is generated. |
The value is an integer ranging from 1 to 50000. |
interface { interface-type | all | layer-2 | layer-3 } |
Specifies the type of the interfaces for which a top N traffic statistics report is to be generated:
|
The specified interfaces must be Ethernet physical interfaces or Eth-Trunk interfaces. |
sort-by statistics-type |
Specifies the statistics type by which ports are determined to be the busiest. If you do not specify sort-by statistics-type, statistics are sorted by the total number of bytes in descending order. |
The value can be:
|
interval interval-value |
Specifies the interval at which statistics are collected. |
The value is an integer ranging from 1 to 999, in seconds. The default value is 30. |
Usage Scenario
The display command allows you to view statistics about the traffic sent and received by each interface on a device, but cannot sort these statistics by traffic volume in descending order. The display counters top interface command allows you to view top N interface traffic statistics reports, facilitating interface monitoring. Before you view a top N interface traffic statistics report, run the collect counters top command to generate your desired top N interface traffic statistics report. For example, configure the device to generate a top N statistics report about packets dropped on Layer 2 interfaces within 50s.
The top N interface traffic statistics function sorts statistics about inbound and outbound traffic processed by interfaces within a collection interval in descending order and generates a top N interface traffic statistics report. The device stops collecting interface traffic statistics after the collection interval ends. To generate another top N interface traffic statistics report, run the collect counters top command again.
Configuration Impact
Follow-up Procedure
To view a top N interface traffic statistics report, run the display counters top interface command.