Operational Monitoring and Maintenance · Topic 1 of 4
Show and Monitor Commands
Learn Junos show and monitor commands for JNCIA-Junos JN0-106: common show commands, detail levels, monitor interface, monitor traffic and live log files.
- 5 min
showgives a snapshot;monitorgives a live view.show interfaceslevels:terse,brief, default,detail,extensive.monitor interface= live counters;monitor traffic interface= capture of RE traffic only.
What it is
Show commands display a snapshot of the device's state at the moment you run them: interfaces, routes, hardware, alarms, logs and more. Monitor commands display a live view that keeps updating until you stop it.
Both run in operational mode, at the user@router> prompt. In configuration mode, show displays the candidate configuration instead, so to run an operational show command from there you prefix it with run.
How it works
Common show commands
| Command | Shows |
|---|---|
show version | Hostname, model and Junos OS release |
show chassis hardware | Installed hardware and serial numbers |
show chassis alarms | Active chassis alarms, such as a failed fan or power supply |
show system alarms | Active system alarms, such as a missing rescue configuration |
show system uptime | Current time, boot time and time since the last configuration change |
show system storage | File system usage |
show system users | Who is logged in |
show interfaces terse | One line per interface with admin and link status and addresses |
show route | The routing table |
show log messages | The main system log file |
show configuration | The active configuration, from operational mode |
Detail levels
Many show commands take a level keyword that controls how much you see. show interfaces is the best example.
| Level | What you get |
|---|---|
terse | One line per interface: Admin, Link, Proto, Local and Remote |
brief | A short summary for each interface |
| (none) | The default, with key status and traffic figures |
detail | More counters and per logical unit information |
extensive | Everything, including all error counters |
Start with terse to find the problem interface, then use extensive on that one interface to see why.
Filtering long output
Output can be long, so you pipe it through a filter with |:
user@router> show interfaces terse | match ge-
user@router> show log messages | last 20
user@router> show route | count
| match shows lines that contain a pattern, | except hides them, | count counts lines, | last shows the end of the output and | no-more prints everything without pausing. The User Interfaces chapter covers filtering in full.
Monitor commands
| Command | What it does |
|---|---|
monitor interface ge-0/0/0 | Live counters and rates for one interface, updated continuously |
monitor interface traffic | Live packet and byte counts for all interfaces |
monitor traffic interface ge-0/0/0 | Live packet capture of traffic to and from the Routing Engine on that interface |
monitor start messages | Shows new lines of a log file on screen as they are written |
monitor list | Lists the files being monitored |
monitor stop | Stops monitoring log files |
Inside monitor interface you use single keys: n moves to the next interface, f freezes the display, t thaws it, c clears the counters and q quits.
monitor traffic is not a transit capture
monitor traffic interface works like a packet sniffer, but it sees only packets sent to or from the Routing Engine, such as routing protocol packets, pings to the device and management sessions. Transit packets forwarded by the PFE do not appear.
user@router> monitor traffic interface ge-0/0/0 no-resolve
The no-resolve option stops the device from trying to resolve addresses to names, which keeps the output fast and clean. Press Ctrl+C to stop the capture.
Watching log files live
monitor start messages prints each new entry of the messages log file as it arrives, which is useful while you bring up a link or a neighbor. It keeps running in the background while you type other commands.
user@router> monitor start messages
user@router> monitor stop
A worked example
Users report that a branch link is slow. The engineer runs show interfaces terse and sees ge-0/0/1 up. Next, monitor interface ge-0/0/1 shows the input rate close to the link speed and the error counters rising.
To see whether OSPF hellos still arrive, the engineer runs monitor traffic interface ge-0/0/1 no-resolve and sees the hellos. The routing is fine; the problem is congestion and errors on the link itself.
How the exam asks about this
- "Which command shows live statistics for one interface?" →
monitor interface ge-0/0/0. - "Which command shows log entries as they are written?" →
monitor start messages. - "Why does
monitor trafficnot show traffic passing through the router?" → It captures only traffic to and from the Routing Engine.
Common mistakes
Confusing monitor interface and monitor traffic interface. The first shows live counters for all traffic on an interface. The second captures packets, but only host traffic to and from the RE.
Running operational commands at the # prompt without run. In configuration mode, show shows the configuration. Type run show interfaces terse to see operational state from there.
Forgetting to stop log monitoring. monitor start keeps printing until you enter monitor stop, and the output can interrupt your typing.
What to remember for the exam
showgives a snapshot;monitorgives a live view.show interfaceslevels:terse,brief, default,detail,extensive.monitor interface= live counters;monitor traffic interface= capture of RE traffic only.monitor start messagesfollows a log file;monitor stopends it.- Use
runto execute an operational command from configuration mode.
When a question asks how to watch a problem "in real time", look for an answer that starts with monitor. When it asks for full error counters, look for show interfaces extensive.
Check yourself
Which
show interfaceslevel gives one line per interface?terse, which lists Admin and Link status, protocol family and addresses for each interface.Will
monitor traffic interface ge-0/0/0show transit packets passing through the router?No, it captures only packets sent to or from the Routing Engine.
How do you stop the live display started with
monitor start messages?Enter
monitor stop.
Topic 1 of 4 in Operational Monitoring and Maintenance
Test yourself on Operational Monitoring and Maintenance
The full Juniper JNCIA-Junos JN0-106 question bank has 1,155 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Juniper. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.