Courseiva
Operational Monitoring and MaintenanceeasyMultiple ChoiceObjective-mapped

JN0-106 Operational Monitoring and Maintenance Practice Question

A technician needs to view the last 50 log messages from the system log file. Which command accomplishes this?

⚠ Common exam trap

Test-takers frequently confuse the 'show log' command with 'show system syslog' or 'show system log messages', misremembering the exact syntax for viewing log file contents versus configuration.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

show log messages | last 50

The 'show log messages | last 50' command displays the last 50 lines from the /var/log/messages file on a Junos device. The pipe to 'last' is a Junos CLI filter that outputs only the final N lines of the command output, which is exactly what is needed to view the most recent log entries.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • show system log messages

    Why it's wrong here

    show system log messages is not a valid Junos CLI command. The operational mode does not include a 'log' subcommand under 'show system'; instead, 'show log' is used to view the contents of log files, with the filename appended, such as 'show log messages'. The 'show system' hierarchy contains system status commands like 'show system uptime' or 'show system alarms', not log file access.

  • monitor start messages

    Why it's wrong here

    monitor start messages does not display historical log entries; it begins a real-time streaming session that prints new messages as they are written to the log file. Since it starts from the current end of the file, it will not show the previous 50 messages that already exist in the log. This command is best for live observation, not for reviewing past events, and it requires Ctrl+C to stop the continuous output.

  • show system syslog

    Why it's wrong here

    show system syslog shows the syslog configuration, including which log files are defined, which facilities and severity levels are being logged, and where messages are being sent (local files or remote hosts). It does not display the actual content of log messages; it is a configuration command used to verify logging settings. To inspect the actual log entries, you must use an operational command like 'show log messages' or 'show log <custom-file>'.

  • show log messages | last 50

    Why this is correct

    show log messages | last 50 is the correct operational command to view the most recent 50 entries from the default /var/log/messages file. The pipe to 'last' is a Junos CLI filter that displays only the final 50 lines of the output, similar to 'tail -50' in a Unix shell. This is both efficient and reliable because it avoids printing the entire log and directly shows the newest events.

About these practice questions

This JN0-106 question is part of Courseiva's 156-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This JN0-106 practice question is part of Courseiva's free Juniper Networks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the JN0-106 exam.