xref: /netbsd-src/sbin/dmesg/dmesg.8 (revision 7008793d771ac77ec53f84d651495e9bccefa559)
1*7008793dSkre.\"	$NetBSD: dmesg.8,v 1.26 2018/10/30 19:40:36 kre Exp $
20114e805Scgd.\"
37b442030Scgd.\" Copyright (c) 1980, 1991, 1993
47b442030Scgd.\"	The Regents of the University of California.  All rights reserved.
561f28255Scgd.\"
661f28255Scgd.\" Redistribution and use in source and binary forms, with or without
761f28255Scgd.\" modification, are permitted provided that the following conditions
861f28255Scgd.\" are met:
961f28255Scgd.\" 1. Redistributions of source code must retain the above copyright
1061f28255Scgd.\"    notice, this list of conditions and the following disclaimer.
1161f28255Scgd.\" 2. Redistributions in binary form must reproduce the above copyright
1261f28255Scgd.\"    notice, this list of conditions and the following disclaimer in the
1361f28255Scgd.\"    documentation and/or other materials provided with the distribution.
14bf07c871Sagc.\" 3. Neither the name of the University nor the names of its contributors
1561f28255Scgd.\"    may be used to endorse or promote products derived from this software
1661f28255Scgd.\"    without specific prior written permission.
1761f28255Scgd.\"
1861f28255Scgd.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1961f28255Scgd.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2061f28255Scgd.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2161f28255Scgd.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2261f28255Scgd.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2361f28255Scgd.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2461f28255Scgd.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2561f28255Scgd.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2661f28255Scgd.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2761f28255Scgd.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2861f28255Scgd.\" SUCH DAMAGE.
2961f28255Scgd.\"
307b442030Scgd.\"     @(#)dmesg.8	8.1 (Berkeley) 6/5/93
31346aa5ddScgd.\"
32*7008793dSkre.Dd October 30, 2018
3361f28255Scgd.Dt DMESG 8
3473f545bbSwiz.Os
3561f28255Scgd.Sh NAME
3661f28255Scgd.Nm dmesg
37a10e00a1Swiz.Nd display the system message buffer
3861f28255Scgd.Sh SYNOPSIS
395f4e3656Slukem.Nm
40a10e00a1Swiz.Op Fl dTt
4161f28255Scgd.Op Fl M Ar core
4261f28255Scgd.Op Fl N Ar system
4361f28255Scgd.Sh DESCRIPTION
445f4e3656Slukem.Nm
4561f28255Scgddisplays the contents of the system message buffer.
4661f28255Scgd.Pp
4761f28255ScgdThe options are as follows:
4861f28255Scgd.Bl -tag -width Ds
492fef76cbSchristos.It Fl d
502b71f00cSkreShow the timestamp deltas.
512fef76cbSchristosUsed together with
522fef76cbSchristos.Fl t
532fef76cbSchristosonly the deltas are shown.
5461f28255Scgd.It Fl M
5561f28255ScgdExtract values associated with the name list from the specified core
566a2c1671Ssimonbinstead of the default ``/dev/mem''.
5761f28255Scgd.It Fl N
5861f28255ScgdExtract the name list from the specified system instead of the default
591d1682d6Sjtc``/netbsd''.
602fef76cbSchristos.It Fl T
619f61665bSchristosFormat uptime timestamps in a human readable form (using
629f61665bSchristos.Xr ctime 3 )
639f61665bSchristosusing output suitable for the local locale as set in the environment.
64604e240dSwizRepeating this option prints the uptime in ISO 8601 duration form,
659f61665bSchristosgiving the duration since boot, in hours, minutes, and seconds (to
669f61665bSchristosmillisecond resolution).
679f61665bSchristosA third occurrence causes the duration to always be represented
689f61665bSchristosto millisecond precision, even where that means trailing zeroes
699f61665bSchristosappear.
70db02d1fbSchristos.It Fl t
712fef76cbSchristosQuiet printing, don't print timestamps.
723d735d0fSmycroft.El
736e27a7b0Sbriggs.Pp
746e27a7b0SbriggsThe system message buffer is a circular buffer of a fixed size.
756e27a7b0SbriggsIf the buffer has been filled, the first line of the
766e27a7b0Sbriggs.Nm
776e27a7b0Sbriggsoutput may not be complete.
786e27a7b0SbriggsThe size of the message buffer is configurable at compile-time on
796e27a7b0Sbriggsmost systems with the
80f9ab138fSwiz.Dv MSGBUFSIZE
816e27a7b0Sbriggskernel option.
826e27a7b0SbriggsLook for
83f9ab138fSwiz.Dv MSGBUFSIZE
846e27a7b0Sbriggsin
856e27a7b0Sbriggs.Xr options 4
866e27a7b0Sbriggsfor details.
8749de827fSabs.Sh FILES
8849de827fSabs.Bl -tag -width /var/run/dmesg.boot -compact
8949de827fSabs.It Pa /var/run/dmesg.boot
9049de827fSabscopy of dmesg at the time of last boot.
9149de827fSabs.El
9261f28255Scgd.Sh SEE ALSO
93f9ab138fSwiz.Xr options 4 ,
9461f28255Scgd.Xr syslogd 8
9561f28255Scgd.Sh HISTORY
9661f28255ScgdThe
9761f28255Scgd.Nm
9861f28255Scgdcommand appeared in
997f58cf58Ssevan.Bx 3.0 .
1009f61665bSchristos.Sh BUGS
101*7008793dSkreThe
102*7008793dSkre.Fl T
103*7008793dSkreoption will report nonsense when displaying lines from
104*7008793dSkrethe message buffer that were not added by the current
105*7008793dSkrerunning kernel.
106*7008793dSkre.Pp
1079f61665bSchristosWhen
1089f61665bSchristos.Fl TT
1099f61665bSchristosis used, the duration is always given with maximum units of hours,
110ff30845eSkreeven when the number of hours is in the hundreds, thousands, or more.
1119f61665bSchristosThis is because converting hours to days, over periods when
1129f61665bSchristos.Dq time skips
1139f61665bSchristosoccur, such as summer time beginning or ending, is not trivial.
1149f61665bSchristosA duration of 26 hours might be 1D3H or 1D1H at such events,
1159f61665bSchristosrather than the usual 1D2H,
1169f61665bSchristosand when a time zone alters its offset,
1179f61665bSchristoseven more complex calculations are needed.
1189f61665bSchristosNone of those calculations are done
1199f61665bSchristos.Pq even to account for sub-hour time zone shifts ,
1209f61665bSchristosthe duration indicated is always calculated by simple division of
1219f61665bSchristosseconds by 60 to produce minutes, and again to produce hours.
1229f61665bSchristosMost of the time\ [!] this is correct.
123