Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!twwells!bill From: bill@twwells.com (T. William Wells) Newsgroups: comp.unix.i386 Subject: Re: Logging console messages to a printer. Message-ID: <1990Jan5.110404.27170@twwells.com> Date: 5 Jan 90 11:04:04 GMT References: <1016@rsiatl.UUCP> <399@zok.UUCP> <1052@rsiatl.UUCP> Organization: None, Ft. Lauderdale, FL Lines: 38 In article <1052@rsiatl.UUCP> jgd@rsiatl.UUCP (John G. De Armond) writes: : I should not have neglected to mention in my first post that I had figured : out how to use /dev/osm for kernal messages. What I'm wanting to do is more : general. I want to send everything that currently goes to /dev/console : to a logging printer just as if /dev/console were a KSR terminal. At the : same time, I'd like to STOP the printing of messages to the real /dev/console. : I guess one solution WOULD be to just hang a KSR terminal (Decwriter, anyone?) : on a port and re-mknod /dev/console to that port. I was hoping there is an : undocumented (of course), but elegant way of solving this problem. I'm : working on an inelegant solution (the one true unix way) but I'd hoped : for more. How about: (setup) mv /dev/console /dev/realcons mknod /dev/console p chmod 622 /dev/console (to actually use this:) dd bs=1 if=/dev/console of=/dev/lp >/dev/null 2>&1 & Why dd? Because cp buffers its I/O. Of course, you could put anything on the other end of the pipe. Oh yes, if I read the manual correctly, you have to have something holding /dev/console open for write or the dd will get EOF. You might make the last command dd bs=1 if=/dev/console of=/dev/lp >/dev/null 2>&1 3>/dev/console & instead. --- Bill { uunet | novavax | ankh | sunvice } !twwells!bill bill@twwells.com