Displaying real-time statistics about a physical interface is useful when you need to narrow down possible causes of an interface problem. The monitor command checks for and displays common interface failures, indicates whether loopback is detected, and shows any increases in framing errors.
![]() |
Note: If you are accessing the router from the console connection, make sure you set the CLI terminal type using the set cli terminal command. |
To display real-time statistics about a physical interface, use the following JUNOS CLI operational mode command:
user@host> monitor interface so-0/0/0 router1 Seconds: 19 Time: 15:46:29 Interface: so-0/0/0, Enabled, Link is Up Encapsulation: PPP, Keepalives, Speed: OC48 Traffic statistics: Current Delta Input packets: 6045 (0 pps) [11] Input bytes: 6290065 (0 bps) [13882] Output packets: 10376 (0 pps) [10] Output bytes: 10365540 (0 bps) [9418] Encapsulation statistics: Input keepalives: 1901 [2] Output keepalives: 1901 [2] NCP state: Opened LCP state: Opened Error statistics: Input errors: 0 [0] Input drops: 0 [0] Input framing errors: 0 [0] Policed discards: 0 [0] L3 incompletes: 0 [0] L2 channel errors: 0 [0] L2 mismatch timeouts: 0 [0] Carrier transitions: 1 [0] Output errors: 0 [0] Output drops: 0 [0] Aged packets: 0 [0] Active alarms : None Active defects: None SONET error counts/seconds: LOS count 1 [0] LOF count 1 [0] SEF count 1 [0] ES-S 0 [0] SES-S 0 [0] SONET statistics: BIP-B1 458871 [0] BIP-B2 460072 [0] REI-L 465610 [0] BIP-B3 458978 [0] REI-P 458773 [0] Received SONET overhead: F1 : 0x00 J0 : 0x00 K1 : 0x00 K2 : 0x00 S1 : 0x00 C2 : 0x00 C2(cmp) : 0x00 F2 : 0x00 Z3 : 0x00 Z4 : 0x00 S1(cmp) : 0x00 Transmitted SONET overhead: F1 : 0x00 J0 : 0x01 K1 : 0x00 K2 : 0x00 S1 : 0x00 C2 : 0xcf F2 : 0x00 Z3 : 0x00 Z4 : 0x00 Next='n', Quit='q' or ESC, Freeze='f', Thaw='t', Clear='c', Interface='i'
The sample output displays real-time statistics about the physical interface (updating them every second), the amount that each field has changed since you started the command or since you cleared the counters by using the C key. It also checks for and displays common interface failures, such as SONET/SDH and T3 alarms, detected loopbacks, and increases in framing errors.
To control the output of the command while it is running, use the keys shown in Table 28.
Table 28: Monitor Interface Output Control Keys