qos traffic-counter
Use qos traffic-counter to enable the traffic accounting function and specify the type of traffic.
Use undo qos traffic-counter to disable the traffic accounting function.
Syntax
In standalone mode:
qos traffic-counter { inbound | outbound } { counter0 | counter1 } slot slot-number [ drop-priority drop-priority | interface interface-type interface-number | vlan vlan-id ] *
undo qos traffic-counter { inbound | outbound } { counter0 | counter1 } slot slot-number
In IRF mode:
qos traffic-counter { inbound | outbound } { counter0 | counter1 } chassis chassis-number slot slot-number [ drop-priority drop-priority | interface interface-type interface-number | vlan vlan-id ] *
undo qos traffic-counter { inbound | outbound } { counter0 | counter1 } chassis chassis-number slot slot-number
Default
The traffic accounting function is disabled.
Views
System view
Predefined user roles
network-admin
mdc-admin
Parameters
inbound: Inbound direction.
outbound: Outbound direction.
counter0: Counter 0.
counter1: Counter 1.
slot slot-number: Specifies a card by its slot number. (In standalone mode.)
chassis chassis-number slot slot-number: Specifies a card on an IRF member device. The chassis-number argument refers to the ID of the IRF member device, and the slot-number argument refers to the number of the slot where the card resides. (In IRF mode.)
drop-priority drop-priority: Specifies a drop priority, which ranges from 0 to 2.
interface interface-type interface-number: Specifies an interface by its type and number.
vlan vlan-id: Specifies a VLAN by its ID in the range of 1 to 4094.
Usage guidelines
A card provides two counters for traffic accounting. The monitored object can be a port, a VLAN, or a drop priority value.
If no port is specified, the traffic of all the ports on the card is monitored.
If no VLAN is specified, the traffic of all the VLANs is monitored.
If no drop priority value is specified, the traffic with any drop priority value is monitored.
When you redefine the monitored object on a card with the qos traffic-counter command, the counter resets automatically.
The drop-priority keyword supports only the outbound direction.
FD and FG cards support counting only traffic on a specific interface, but not traffic of VLANs, drop priority values, or all interfaces. To specify an interface, specify the slot number and interface number.
Examples
# (In standalone mode.) Enable counter 0 of card 4 to collect statistics about the outbound traffic on GigabitEthernet 3/0/1.
<Sysname> system-view [Sysname] qos traffic-counter outbound counter0 slot 4 interface gigabitethernet 3/0/1
# (n IRF mode.) Enable counter 0 of card 4 on IRF member device 1 to collect statistics about the outbound traffic on GigabitEthernet 1/3/0/1.
<Sysname> system-view [Sysname] qos traffic-counter outbound counter0 chassis 1 slot 4 interface gigabitethernet 1/3/0/1