System Management
An administrator needs to see only the kernel ring buffer messages logged at the error and warning levels. Which command does this?
Show the answer
Correct answerA. dmesg --level=err,warn
AWhy this is right: --level filters the ring buffer output to the listed levels, here err and warn.
BWhy not this: --facility filters by source, such as kern or daemon; err and warn are levels, not facilities.
CWhy not this: -n sets the level of messages printed to the console; it does not filter the output.
DWhy not this: -p err shows err and the more severe levels, so warnings are left out.
The --level option filters the kernel ring buffer by log level, so only err and warn messages are shown. The ring buffer is not modified; the filter only changes what is displayed.