Re: Buffering for serial consoles (was re: Quota exceeded...)

David Monro (
Sun, 26 Jan 1997 23:39:08 +1100 (EST)

> On Sat, 25 Jan 1997, David S. Miller wrote:
> > The main problem with the console logs was that the console was over
> > serial line at 9600 baud to an old vt220 (common in mass machine room
> > configurations), so this is extremely touchy to verbose console
> > messages.

Actually we use large numbers of wyse50s from the days before everyone got
xterminals :-)
> The solution on recent Sequent SMP systems was to add a daemon that takes
> the equivalent of the printk()'s and buffers them. That way the console
> (which is *always* a vt220 with a max baud of 19200) doesn't hold back
> the kernel. You get an extra process with it's own thread of execution
> doing the buffering.
Yes, but - you loose one of the advantages of having the kernel talk direct to
the device, which is that the kernel messages get out to the console when the
machine panics or whatever. With a daemon, the messages probably never make it
to the screen in this case, which is of course when you need it most. In fact
my first reaction to a machine that reboots mysteriously at night would be to
hang a serial interface printer off it, which is going to be _very_ slow, but I
would want it to catch every message and to hell with performance problems.

Even having a separate kernel thread to handle the console IO may be a bad idea
if the scheduler has gone away - pretty much the only solution is to busy-wait
on each character...
> Could an existing daemon (syslogd?) be modified to do this buffering?
In syslog.conf
*.* /dev/console maybe?

Actually we can probably already do this. Have a look at the -c flag to klogd -
we can simply restrict the kernel to print only really important messages
direct to the console, and use syslogd to feed the lower priority ones to the
console indirectly. This should solve your problem I believe.

> Erik Walthinsen - Programmer, webmaster, 3D artist, etc. __
> __ / /\
> / \ Work: (503)578-5314 / / \
> | | M E G A Home: (503)281-4281 / / /\ \
> _\ /_ Majoring in CS / / /\ \ \
> / /_/__\ \ \
> Omega Station: /________\ \ \
> Info on Linux, Graphics, Descent, Laptops, etc. \___________\/