[plug] Back again - redirecting console output to file

Craig Ringer craig at postnewspapers.com.au
Wed Apr 2 14:26:41 WST 2003


> I have a system where the automounter keeps leaving processes in D
> state, and want to provide some debug output for developers using
> alt-sysrq-t.
> 
> I want to be able to dump the console output to file. Im sure there is
> an easy way to do this, I just don't knowit.

I don't know about easy... on the occasions where I need to do this sort 
of thing I use a null-modem cable to connect the serial port of the 
problem machine to my laptop's serial port and talk to the macinine 
using minicom while logging. You can set it to dump kernel panics, 
kernel boot messages, etc to serial by booting with 
"console=/dev/ttyS0". If you also want messages to go to normal console, 
do "console=/dev/tty1 console=/dev/ttyS0". If you want /bin/login 
listening on the serial port, just set up a getty (mgetty is good) in 
inittab for the purpose.

Of course, this is probably a bit of overkill if the machine isn't 
actually going down hard. I use this to try to figure out why a machine 
dies hard under X, for example. Is the output captured in /var/log 
anywhere, say messages, syslog, kernel, etc?

> NB: Apologies for the following...

<snip>

Oh, that's a big one too. Corporate mail server, eh? I begin to suspect 
that "disclaimers" + spam will soon be about 80% of email traffic, with 
the real stuff drowned out in the noise. People complaining and ranting 
about disclaimers and spam will probably take up another 10% ;-)

I'm always very tempted to send a typed letter to the CIO or CEO of 
companies that do that. About 1/2 a page of letter explaining why I'm 
writing, then 2 1/2 pages of gibberish disclaimer. Printed copy of email 
from their company attached. My point: if a company doesn't feel the 
need to do it for a printed letter, why do it for email? Its just nonsense.

Of course, you know that - alas, it seems your network admin doesn't.




More information about the plug mailing list