Re: dmesg(8) incomplete?

2015-03-12 Thread Theo de Raadt
 Hi,
 I am a pretty new user so please forgive any uninformed statements.
 
 I just spent a few hours trying to figure out why my dmesg displays an
 old kernel (May 5th), when I just compiled a new one (for recent -stable
 patches). I've looked pretty much everywhere and retraced every step
 until finally giving up and starting to compose a mail to get help.
 Then, when pasting my dmesg output into the mail I realized that there
 were multiple system messages from multiple startups in the dmesg output,
 and that everything was fine with my system.
 Now, except for a few threads from 200[367], even now that I know what
 I'm looking for I don't see this behaviour documented anywhere. Since
 there is no other record of this behaviour my knowldge is probably
 incomplete but attached is a patch - I borrowed some wordings from a mail
 from Theo[1] - that adds this information to the dmesg manpage.

Or perhaps more succinctly?

Index: dmesg.8
===
RCS file: /cvs/src/sbin/dmesg/dmesg.8,v
retrieving revision 1.15
diff -u -p -u -r1.15 dmesg.8
--- dmesg.8 13 Jan 2015 10:07:58 -  1.15
+++ dmesg.8 13 Mar 2015 03:37:45 -
@@ -45,6 +45,8 @@
 .Nm
 displays the contents of the system message buffer.
 It is most commonly used to review system startup messages.
+On some systems the message buffer can survive reboot and be
+retained (in the hope of exposing information from a crash).
 .Pp
 The options are as follows:
 .Bl -tag -width Ds



dmesg(8) incomplete?

2015-03-12 Thread Thomas Schmidt
Hi,
I am a pretty new user so please forgive any uninformed statements.

I just spent a few hours trying to figure out why my dmesg displays an
old kernel (May 5th), when I just compiled a new one (for recent -stable
patches). I've looked pretty much everywhere and retraced every step
until finally giving up and starting to compose a mail to get help.
Then, when pasting my dmesg output into the mail I realized that there
were multiple system messages from multiple startups in the dmesg output,
and that everything was fine with my system.
Now, except for a few threads from 200[367], even now that I know what
I'm looking for I don't see this behaviour documented anywhere. Since
there is no other record of this behaviour my knowldge is probably
incomplete but attached is a patch - I borrowed some wordings from a mail
from Theo[1] - that adds this information to the dmesg manpage.

Best Regards,
Thomas

[1] http://marc.info/?l=openbsd-miscm=115272548814461w=2


Index: src/sbin/dmesg/dmesg.8
===
RCS file: /cvs/src/sbin/dmesg/dmesg.8,v
retrieving revision 1.15
diff -u -p -u -r1.15 dmesg.8
--- src/sbin/dmesg/dmesg.8  13 Jan 2015 10:07:58 -  1.15
+++ src/sbin/dmesg/dmesg.8  13 Mar 2015 03:14:45 -
@@ -45,6 +45,11 @@
 .Nm
 displays the contents of the system message buffer.
 It is most commonly used to review system startup messages.
+If the kernel finds that the
+.Nm
+buffer in the kernel address space is still intact after reboot, it does
+not clear it, but appends to it, resulting in the output of messages from
+multiple startups. This is so that crash-related data will be retained.
 .Pp
 The options are as follows:
 .Bl -tag -width Ds