]> git.ipfire.org Git - thirdparty/util-linux.git/blob - sys-utils/dmesg.1
Merge branch 'mkfs' of git://github.com/kerolasa/lelux-utiliteetit
[thirdparty/util-linux.git] / sys-utils / dmesg.1
1 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
2 .\" May be distributed under the GNU General Public License
3 .TH DMESG 1 "Jun 2011"
4 .SH NAME
5 dmesg \- print or control the kernel ring buffer
6 .SH SYNOPSIS
7 .B dmesg
8 .RB [ options ]
9 .sp
10 .B dmesg \-\-clear
11 .sp
12 .B dmesg \-\-read-clear
13 .RB [ options ]
14 .sp
15 .B dmesg \-\-console-level
16 .I level
17 .sp
18 .B dmesg \-\-console-on
19 .sp
20 .B dmesg \-\-console-off
21 .SH DESCRIPTION
22 .B dmesg
23 is used to examine or control the kernel ring buffer.
24
25 The default action is to read all messages from kernel ring buffer.
26
27 .SH OPTIONS
28 The --clear, --read-clear, --console-on, --console-off and --console-level
29 options are mutually exclusive.
30
31 .IP "\fB\-C, \-\-clear\fP"
32 Clear the ring buffer.
33 .IP "\fB\-c, \-\-read-clear\fP"
34 Clear the ring buffer contents after printing.
35 .IP "\fB\-d, \-\-console-off\fP"
36 Disable printing messages to the console.
37 .IP "\fB\-e, \-\-console-on\fP"
38 Enable printing messages to the console.
39 .IP "\fB\-h, \-\-help\fP"
40 Print a help text and exit.
41 .IP "\fB\-n, \-\-console-level \fIlevel\fP
42 Set the
43 .I level
44 at which logging of messages is done to the console. The
45 .I level
46 is a level number or abbreviation of the level name. For all supported levels see
47 .B dmesg \-\-help
48 output.
49 .sp
50 For example,
51 .B \-n 1
52 or
53 .B \-n alert
54 prevents all messages, except emergency (panic) messages, from appearing on the
55 console. All levels of messages are still written to
56 .IR /proc/kmsg ,
57 so
58 .BR syslogd (8)
59 can still be used to control exactly where kernel messages appear. When
60 the
61 .B \-n
62 option is used,
63 .B dmesg
64 will
65 .I not
66 print or clear the kernel ring buffer.
67 .IP "\fB\-r, \-\-raw\fP"
68 Print the raw message buffer, i.e., don't strip the log level prefixes.
69 .IP "\fB\-s, \-\-buffer-size \fIsize\fP
70 Use a buffer of
71 .I size
72 to query the kernel ring buffer. This is 16392 by default.
73 (The default kernel syslog buffer size was 4096
74 at first, 8192 since 1.3.54, 16384 since 2.1.113.)
75 If you have set the kernel buffer to be larger than the default
76 then this option can be used to view the entire buffer.
77 .IP "\fB\-V, \-\-version\fP"
78 Output version information and exit.
79 .SH SEE ALSO
80 .BR syslogd (8)
81 .\" .SH AUTHOR
82 .\" Theodore Ts'o (tytso@athena.mit.edu)
83 .SH AVAILABILITY
84 The dmesg command is part of the util-linux package and is available from
85 ftp://ftp.kernel.org/pub/linux/utils/util-linux/.