Upload Tizen:Base source
[framework/base/util-linux-ng.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
4 .SH NAME
5 dmesg \- print or control the kernel ring buffer
6 .SH SYNOPSIS
7 .B dmesg
8 .RB [ \-c ]
9 .RB [ \-r ]
10 .RB [ \-n
11 .IR level ]
12 .RB [ \-s
13 .IR bufsize ]
14 .SH DESCRIPTION
15 .B dmesg
16 is used to examine or control the kernel ring buffer.
17
18 The program helps users to print out their bootup messages.  Instead of
19 copying the messages by hand, the user need only:
20 .RS
21 dmesg > boot.messages
22 .RE
23 and mail the
24 .I boot.messages
25 file to whoever can debug their problem.
26 .SH OPTIONS
27 .TP
28 .B \-c
29 Clear the ring buffer contents after printing.
30 .TP
31 .B \-r
32 Print the raw message buffer, i.e., don't strip the log level prefixes.
33 .TP
34 .BI \-s " bufsize"
35 Use a buffer of size
36 .I bufsize
37 to query the kernel ring buffer.  This is 16392 by default.
38 (The default kernel syslog buffer size was 4096
39 at first, 8192 since 1.3.54, 16384 since 2.1.113.)
40 If you have set the kernel buffer to be larger than the default
41 then this option can be used to view the entire buffer.
42 .TP
43 .BI \-n " level"
44 Set the
45 .I level
46 at which logging of messages is done to the console.  For example,
47 .B \-n 1
48 prevents all messages, expect panic messages, from appearing on the
49 console.  All levels of messages are still written to
50 .IR /proc/kmsg ,
51 so
52 .BR syslogd (8)
53 can still be used to control exactly where kernel messages appear.  When
54 the
55 .B \-n
56 option is used,
57 .B dmesg
58 will
59 .I not
60 print or clear the kernel ring buffer.
61
62 When both options are used, only the last option on the command line will
63 have an effect.
64 .SH SEE ALSO
65 .BR syslogd (8)
66 .\" .SH AUTHOR
67 .\" Theodore Ts'o (tytso@athena.mit.edu)
68 .SH AVAILABILITY
69 The dmesg command is part of the util-linux-ng package and is available from
70 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.