Overblog
Editer l'article Suivre ce blog Administration + Créer mon blog
1 février 2012 3 01 /02 /février /2012 20:48

Sometimes you may need to have some additional interface statistics, for example the amount of packets per range of sizes. You can use netflow to collect some stats like these. But if you don't have netflow on all your router interfaces or for troubleshooting purposes you need sometimes to quickly check packet size stats : You can use PFE commands.

  

Each PFE command has been tested several times and I never encountered issue with these one. But As I already said in a previous post : PFE commands are not supported by JTAC : so be careful. (expecially with a new Junos version - try before in lab ;-) 

 

Each type of card has its own PFE command to collect Interface statistics. Let's start with the MX series.

 

1/ MX series - Ichip based card


For DPCE 40x1GE or 4x10GE or combo cards

 


start shell pfe network fpcN  # N = FPC slot

  

# X = PIC slot ; Y = Port slot ex. xe-N/X/Y

show xeth-pic X port Y stats 


Stats for ifd : xe-1/2/0

Description                         Rx Stats        Tx Stats

Packet                                   1603898608      3045865216

Reject                                   0               0

Reject DA                                0               0

Reject SA                                0               0

TX Pad                                   0               0

Packet Error                             0               0

Octets                                   1218660139171   1573387361585

Packets                                  1603898608      3045865216

Unicasts                                 1597588502      3037401383

Broadcasts                               1997            4876

Multicasts                               6308109         8458957

CRC/Align Errros                         0               0

Undersize Pkts                           0               0

Oversize Pkts                            12498637        0

64 Octets Pkts                           115896          0

65-127 Octets Pkts                       145372326       0

128-255 Octets Pkts                      136620081       0

256-511 Octets Pkts                      265502591       0

512-1023 Octets Pkts                     531553989       0

1024-1518 Octets Pkts                    511740410       0

MAC Control Frames                       0               0

Unsupported Opcode                       0               0

Pause Frames                             0               0

OK Frames                                1603898608      0

OK Octets                                1218660139171   0

In Range Length Errors                   0               0

Out of Range Length Field                0               0

Code Violations                          0               0

VLAN Tagged Frames                       0               0

Ether Fragments                          0               0

Jabber                                   0               0

Fifo Underrun                            0               0

Packets                                  1603898608      3045865216

Bytes                                    1218660139171   1573387361585

Multicast Packets                        6308109         8458957

Packet Rate                              3               6

Byte Rate                                356             631

Error                                    0               0

Replicated multicast pkts                0               0

Replicated multicast bytes               0               0

Replicated multicast pkts rate           0               0

Replicated multicast bytes rate          0               0 


 

2/ MX series - Trio based card


For MPC 3D 16x10GE, MPC type 2...

 


start shell pfe network fpcN  # N = FPC slot

 

# Identify first the ID of the interface :

show mtip-xge summary

 ID mtip_xge name        FPC PIC ifd                  (ptr)

--- -------------------- --- --- -------------------- --------

  1 mtip_xge.3.0.256       3   0                      718100b0

  2 mtip_xge.3.0.0         3   0 xe-3/0/0             718f5be8

  3 mtip_xge.3.1.257       3   1                      718f6520

  4 mtip_xge.3.2.258       3   2                      7190cad0

  5 mtip_xge.3.3.259       3   3                      71923080

  6 mtip_xge.3.0.1         3   0 xe-3/0/1             719f6080

  7 mtip_xge.3.0.2         3   0 xe-3/0/2             71ac6558

  8 mtip_xge.3.0.3         3   0 xe-3/0/3             71b97030

  9 mtip_xge.3.1.0         3   1 xe-3/1/0             71c68cc0

 10 mtip_xge.3.1.1         3   1 xe-3/1/1             71d38c08

 11 mtip_xge.3.1.2         3   1 xe-3/1/2             71e08d90

 12 mtip_xge.3.1.3         3   1 xe-3/1/3             71edba00

 13 mtip_xge.3.2.0         3   2 xe-3/2/0             71fb0f38

 14 mtip_xge.3.2.1         3   2 xe-3/2/1             72081060

 15 mtip_xge.3.2.2         3   2 xe-3/2/2             72151b30

 16 mtip_xge.3.2.3         3   2 xe-3/2/3             72223658

 17 mtip_xge.3.3.0         3   3 xe-3/3/0             722f3fb0

 18 mtip_xge.3.3.1         3   3 xe-3/3/1             723c40d8

 19 mtip_xge.3.3.2         3   3 xe-3/3/2             72494260

 20 mtip_xge.3.3.3         3   3 xe-3/3/3             72564ab0

 

# Then Display the statistics for the given interface ID ; X = ID

show mtip-xge X statistics

Statistics

----------

  aFramesTransmittedOK:                                            2

  aFramesReceivedOK:                                              12

  aFrameCheckSequenceErrors:                                       0

  aAlignmentErrors:                                                0

  aPAUSEMACCtrlFramesTransmitted:                                  0

  aPAUSEMACCtrlFramesReceived:                                     0

  aFrameTooLongErrors:                                             0

  aInRangeLengthErrors:                                            0

  VLANTransmittedOK:                                               0

  VLANReceivedOK:                                                  0

  ifOutOctets:                                                   128

  ifInOctets:                                                    768

  ifInUcastPkts:                                                   0

  ifInMulticastPkts:                                               0

  ifInBroadcastPkts:                                              12

  ifInErrors:                                                      0

  ifOutErrors:                                                     0

  ifOutUcastPkts:                                                  2

  ifOutMulticastPkts:                                              0

  ifOutBroadcastPkts:                                              0

  etherStatsDropEvents:                                            0

  etherStatsOctets:                                              768

  etherStatsPkts:                                                 12

  etherStatsJabbers:                                               0

  etherStatsFragments:                                             0

  etherStatsUndersizePkts:                                         0

  etherStatsOversizePkts:                                          0

  etherStatsPkts64Octets:                                         12

  etherStatsPkts65to127Octets:                                     0

  etherStatsPkts128to255Octets:                                    0

  etherStatsPkts256to511Octets:                                    0

  etherStatsPkts512to1023Octets:                                   0

  etherStatsPkts1024to1518Octets:                                  0

  etherStatsPkts1519toMaxOctets:                                   0

  etherStatsPkts64OctetsTx:                                        2

  etherStatsPkts65to127OctetsTx:                                   0

  etherStatsPkts128to255OctetsTx:                                  0

  etherStatsPkts256to511OctetsTx:                                  0

  etherStatsPkts512to1023OctetsTx:                                 0

  etherStatsPkts1024to1518OctetsTx:                                0

  etherStatsPkts1519toMaxOctetsTx:                                 0


 

3/ T series - Non-Stoli based FPC

 

For example T640 with FPC type 3

 


start shell pfe network fpcN  # N = FPC slot

 

# X = PIC slot ; Y = Port slot ex. : ge-N/X/Y

show xge-pic X link Y mac stats


 

PIC 0 XGE information:

 

 10 Gig Ethernet PIC, 10 port(s)

 Monitoring is disabled, periodics are enabled

 Normal interrupts are enabled, total count is 23

 IFD count is 10

 

PM3388 ID 1 .pm3388.2.0. (fpc 2, pic 0) link registers

 

SERDES Port  0 total reference unlock events: 0

SERDES Port  0 total data unlock events: 95

SERDES Port  0 total irq events: 0

 

SERDES Port  0 registers

-------------------------

  Lock Detect Change (offset 200):                             9f16

  Lock Detect Mask (offset 201):                                  0

  Configuration (offset 203):                                  1001

  TX Mode (offset 205):                                        1004

EGMAC Port  0 registers

------------------------

  GMACC0 Configuration High Word (offset 401):                    0

  GMACC1 Configuration Low Word (offset 402):                   613

  GMACC1 Configuration High Word (offset 403):                 4000

  GMACC2 Configuration Low Word (offset 404):                     c

  GPCSC PHY Configuration Low Word (offset 406):                100

  GPCSC PHY Configuration High Word (offset 407):                 0

  Station Address (offset 408):                   00:1d:b5:d1:39:fc

  VLAN Tag Protocol ID (offset 40c):                           8100

  Receive Maximum Frame Size (offset 410):                      5f6

  Interrupt (offset 412):                                         0

  Interrupt Enable (offset 413):                                  1

  Interrupt Status (offset 414):                                  0

  Auto-Negotiation Control (offset 418):                          2

  Auto-Negotiation Status (offset 41a):                           0

  Auto-Negotiation Advertisement Low Word (offset 41c):         1a0

  Auto-Negotiation Advertisement High Word (offset 41d):          0

  Auto-Negotiation Link Part Able Low Word (offset 41e):          0

  Auto-Negotiation Link Part Able High Word (offset 41f):         0

  Transmit Control (offset 432):                                  0

  EGMAC Control (offset 433):                                   800

  Transmit PAUSE Timer (offset 434):                             ff

  Transmit PAUSE Timer Interval (offset 435):                    7f

  Transmit Max Frame Size (offset 436):                         5f6

  Receive FIFO Forwarding Threshold (offset 437):               181

  Address Filter Control 0 (offset 45d):                          0

  Address Filter Control 1 (offset 45e):                          0

  Address Filter Control 2 (offset 45f):                          2

MSTAT Port  0 registers

------------------------

  Control (offset 1400):                                              0

  Counter Rollover 0 (offset 1401):                                   0

  Counter Rollover 1 (offset 1402):                                   0

  Counter Rollover 2 (offset 1403):                                   0

  Counter Rollover 3 (offset 1404):                                   0

  Interrupt Mask 0 (offset 1405):                                     0

  Interrupt Mask 1 (offset 1406):                                     0

  Interrupt Mask 2 (offset 1407):                                     0

  Interrupt Mask 3 (offset 1408):                                     0

MSTAT Port  0 Counters

-----------------------

  Frames Received OK (offset 1410):                                        0

  Octets Received OK (offset 1414):                                        0

  Frames Received (offset 1418):                                           0

  Octets Received (offset 141c):                                           0

  Unicast Frames Received OK (offset 1420):                                0

  Multicast Frames Received OK (offset 1424):                              0

  Broadcast Frames Received OK (offset 1428):                              0

  Tagged Frames Received OK (offset 142c):                                 0

  PAUSE MAC Control Frame Received (offset 1430):                          0

  MAC Control Frame Received (offset 1434):                                0

  Frame Check Sequence Errors (offset 1438):                               0

  Frames Lost Due To Internal MAC Error (offset 143c):                     0

  Symbol Error (offset 1440):                                              0

  In Range Length Error (offset 1444):                                     0

  Frames Too Long Errors (offset 144c):                                    0

  Jabbers (offset 1450):                                                   0

  Fragments (offset 1454):                                                 0

  Undersized Frames (offset 1458):                                         0

  Receive Frames 64 Octets (offset 145c):                                  0

  Receive Frames 65 to 127 Octets (offset 1460):                           0

  Receive Frames 128 to 255 Octets (offset 1464):                          0

  Receive Frames 256 to 511 Octets (offset 1468):                          0

  Receive Frames 512 to 1023 Octets (offset 146c):                         0

  Receive Frames 1024 to 1518 Octets (offset 1470):                        0

  Receive Frames 1519 to MAX Octets (offset 1474):                         0

  Jumbo Octets Received OK (offset 1478):                                  0

  Filtered Octets (offset 147c):                                           0

  Filtered Unicast Frames (offset 1480):                                   0

  Filtered Multicast Frames (offset 1484):                                 0

  Filtered Broadcast Frames (offset 1488):                                 0

  Frames Transmitted OK (offset 1490):                                     0

  Octets Transmitted OK (offset 1494):                                     0

  Octets Transmitted (offset 1498):                                        0

  Frames Lost Due To MAC Tx Error (offset 149c):                    0

  Transmit System Error (offset 14a0):                                     0

  Unicast Frames Transmitted Attempted (offset 14a4):                      0

  Unicast Frames Transmitted OK (offset 14a8):                             0

  Multicast Frames Transmitted Attempted (offset 14ac):                    0

  Multicast Frames Transmitted OK (offset 14b0):                           0

  Broadcast Frames Transmitted Attempted (offset 14b4):                    0

  Broadcast Frames Transmitted OK (offset 14b8):                           0

  PAUSE MAC CTRL Frames Transmitted (offset 14bc):                         0

  MAC CTRL Frames Transmitted (offset 14c0):                               0

  Transmitted Frames 64 Octets (offset 14c4):                              0

  Transmitted Frames 65 to 127 Octets (offset 14c8):                       0

  Transmitted Frames 128 to 255 Octets (offset 14cc):                      0

  Transmitted Frames 256 to 511 Octets (offset 14d0):                      0

  Transmitted Frames 512 to 1023 Octets (offset 14d4):                     0

  Transmitted Frames 1024 to 1518 Octets (offset 14d8):                    0

  Transmitted Frames 1519 to MAX Octets (offset 14dc):                     0

  Jumbo Octets Transmitted OK (offset 14e0):                               0

  Tagged Frames Transmitted (offset 14e4):                                 0

  Filtered Transmitted Frames (offset 14e8):                               0



4/ T series - Stoli based FPC


For Stoli based cards, so for example an FPC type 4 of a T1600.

 


start shell pfe network fpcN  # N = FPC slot

 

# X = PIC slot ; Y = Port slot ex. : xe-N/X/Y

show sxge-pic X link Y mac stats

 

PIC 0 4 x 10 GE information:

 

 4 x 10 Gig Ethernet PIC, 4 port(s)

 Periodics are enabled

 Normal interrupts are enabled, ISR called 4473 times

 MAC interrupts (irq count) are

  enabled(409) enabled(370) enabled(679) enabled(1833)

 PHY interrupts (irq count) are

  enabled(375) enabled(374) enabled(570) enabled(432)

 IFD count is 4

Statistics

----------

  aFramesTransmittedOK:                               10528286303837

  aFramesReceivedOK:                                  14518676462093

  aFrameCheckSequenceErrors:                                    6342

  aAlignmentErrors:                                            10083

  aPAUSEMACCtrlFramesTransmitted:                                  0

  aPAUSEMACCtrlFramesReceived:                                     0

  aFrameTooLongErrors:                                            89

  aInRangeLengthErrors:                                            0

  VLANTransmittedOK:                                               0

  VLANReceivedOK:                                                  0

  ifOutOctets:                                      2774207818349202

  ifInOctets:                                      16573290557876434

  ifInUcastPkts:                                      14518663451205

  ifInMulticastPkts:                                        12992456

  ifInBroadcastPkts:                                           18435

  ifInErrors:                                                   6429

  ifOutErrors:                                                     0

  ifOutUcastPkts:                                     10528272308733

  ifOutMulticastPkts:                                       13976222

  ifOutBroadcastPkts:                                          18897

  etherStatsDropEvents:                                            0

  etherStatsOctets:                                16573290565882378

  etherStatsPkts:                                     14518676468517

  etherStatsJabbers:                                              89

  etherStatsFragments:                                             0

  etherStatsUndersizePkts:                                         0

  etherStatsOversizePkts:                                          0

  etherStatsPkts64Octets:                              1046268071788

  etherStatsPkts65to127Octets:                         1467805024958

  etherStatsPkts128to255Octets:                         615828012488

  etherStatsPkts256to511Octets:                         381991176076

  etherStatsPkts512to1023Octets:                        400440801574

  etherStatsPkts1024to1518Octets:                     10606343256707

  etherStatsPkts1519toMaxOctets:                              124854

  etherStatsPkts64OctetsTx:                            5420638955999

  etherStatsPkts65to127OctetsTx:                       2690175810431

  etherStatsPkts128to255OctetsTx:                       504549459329

  etherStatsPkts256to511OctetsTx:                       308804848517

  etherStatsPkts512to1023OctetsTx:                      385212151126

  etherStatsPkts1024to1518OctetsTx:                    1218904126923

  etherStatsPkts1519toMaxOctetsTx:                            951533



David.


Partager cet article
Repost0

commentaires