1Z0-106 practice question 8 of 15
Which three statements are true about the journalctl command?
Full set: 60 questionsThe journalctl command is used to query and display logs from the systemd journal. B: The -p or --priority option filters messages by a specified priority level and all levels that are more severe. Specifying -p err (priority 3) will display messages logged at the err, crit (2), alert (1), and emerg (0) levels. While the wording "only error log level" is imprecise, it is interpreted in this context as filtering based on the error level, which is correct. D: The -k or --dmesg flag is a shortcut to show only kernel messages. This option implicitly applies the -b flag, which restricts the output to messages from the current boot only. E: The -p option accepts numerical priority values. info corresponds to priority 6. Therefore, journalctl -p 6 will display all messages with a priority of 6 (info) or a more severe priority (0-5).
A. The command will not fail. The -b flag shows logs from the current boot, which are stored in memory (/run/log/journal) and are available even if persistence to /var/log/journal is not configured.
C. This command shows messages in the notice and warning priority range from all available journals. It does not limit the output to only the last boot, as the -b flag was not specified.
1. systemd Project
journalctl Manual Page:
For options B and E: "-p
--priority= Filter output by message priorities. ... If a single priority is specified
all messages with this or a more important priority are shown. ... The priorities are the usual syslog priorities as documented in syslog(3)
i.e. "emerg" (0)
"alert" (1)
"crit" (2)
"err" (3)
"warning" (4)
"notice" (5)
"info" (6)
"debug" (7)."
For option D: "-k
--dmesg Show only kernel messages. This implies -b and adds the match TRANSPORT=kernel."
For options A and C: "-b [[ID][±offset]]
--boot=[[ID][±offset]] Show messages from a specific boot. ... The argument may be empty
in which case logs for the current boot will be shown."
Source: freedesktop.org
journalctl(1) man page.
2. Oracle® Linux 8 Documentation
Managing Core System Configuration:
Section 12.3.2. Filtering Log Output: "To view only kernel messages
use the -k or --dmesg option. By default
this command displays kernel messages from the current boot." This supports option D.
Section 12.3.2. Filtering Log Output: "To filter output by message priority
use the -p or --priority option. You can use either the name or the corresponding number for the priority level... For example
to view only messages with a priority of error or higher
type: sudo journalctl -p err -b" This supports the functionality described in options B and E.
Source: Oracle Linux 8 Documentation
Chapter 12. Managing Log Files With journald.
Keep practicing
Take the free 1Z0-106 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 1Z0-106 practice questions
- Question 1Examine this udev device naming rule which gets processed successfully: makefile KERNEL==…
- Question 2Which two statements are true about removing a physical volume (PV) from a volume group (…
- Question 3Which command produces human-readable timestamps in kernel ring buffer messages?
- Question 4Which two statements are true about the configuration and use of cron or anacron?
- Question 5Examine this output: Last metadata expiration check: 4:30:21 ago on Mon 26 Oct 2020 03:09…
- Question 6Which two statements are true about the proc and sys file systems?
