CentOS Stream 9
Sponsored Link

Commands Help

Command :   Back to index

dmesg : print or control the kernel ring buffer
[SYNOPSIS] dmesg OPTION
OPTION
-C Clear the ring buffer.
-c Clear the ring buffer after first printing its contents.
-D Disable the printing of messages to the console.
-d Display the timestamp and the time delta spent between messages. If used together with --notime then only the time delta without the timestamp is printed.
-E Enable printing messages to the console.
-e Display the local time and the delta in human-readable format. Be aware that conversion to the local time could be inaccurate (see -T for more details).
-F FILE Read the syslog messages from the given FILE. Note that -F does not support messages in kmsg format. See -K instead.
-f LIST Restrict output to the given (comma-separated) LIST of facilities.
-H Enable human-readable output. See also --color, --reltime and --nopager.
-J Use JSON output format. The time output format is in "sec.usec" format only, log priority level is not decoded by default (use --decode to split into facility and priority), the other options to control the output format or time format are silently ignored.
-K FILE Read the /dev/kmsg messages from the given FILE. Different record as expected to be separated by a NULL byte.
-k Print kernel messages.
-L Colorize the output. The optional argument when can be auto, never or always. If the when argument is omitted, it defaults to auto. The colors can be disabled; for the current built-in default see the --help output. See also the COLORS section below.
-l LIST Restrict output to the given (comma-separated) LIST of levels.
-n LEVEL Set the LEVEL at which printing of messages is done to the console.
-P Do not pipe output into a pager. A pager is enabled by default for --human output.
-p Add facility, level or timestamp information to each line of a multi-line message.
-r Print the raw message buffer, i.e., do not strip the log-level prefixes, but all unprintable characters are still escaped (see also --noescape).
-S Force dmesg to use the syslog(2) kernel interface to readkernel messages. The default is to use /dev/kmsg rather than syslog(2) since kernel 3.5.0.
-s SIZE Use a buffer of SIZE to query the kernel ring buffer. This is 16392 by default. (The default kernel syslog buffer size was 4096 at first, 8192 since 1.3.54, 16384 since 2.1.113.)
-T Print human-readable timestamps.
--since TIME Display record since the specified TIME. Supported is the subsecond granularity.
--until TIME Display record until the specified TIME. Supported is the subsecond granularity.
-t Do not print kernel’s timestamps.
-u Print userspace messages.
-w Wait for new messages. This feature is supported only on systems with a readable /dev/kmsg (since kernel 3.5.0).
-W Wait and print only new messages.
-x Decode facility and level (priority) numbers to human-readable prefixes.
-h Display help text and exit.
-V Print version and exit.

Matched Content