dmesg
print or control the kernel ring buffer
- Provided by: util-linux (Version: 2.20.1-5.1ubuntu20.9)
- Report a bug
print or control the kernel ring buffer
dmesg [options]
dmesg --clear
dmesg --read-clear [options]
dmesg --console-level level
dmesg --console-on
dmesg --console-off
dmesg is used to examine or control the kernel ring buffer.
The default action is to read all messages from kernel ring buffer.
The --clear, --read-clear, --console-on, --console-off and --console-level options are mutually exclusive.
dmesg --facility=daemon
will print messages from system daemons only. For all supported facilities see dmesg --help output.
dmesg --level=err,warn
will print error and warning messages only. For all supported levels see dmesg --help output.
For example, -n 1 or -n alert prevents all messages, except emergency (panic) messages, from appearing on the console. All levels of messages are still written to /proc/kmsg, so syslogd(8) can still be used to control exactly where kernel messages appear. When the -n option is used, dmesg will not print or clear the kernel ring buffer.
The time source used for the logs is not updated after system SUSPEND/RESUME.
Karel Zak <kzak@redhat.com> Theodore Ts'o <tytso@athena.mit.edu>
The dmesg command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.