Which command reads error logs from the previous boot to diagnose boot failures?

Prepare for the Google Data Center Technician Exam. Use our interactive quiz featuring flashcards and multiple choice questions with hints and explanations. Get exam-ready today!

Multiple Choice

Which command reads error logs from the previous boot to diagnose boot failures?

Explanation:
When diagnosing boot failures, you want the logs from the last attempt to boot and focus on the errors that occurred during that startup. In systemd environments, the journal can be queried by boot number and by message severity. The command that shows only error messages from the previous boot is journalctl -b -1 -p err. Here, -b -1 selects the previous boot, and -p err filters the log to only error-level messages (and more severe). This combination surfaces the exact failures from the boot you’re investigating, making it easier to pinpoint what went wrong. The other options don’t fit as well because they don’t target the previous boot or filter for errors. Viewing current boot messages (-b -0) or pulling info-level logs isn’t focused on the failure that happened during the last startup. Using dmesg shows the kernel ring buffer for the current session and is often cleared after a reboot, so it may not contain the relevant previous boot events. systemctl status reports unit status rather than the detailed boot-time logs.

When diagnosing boot failures, you want the logs from the last attempt to boot and focus on the errors that occurred during that startup. In systemd environments, the journal can be queried by boot number and by message severity. The command that shows only error messages from the previous boot is journalctl -b -1 -p err. Here, -b -1 selects the previous boot, and -p err filters the log to only error-level messages (and more severe). This combination surfaces the exact failures from the boot you’re investigating, making it easier to pinpoint what went wrong.

The other options don’t fit as well because they don’t target the previous boot or filter for errors. Viewing current boot messages (-b -0) or pulling info-level logs isn’t focused on the failure that happened during the last startup. Using dmesg shows the kernel ring buffer for the current session and is often cleared after a reboot, so it may not contain the relevant previous boot events. systemctl status reports unit status rather than the detailed boot-time logs.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy