Display err, crit, alert, and emerg entries from the journal.
Which command is appropriate?
journalctl -p err selects priority 0 through 3, from emerg through err.
Detailed explanation
journalctl -p errCorrect. -p err selects err and all more severe priorities.
Correct. -p err selects err and all more severe priorities.
journalctl -u errIncorrect. -u would interpret err as a unit name.
Incorrect. -u would interpret err as a unit name.
journalctl -b errIncorrect. -b is a boot filter.
Incorrect. -b is a boot filter.
journalctl -t errIncorrect. -t filters an identifier.
Incorrect. -t filters an identifier.
Try it yourself
An example you can run in a temporary verification environment.
journalctl --help 2>&1 | grep -E -- '--priority| -p' | head -n 1Expected result
-pまたは--priorityのhelp行Key points
- -p means priority
- err covers 0-3
- Lower number is more severe
Notes
- Environment: journalctl helpの読取のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.