dmesg (1) Linux Manual Page
NAME
dmesg – print or control the kernel ring buffer
SYNOPSIS
dmesg [options]
dmesg –clear
dmesg –read-clear [options]
dmesg –console-level level
dmesg –console-on
dmesg –console-off
DESCRIPTION
dmesg is used to examine or control the kernel ring buffer.
The default action is to display all messages from the kernel ring buffer.
OPTIONS
The –clear, –read-clear, –console-on, –console-off, and –console-level options are mutually exclusive.
-C, –clear
- Clear the ring buffer.
-c, –read-clear
- Clear the ring buffer after first printing its contents.
-D, –console-off
- Disable the printing of messages to the console.
-d, –show-delta
- Display the timestamp and the time delta spent between messages. If used together with
–notimethen only the time delta without the timestamp is printed.
-E, –console-on
- Enable printing messages to the console.
-e, –reltime
- Display the local time and the delta in human-readable format. Be aware that conversion to the local time could be inaccurate (see
-Tfor more details).
-F, –file file
- Read the syslog messages from the given file. Note that
-Fdoes not support messages in kmsg format. The old syslog format is supported only.
-f, –facility list
- Restrict output to the given (comma-separated) list of facilities. For example:
dmesg –facility=daemonwill print messages from system daemons only. For all supported facilities see the
–helpoutput.
-H, –human
- Enable human-readable output. See also
–color,–reltimeand–nopager.
-k, –kernel
- Print kernel messages.
-L, –color[=when]
- Colorize the output. The optional argument when can be
auto,neveroralways. If the when argument is omitted, it defaults toauto. The colors can be disabled; for the current built-in default see the–helpoutput. See also theCOLORSsection below.
-l, –level list
- Restrict output to the given (comma-separated) list of levels. For example:
dmesg –level=err,warnwill print error and warning messages only. For all supported levels see the
–helpoutput.
-n, –console-level level
- Set the level at which printing of messages is done to the console. The level is a level number or abbreviation of the level name. For all supported levels see the
–helpoutput.For example,
-n 1or-n emergprevents all messages, except emergency (panic) messages, from appearing on the console. All levels of messages are still written to /proc/kmsg, sosyslogd(8) can still be used to control exactly where kernel messages appear. When the-noption is used,dmesgwill not print or clear the kernel ring buffer.
–noescape
- The unprintable and potentially unsafe characters (e.g., broken multi-byte sequences, terminal controlling chars, etc.) are escaped in format
