Question 350
The action Run logger -t appcheck 'message' or use an equivalent syslog API. was applied for this goal: A script should emit a tagged diagnostic entry through the system's logging facility rather than merely printing to stdout. Which observation provides the most direct acceptance evidence?
- The output contains warnings, errors and more severe messages while excluding info messages.
- The tagged entry appears in the applicable journal or syslog destination after execution.
- journalctl --disk-usage stays within expected limits after journal rotation/maintenance.
- The collector receives forwarded test messages using the expected TCP connection.
Explanation
Correct Answer
B:The tagged entry appears in the applicable journal or syslog destination after execution. This checks the effect of Run logger -t appcheck 'message' or use an equivalent syslog API. against the stated operational goal.
Incorrect Answers
A:That observation checks An incident responder needs journal records at warning severity or higher but not informational noise. In this scenario it does not demonstrate Run logger -t appcheck 'message' or use an equivalent syslog API.; the relevant evidence must establish The tagged entry appears in the applicable journal or syslog destination after execution.
C:That observation checks A host must limit the space that persistent systemd journal files can occupy. In this scenario it does not demonstrate Run logger -t appcheck 'message' or use an equivalent syslog API.; the relevant evidence must establish The tagged entry appears in the applicable journal or syslog destination after execution.
D:That observation checks A syslog administrator must send local rsyslog messages to a central collector over TCP rather than UDP. In this scenario it does not demonstrate Run logger -t appcheck 'message' or use an equivalent syslog API.; the relevant evidence must establish The tagged entry appears in the applicable journal or syslog destination after execution.
Question 351
A team is validating its implementation of this requirement: A script should emit a tagged diagnostic entry through the system's logging facility rather than merely printing to stdout. Which observed mistake most specifically identifies that the intended system logging behavior has NOT been met?
- The admin uses single-at forwarding and the collector listens only for TCP messages.
- The administrator only truncates the active log and loses retention or breaks file handling.
- The script uses echo, so no message reaches the configured log collector.
- The operator greps for the word error and misses critical messages with other text.
Explanation
Correct Answer
C:The script uses echo, so no message reaches the configured log collector. This shows the requested behavior is absent, so the deployment needs the correction: Use logger with an appropriate tag/priority and validate the configured routing.
Incorrect Answers
A:That symptom concerns A syslog administrator must send local rsyslog messages to a central collector over TCP rather than UDP. This concerns a separate requirement, not the one being tested. The relevant failure is The script uses echo, so no message reaches the configured log collector. The current requirement calls for a different check.
B:That symptom concerns A web server's large log file needs periodic rotation, compression and retention. This concerns a separate requirement, not the one being tested. The relevant failure is The script uses echo, so no message reaches the configured log collector. The current requirement calls for a different check.
D:That symptom concerns An incident responder needs journal records at warning severity or higher but not informational noise. This concerns a separate requirement, not the one being tested. The relevant failure is The script uses echo, so no message reaches the configured log collector. The current requirement calls for a different check.
Question 352
During validation, this problem was found: The script uses echo, so no message reaches the configured log collector. The original goal was: A script should emit a tagged diagnostic entry through the system's logging facility rather than merely printing to stdout. Which targeted correction best resolves it?
- Use --since and an optional --until to express the intended period.
- Set journald's own storage limit and verify the daemon picks up the setting.
- Install and test a logrotate rule with any daemon reload signal needed.
- Use logger with an appropriate tag/priority and validate the configured routing.
Explanation
Correct Answer
D:Use logger with an appropriate tag/priority and validate the configured routing. It directly addresses the observed symptom: The script uses echo, so no message reaches the configured log collector. The relevant mechanism is logger submits entries to the system logging infrastructure, where tags and priorities can be routed or filtered.
Incorrect Answers
A:This fix is aimed at The admin uses -n 50, which returns a fixed count rather than the requested time interval. and would be relevant if An admin must inspect log activity only since yesterday at 18:00. The incident instead states The script uses echo, so no message reaches the configured log collector. and needs Use logger with an appropriate tag/priority and validate the configured routing.
B:This fix is aimed at A journald setting is placed in /etc/logrotate.conf, so the journal quota does not change. and would be relevant if A host must limit the space that persistent systemd journal files can occupy. The incident instead states The script uses echo, so no message reaches the configured log collector. and needs Use logger with an appropriate tag/priority and validate the configured routing.
C:This fix is aimed at The administrator only truncates the active log and loses retention or breaks file handling. and would be relevant if A web server's large log file needs periodic rotation, compression and retention. The incident instead states The script uses echo, so no message reaches the configured log collector. and needs Use logger with an appropriate tag/priority and validate the configured routing.
Question 353
A Linux administrator faces this requirement: A web server's large log file needs periodic rotation, compression and retention. Which specific action is the best direct solution?
- Add a suitable logrotate policy under /etc/logrotate.d/ and test its configuration.
- Run journalctl -u service-name with the exact systemd unit name.
- Run journalctl --since 'yesterday 18:00' with appropriate local-time interpretation.
- Use journalctl -p warning (or an equivalent explicit priority range).
Explanation
Correct Answer
A:Add a suitable logrotate policy under /etc/logrotate.d/ and test its configuration. The mechanism is: logrotate applies per-log size/time rules, rotates files and can compress retained copies.
Incorrect Answers
B:Run journalctl -u service-name with the exact systemd unit name. That operation is designed for the different case: A service fails at startup and the admin needs only its systemd journal messages. It does not perform the specific action required here: Add a suitable logrotate policy under /etc/logrotate.d/ and test its configuration.
C:Run journalctl --since 'yesterday 18:00' with appropriate local-time interpretation. That operation is designed for the different case: An admin must inspect log activity only since yesterday at 18:00. It does not perform the specific action required here: Add a suitable logrotate policy under /etc/logrotate.d/ and test its configuration.
D:Use journalctl -p warning (or an equivalent explicit priority range). That operation is designed for the different case: An incident responder needs journal records at warning severity or higher but not informational noise. It does not perform the specific action required here: Add a suitable logrotate policy under /etc/logrotate.d/ and test its configuration.
Question 354
The engineer proposes this implementation: Add a suitable logrotate policy under /etc/logrotate.d/ and test its configuration. The requirement is: A web server's large log file needs periodic rotation, compression and retention. Which technical explanation best supports the proposed action?
- Traditional rsyslog shorthand @@ denotes TCP while @ denotes UDP; selection matters for transport semantics.
- logrotate applies per-log size/time rules, rotates files and can compress retained copies.
- The -u filter selects records linked to a unit rather than dumping all journal activity.
- logger submits entries to the system logging infrastructure, where tags and priorities can be routed or filtered.
Explanation
Correct Answer
B:logrotate applies per-log size/time rules, rotates files and can compress retained copies. It specifically supports the proposed action of Add a suitable logrotate policy under /etc/logrotate.d/ and test its configuration. for the requirement described.
Incorrect Answers
A:This explains another Linux operation, namely Configure an rsyslog forwarding action using the supported TCP transport, such as *.* @@loghost:514., where Traditional rsyslog shorthand @@ denotes TCP while @ denotes UDP; selection matters for transport semantics. It does not explain why Add a suitable logrotate policy under /etc/logrotate.d/ and test its configuration. satisfies the stated condition.
C:This explains another Linux operation, namely Run journalctl -u service-name with the exact systemd unit name., where The -u filter selects records linked to a unit rather than dumping all journal activity. It does not explain why Add a suitable logrotate policy under /etc/logrotate.d/ and test its configuration. satisfies the stated condition.
D:This explains another Linux operation, namely Run logger -t appcheck 'message' or use an equivalent syslog API., where logger submits entries to the system logging infrastructure, where tags and priorities can be routed or filtered. It does not explain why Add a suitable logrotate policy under /etc/logrotate.d/ and test its configuration. satisfies the stated condition.
Question 355
The action Add a suitable logrotate policy under /etc/logrotate.d/ and test its configuration. was applied for this goal: A web server's large log file needs periodic rotation, compression and retention. Which observation provides the most direct acceptance evidence?
- The recovered entries appear without changing the live host's journal configuration.
- The output contains warnings, errors and more severe messages while excluding info messages.
- A forced test rotates the intended log and maintains the configured number of archives.
- The resulting output includes the target service errors and excludes unrelated services.
Explanation
Correct Answer
C:A forced test rotates the intended log and maintains the configured number of archives. This checks the effect of Add a suitable logrotate policy under /etc/logrotate.d/ and test its configuration. against the stated operational goal.
Incorrect Answers
A:That observation checks A responder has an offline copy of a host's journal directory and wants to inspect it without booting that host. In this scenario it does not demonstrate Add a suitable logrotate policy under /etc/logrotate.d/ and test its configuration.; the relevant evidence must establish A forced test rotates the intended log and maintains the configured number of archives.
B:That observation checks An incident responder needs journal records at warning severity or higher but not informational noise. In this scenario it does not demonstrate Add a suitable logrotate policy under /etc/logrotate.d/ and test its configuration.; the relevant evidence must establish A forced test rotates the intended log and maintains the configured number of archives.
D:That observation checks A service fails at startup and the admin needs only its systemd journal messages. In this scenario it does not demonstrate Add a suitable logrotate policy under /etc/logrotate.d/ and test its configuration.; the relevant evidence must establish A forced test rotates the intended log and maintains the configured number of archives.
Question 356
A team is validating its implementation of this requirement: A web server's large log file needs periodic rotation, compression and retention. Which observed mistake most specifically identifies that the intended system logging behavior has NOT been met?
- The responder runs journalctl with no path and sees only the investigation machine's logs.
- The admin uses -n 50, which returns a fixed count rather than the requested time interval.
- The script uses echo, so no message reaches the configured log collector.
- The administrator only truncates the active log and loses retention or breaks file handling.
Explanation
Correct Answer
D:The administrator only truncates the active log and loses retention or breaks file handling. This shows the requested behavior is absent, so the deployment needs the correction: Install and test a logrotate rule with any daemon reload signal needed.
Incorrect Answers
A:That symptom concerns A responder has an offline copy of a host's journal directory and wants to inspect it without booting that host. This concerns a separate requirement, not the one being tested. The relevant failure is The administrator only truncates the active log and loses retention or breaks file handling. The current requirement calls for a different check.
B:That symptom concerns An admin must inspect log activity only since yesterday at 18:00. This concerns a separate requirement, not the one being tested. The relevant failure is The administrator only truncates the active log and loses retention or breaks file handling. The current requirement calls for a different check.
C:That symptom concerns A script should emit a tagged diagnostic entry through the system's logging facility rather than merely printing to stdout. This concerns a separate requirement, not the one being tested. The relevant failure is The administrator only truncates the active log and loses retention or breaks file handling. The current requirement calls for a different check.
Question 357
During validation, this problem was found: The administrator only truncates the active log and loses retention or breaks file handling. The original goal was: A web server's large log file needs periodic rotation, compression and retention. Which targeted correction best resolves it?
- Install and test a logrotate rule with any daemon reload signal needed.
- Use --since and an optional --until to express the intended period.
- Use logger with an appropriate tag/priority and validate the configured routing.
- Filter journal entries by the failing systemd unit.
Explanation
Correct Answer
A:Install and test a logrotate rule with any daemon reload signal needed. It directly addresses the observed symptom: The administrator only truncates the active log and loses retention or breaks file handling. The relevant mechanism is logrotate applies per-log size/time rules, rotates files and can compress retained copies.
Incorrect Answers
B:This fix is aimed at The admin uses -n 50, which returns a fixed count rather than the requested time interval. and would be relevant if An admin must inspect log activity only since yesterday at 18:00. The incident instead states The administrator only truncates the active log and loses retention or breaks file handling. and needs Install and test a logrotate rule with any daemon reload signal needed.
C:This fix is aimed at The script uses echo, so no message reaches the configured log collector. and would be relevant if A script should emit a tagged diagnostic entry through the system's logging facility rather than merely printing to stdout. The incident instead states The administrator only truncates the active log and loses retention or breaks file handling. and needs Install and test a logrotate rule with any daemon reload signal needed.
D:This fix is aimed at A full journal dump hides the failure among unrelated application messages. and would be relevant if A service fails at startup and the admin needs only its systemd journal messages. The incident instead states The administrator only truncates the active log and loses retention or breaks file handling. and needs Install and test a logrotate rule with any daemon reload signal needed.
Question 358
A Linux administrator faces this requirement: A host must limit the space that persistent systemd journal files can occupy. Which specific action is the best direct solution?
- Run journalctl -u service-name with the exact systemd unit name.
- Set SystemMaxUse in the active journald.conf storage configuration.
- Run logger -t appcheck 'message' or use an equivalent syslog API.
- Enable persistent journal storage through Storage=persistent and a suitable /var/log/journal configuration.
Explanation
Correct Answer
B:Set SystemMaxUse in the active journald.conf storage configuration. The mechanism is: journald quota settings bound disk usage for persistent journals rather than relying on application logrotate.
Incorrect Answers
A:Run journalctl -u service-name with the exact systemd unit name. That operation is designed for the different case: A service fails at startup and the admin needs only its systemd journal messages. It does not perform the specific action required here: Set SystemMaxUse in the active journald.conf storage configuration.
C:Run logger -t appcheck 'message' or use an equivalent syslog API. That operation is designed for the different case: A script should emit a tagged diagnostic entry through the system's logging facility rather than merely printing to stdout. It does not perform the specific action required here: Set SystemMaxUse in the active journald.conf storage configuration.
D:Enable persistent journal storage through Storage=persistent and a suitable /var/log/journal configuration. That operation is designed for the different case: A host loses systemd journal records across a reboot because storage is volatile. It does not perform the specific action required here: Set SystemMaxUse in the active journald.conf storage configuration.
Question 359
The engineer proposes this implementation: Set SystemMaxUse in the active journald.conf storage configuration. The requirement is: A host must limit the space that persistent systemd journal files can occupy. Which technical explanation best supports the proposed action?
- journalctl can read a specified journal directory rather than only the current host's default store.
- Persistent journald storage retains records on disk, while volatile storage under /run is lost at reboot.
- journald quota settings bound disk usage for persistent journals rather than relying on application logrotate.
- --since sets the beginning of the query time window without altering event timestamps.
Explanation
Correct Answer
C:journald quota settings bound disk usage for persistent journals rather than relying on application logrotate. It specifically supports the proposed action of Set SystemMaxUse in the active journald.conf storage configuration. for the requirement described.
Incorrect Answers
A:This explains another Linux operation, namely Use journalctl --directory=/mnt/recovered-journal with an appropriate exported journal directory., where journalctl can read a specified journal directory rather than only the current host's default store. It does not explain why Set SystemMaxUse in the active journald.conf storage configuration. satisfies the stated condition.
B:This explains another Linux operation, namely Enable persistent journal storage through Storage=persistent and a suitable /var/log/journal configuration., where Persistent journald storage retains records on disk, while volatile storage under /run is lost at reboot. It does not explain why Set SystemMaxUse in the active journald.conf storage configuration. satisfies the stated condition.
D:This explains another Linux operation, namely Run journalctl --since 'yesterday 18:00' with appropriate local-time interpretation., where --since sets the beginning of the query time window without altering event timestamps. It does not explain why Set SystemMaxUse in the active journald.conf storage configuration. satisfies the stated condition.
Question 360
The action Set SystemMaxUse in the active journald.conf storage configuration. was applied for this goal: A host must limit the space that persistent systemd journal files can occupy. Which observation provides the most direct acceptance evidence?
- The recovered entries appear without changing the live host's journal configuration.
- The output starts at the chosen boundary and excludes earlier events.
- journalctl --disk-usage reports reduced use while recent required records remain accessible.
- journalctl --disk-usage stays within expected limits after journal rotation/maintenance.
Explanation
Correct Answer
D:journalctl --disk-usage stays within expected limits after journal rotation/maintenance. This checks the effect of Set SystemMaxUse in the active journald.conf storage configuration. against the stated operational goal.
Incorrect Answers
A:That observation checks A responder has an offline copy of a host's journal directory and wants to inspect it without booting that host. In this scenario it does not demonstrate Set SystemMaxUse in the active journald.conf storage configuration.; the relevant evidence must establish journalctl --disk-usage stays within expected limits after journal rotation/maintenance.
B:That observation checks An admin must inspect log activity only since yesterday at 18:00. In this scenario it does not demonstrate Set SystemMaxUse in the active journald.conf storage configuration.; the relevant evidence must establish journalctl --disk-usage stays within expected limits after journal rotation/maintenance.
C:That observation checks A systemd journal fills its configured disk quota and old archived journal data should be pruned. In this scenario it does not demonstrate Set SystemMaxUse in the active journald.conf storage configuration.; the relevant evidence must establish journalctl --disk-usage stays within expected limits after journal rotation/maintenance.
LPI Level 1 (102-500) Practice Tests