On 2014-12-07 14:03, Marco Pfatschbacher wrote: > Hi, > > something that has often bothered me, is that once you hook up a > console to a headless server, you've missed all the output. > This makes it harder to diagnose bugs in rc(8) startup skripts > from remote. Another thing i've missed is that fsck(8) output > will just scroll by and is usually lost. > > Why not dump the initial output from /dev/console into > a share of the system message buffer and make it readable > via dmesg -c? > > Things like the fixed 16k size and bumping the message buffer > on various platforms need still to be discussed, but how's the > idea in general? > > Index: sbin/dmesg/dmesg.8 > =================================================================== > RCS file: /cvs/src/sbin/dmesg/dmesg.8,v > retrieving revision 1.14 > diff -u -p -p -u -r1.14 dmesg.8 > --- sbin/dmesg/dmesg.8 14 Aug 2013 06:32:35 -0000 1.14 > +++ sbin/dmesg/dmesg.8 7 Dec 2014 12:47:40 -0000 > @@ -38,6 +38,7 @@ > .Nd display the system message buffer > .Sh SYNOPSIS > .Nm dmesg > +.Op Fl c > .Op Fl M Ar core > .Op Fl N Ar system > .Sh DESCRIPTION > @@ -57,6 +58,11 @@ Extract the name list from the specified > .Ar system > instead of the default > .Pa /bsd . > +.It Fl c > +Display the contents of the console message buffer instead. > +This can be used to review > +.Xr rc 8 > +system startup messages.
Hm, perhaps -c is not the best choice FreeBSD: Clear the kernel buffer after printing. SuSE: Clear the ring buffer contents after printing. RHEL: Clear the ring buffer contents after printing. NetBSD: - not used On FreeBSD there is a param '-a' for this. -a Show all data in the message buffer. This includes any syslog records and /dev/console output. -- olli