Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Monitoring Traffic Through the Router or Switch

To help with the diagnosis of a problem, display real-time statistics about the traffic passing through physical interfaces on the router or switch.

To display real-time statistics about physical interfaces, perform these tasks:

  1. Displaying Real-Time Statistics About All Interfaces on the Router or Switch
  2. Displaying Real-Time Statistics About an Interface on the Router or Switch

Displaying Real-Time Statistics About All Interfaces on the Router or Switch

Purpose

Display real-time statistics about traffic passing through all interfaces on the router or switch.

Action

To display real-time statistics about traffic passing through all interfaces on the router or switch:

user@host> monitor interface traffic

Sample Output

user@host> monitor interface traffic
host name                 Seconds: 15                  Time: 12:31:09
Interface    Link  Input packets        (pps)     Output packets        (pps)
 so-1/0/0    Down              0          (0)                  0          (0)
 so-1/1/0    Down              0          (0)                  0          (0)
 so-1/1/1    Down              0          (0)                  0          (0)
 so-1/1/2    Down              0          (0)                  0          (0)
 so-1/1/3    Down              0          (0)                  0          (0)
 t3-1/2/0    Down              0          (0)                  0          (0)
 t3-1/2/1    Down              0          (0)                  0          (0)
 t3-1/2/2    Down              0          (0)                  0          (0)
 t3-1/2/3    Down              0          (0)                  0          (0)
 so-2/0/0      Up          211035          (1)              36778          (0)
 so-2/0/1      Up         192753          (1)              36782          (0)
 so-2/0/2      Up         211020          (1)              36779          (0)
 so-2/0/3      Up         211029          (1)              36776          (0)
 so-2/1/0      Up         189378          (1)              36349          (0)
 so-2/1/1    Down              0          (0)              18747          (0)
 so-2/1/2    Down              0          (0)              16078          (0)
 so-2/1/3      Up              0          (0)              80338          (0)
 at-2/3/0      Up              0          (0)                  0          (0)
 at-2/3/1    Down              0          (0)                  0          (0)
Bytes=b, Clear=c, Delta=d, Packets=p, Quit=q or ESC, Rate=r, Up=^U, Down=^D

Meaning

The sample output displays traffic data for active interfaces and the amount that each field has changed since the command started or since the counters were cleared by using the C key. In this example, the monitor interface command has been running for 15 seconds since the command was issued or since the counters last returned to zero.


Displaying Real-Time Statistics About an Interface on the Router or Switch

Purpose

Display real-time statistics about traffic passing through an interface on the router or switch.

Action

To display traffic passing through an interface on the router or switch, use the following Junos OS CLI operational mode command:

user@host> monitor interface interface-name

Sample Output

user@host> monitor interface so-0/0/1
Next='n', Quit='q' or ESC, Freeze='f', Thaw='t', Clear='c', Interface='i'
R1
Interface: so-0/0/1, Enabled, Link is Up
Encapsulation: PPP, Keepalives, Speed: OC3 Traffic statistics:
  Input bytes:                    5856541 (88 bps)
  Output bytes:                   6271468 (96 bps)
  Input packets:                   157629 (0 pps)
  Output packets:                  157024 (0 pps)
Encapsulation statistics:
  Input keepalives:                 42353
  Output keepalives:                42320
  LCP state: Opened
Error statistics:
  Input errors:                         0
  Input drops:                          0
  Input framing errors:                 0
  Input runts:                          0
  Input giants:                         0
  Policed discards:                     0
  L3 incompletes:                       0
  L2 channel errors:                    0
  L2 mismatch timeouts:                 0
  Carrier transitions:                  1
  Output errors:                        0
  Output drops:                         0
  Aged packets:                         0
Active alarms : None
Active defects: None
SONET error counts/seconds:
  LOS count                             1
  LOF count                             1
  SEF count                             1
  ES-S                                 77
  SES-S                                77
SONET statistics:
  BIP-B1                                0
  BIP-B2                                0
  REI-L                                 0
  BIP-B3                                0
  REI-P                                 0
Received SONET overhead:  F1        : 0x00  J0        : 0xZ

Meaning

The sample output shows the input and output packets for a particular SONET interface (so-0/0/1). The information can include common interface failures, such as SONET/SDH and T3 alarms, loopbacks detected, and increases in framing errors. For more information, see Checklist for Tracking Error Conditions.

To control the output of the command while it is running, use the keys shown in Table 1.

Table 1: Output Control Keys for the monitor interface Command

Action

Key

Display information about the next interface. The monitor interface command scrolls through the physical or logical interfaces in the same order that they are displayed by the show interfaces terse command.

N

Display information about a different interface. The command prompts you for the name of a specific interface.

I

Freeze the display, halting the display of updated statistics.

F

Thaw the display, resuming the display of updated statistics.

T

Clear (zero) the current delta counters since monitor interface was started. It does not clear the accumulative counter.

C

Stop the monitor interface command.

Q

See the Junos OS Operational Mode Commands for details on using match conditions with the monitor traffic command.

Published: 2013-04-03

Supported Platforms

Published: 2013-04-03