arrow-left

All pages
gitbookPowered by GitBook
1 of 2

Loading...

Loading...

Display Interface Information

Port counters provide visibility into the traffic flowing on the device. APB provides commands to get counters by using the following commands

pbnoscli# show interface counters 
========================================================================================================================================================================================
Port                           InOctets       InUcastPackets       InMcastPackets       InBcastPackets            OutOctets      OutUcastPackets      OutMcastPackets      OutBcastPackets
========================================================================================================================================================================================
Ethernet1/1                       69386                    0                  259                    0                72046                  100                  283                    0
Ethernet2/1                       55424                    0                  202                    0                64313                  200                  220                    0
Ethernet3/1                           0                    0                    0                    0                    0                    0                    0                    0
<..>
Ethernet64/1                     978170                    0                 1615                 2466              1376464                    0                 5798                    0
pbnoscli# 
pbnoscli# show queue counters Ethernet64/1
        PORT    TxQ    Counter/pkts    Counter/bytes    Drop/pkts    Drop/bytes
------------  -----  --------------  ---------------  -----------  ------------
Ethernet64/1    UC0          200004         14800904            0           N/A
Ethernet64/1    UC1               0                0            0           N/A
Ethernet64/1    UC2               0                0            0           N/A
Ethernet64/1    UC3               0                0            0           N/A
Ethernet64/1    UC4               0                0            0           N/A
Ethernet64/1    UC5               0                0            0           N/A
Ethernet64/1    UC6               0                0            0           N/A
Ethernet64/1    UC7            1373           352035            0           N/A
Ethernet64/1    MC8             N/A              N/A          N/A           N/A
Ethernet64/1    MC9             N/A              N/A          N/A           N/A
Ethernet64/1   MC10             N/A              N/A          N/A           N/A
Ethernet64/1   MC11             N/A              N/A          N/A           N/A
Ethernet64/1   MC12             N/A              N/A          N/A           N/A
Ethernet64/1   MC13             N/A              N/A          N/A           N/A
Ethernet64/1   MC14             N/A              N/A          N/A           N/A
Ethernet64/1   MC15             N/A              N/A          N/A           N/A
pbnoscli#  

hashtag
Clear Counters

To clear the interface counters, use the following command:

pbnoscli# show interface counters detailed Ethernet1/1
Packets Received 64 Octets..................... 0
Packets Received 65-127 Octets................. 0
Packets Received 128-255 Octets................ 1,220
Packets Received 256-511 Octets................ 0
Packets Received 512-1023 Octets............... 0
Packets Received 1024-1518 Octets.............. 0
Packets Received 1519-2047 Octets.............. 0
Packets Received 2048-4095 Octets.............. 0
Packets Received 4096-9216 Octets.............. 0
Packets Received 9217-16383 Octets............. N/A
Total Packets Received Without Errors.......... 1,220
Unicast Packets Received....................... 0
Multicast Packets Received..................... 1,220
Broadcast Packets Received..................... 0
Jabbers Received............................... 0
Fragments Received............................. 0
Undersize Received............................. 0
Overruns Received.............................. N/A
Packets Transmitted 64 Octets.................. 1
Packets Transmitted 65-127 Octets.............. 77
Packets Transmitted 128-255 Octets............. 1,222
Packets Transmitted 256-511 Octets............. 3,777,694,387
Packets Transmitted 512-1023 Octets............ 0
Packets Transmitted 1024-1518 Octets........... 0
Packets Transmitted 1519-2047 Octets........... 0
Packets Transmitted 2048-4095 Octets........... 0
Packets Transmitted 4096-9216 Octets........... 0
Packets Transmitted 9217-16383 Octets.......... N/A
Total Packets Transmitted Successfully......... 3,777,695,687
Unicast Packets Transmitted.................... 3,777,694,387
Multicast Packets Transmitted.................. 1,300
Broadcast Packets Transmitted.................. 0
Time Since Counters Last Cleared............... None
pbnoscli#
pbnoscli# show interface counters rate 
      IFACE    STATE    RX_OK     RX_BPS    RX_UTIL    RX_ERR    RX_DRP    RX_OVR    TX_OK    TX_BPS    TX_UTIL    TX_ERR    TX_DRP    TX_OVR
-----------  -------  -------  ---------  ---------  --------  --------  --------  -------  --------  ---------  --------  --------  --------
Ethernet1/1        D       21   0.00 B/s      0.00%         0         0         0       27  0.00 B/s      0.00%         0         0         0
Ethernet2/1        D       21   0.00 B/s      0.00%         0         0         0       27  0.00 B/s      0.00%         0         0         0
Ethernet3/1        D       21   0.00 B/s      0.00%         0         0         0       28  0.00 B/s      0.00%         0         0         0
Ethernet4/1        D        0   0.00 B/s      0.00%         0         0         0        0  0.00 B/s      0.00%         0         0         0
Ethernet5/1        D        0   0.00 B/s      0.00%         0         0         0        0  0.00 B/s      0.00%         0         0         0
Ethernet6/1        D        0   0.00 B/s      0.00%         0         0         0        0  0.00 B/s      0.00%         0         0         0
Ethernet7/1        D        0   0.00 B/s      0.00%         0         0         0        0  0.00 B/s      0.00%         0         0         0
Ethernet8/1        D        0   0.00 B/s      0.00%         0         0         0        0  0.00 B/s      0.00%         0         0         0
Ethernet9/1        D        0   0.00 B/s      0.00%         0         0         0        0  0.00 B/s      0.00%         0         0         0
Ethernet10/1       D        0   0.00 B/s      0.00%         0         0         0        0  0.00 B/s      0.00%         0         0         0
Ethernet11/1       D        0   0.00 B/s      0.00%         0         0         0        0  0.00 B/s      0.00%         0         0         0
Ethernet12/1       D        0   0.00 B/s      0.00%         0         0         0        0  0.00 B/s      0.00%         0         0         0
Ethernet13/1       U      101  20.97 B/s      0.00%         0         0         0      107  0.15 B/s      0.00%         0         0         0
Ethernet14/1       U      101  25.57 B/s      0.00%         0         0         0      107  0.15 B/s      0.00%         0         0         0
Ethernet15/1       U      102  25.57 B/s      0.00%         0         0         0      108  0.15 B/s      0.00%         0         0         0
<...>
Ethernet62/1       D        0   0.00 B/s      0.00%         0         0         0        0  0.00 B/s      0.00%         0         0         0
Ethernet63/1       D        0   0.00 B/s      0.00%         0         0         0        0  0.00 B/s      0.00%         0         0         0
Ethernet64/1       D        0   0.00 B/s      0.00%         0         0         0        0  0.00 B/s      0.00%         0         0         0
pbnoscli# 
pbnoscli# show interface counters discard-details
========================================================================================================================================================================================
Port                       InDiscards             InErrors     InDroppedPackets        InPauseFrames          OutDiscards            OutErrors    OutDroppedPackets       OutPauseFrames
========================================================================================================================================================================================
Ethernet1/1                         0                    0                    0                    0                    0                    0                    0                    0
Ethernet2/1                         0                    0                    0                    0                    0                    0                    0                    0
Ethernet3/1                         0                    0                    0                    0                    0                    0                    0                    0
Ethernet4/1                         0                    0                    0                    0                    0                    0                    0                    0
Ethernet5/1                         0                    0                    0                    0                    0                    0                    0                    0
Ethernet6/1                         0                    0                    0                    0                    0                    0                    0                    0
Ethernet7/1                         0                    0                    0                    0                    0                    0                    0                    0
Ethernet8/1                         0                    0                    0                    0                    0                    0                    0                    0
Ethernet9/1                         0                    0                    0                    0                    0                    0                    0                    0
Ethernet10/1                        0                    0                    0                    0                    0                    0                    0                    0
Ethernet11/1                        0                    0                    0                    0                    0                    0                    0                    0
Ethernet12/1                        0                    0                    0                    0                    0                    0                    0                    0
Ethernet13/1                        0                    0                    0                    0                    0                    0                    0                    0
Ethernet14/1                        0                    0                    0                    0                    0                    0                    0                    0
Ethernet15/1                        0                    0                    0                    0                    0                    0                    0                    0
Ethernet16/1                        0                    0                    0                    0                    0                    0                    0                    0
Ethernet17/1                        0                    0                    0                    0                    0                    0                    0                    0
Ethernet18/1                        0                    0                    0                    0                    0                    0                    0                    0
Ethernet19/1                        0                    0                    0                    0                    0                    0                    0                    0
Ethernet20/1                        0                    0                    0                    0                    0                    0                    0                    0
Ethernet21/1                        0                    0                    0                    0                    0                    0                    0                    0
Ethernet22/1                        0                    0                    0                    0                    0                    0                    0                    0
Ethernet23/1                        0                    0                    0                    0                    0                    0                    0                    0
Ethernet24/1                        0                    0                    0                    0                    0                    0                    0                    0
Ethernet25/1                        0                    0                    0                    0                    0                    0                    0                    0
Ethernet26/1                        0                    0                    0                    0                    0                    0                    0                    0
Ethernet27/1                        0                    0                    0                    0                    0                    0                    0                    0
Ethernet28/1                        0                    0                    0                    0                    0                    0                    0                    0
Ethernet29/1                        0                    0                    0                    0                    0                    0                    0                    0
Ethernet30/1                        0                    0                    0                    0                    0                    0                    0                    0
Ethernet31/1                        0                    0                    0                    0                    0                    0                    0                    0
Ethernet32/1                        0                    0                    0                    0                    0                    0                    0                    0
pbnoscli# clear counters

Front Panel Port Mapping

SONiC has Ethernet naming based on the lanes like Ethernet0, Ethernet4, Ethernet8… Ethernet252, This is not very user-friendly and the CLI Ethernet names are not mapped to the Physical front panel ports.

To avoid this and provide a better user experience, Interface Mapping Feature is implemented by exposing the Front Panel ports directly to the user and all the mapping to SONiC and ASIC is handled by APB internally.

pbnoscli# show interface npb intfmap
ISCLI PORTS     SONIC PORTS
============    ===========
Ethernet1/1     Ethernet0
Ethernet2/1     Ethernet4
Ethernet3/1     Ethernet8
Ethernet4/1     Ethernet12
Ethernet5/1     Ethernet16
Ethernet6/1     Ethernet20
Ethernet7/1     Ethernet24
Ethernet8/1     Ethernet28
Ethernet9/1     Ethernet32
Ethernet10/1    Ethernet36
Ethernet11/1    Ethernet40
Ethernet12/1    Ethernet44
Ethernet13/1    Ethernet48
Ethernet14/1    Ethernet52
Ethernet15/1    Ethernet56
Ethernet16/1    Ethernet60
Ethernet17/1    Ethernet64
Ethernet18/1    Ethernet68
Ethernet19/1    Ethernet72
Ethernet20/1    Ethernet76
Ethernet21/1    Ethernet80
Ethernet22/1    Ethernet84
Ethernet23/1    Ethernet88
Ethernet24/1    Ethernet92
Ethernet25/1    Ethernet96
Ethernet26/1    Ethernet100
Ethernet27/1    Ethernet104
Ethernet28/1    Ethernet108
Ethernet29/1    Ethernet112
Ethernet30/1    Ethernet116
Ethernet31/1    Ethernet120
Ethernet32/1    Ethernet124
pbnoscli#