Subject: Re: kernel printfs - can I redirect?
To: None <donlee_ppc@icompute.com,port-macppc@netbsd.org>
From: Ben Harris <bjh21@netbsd.org>
List: port-macppc
Date: 12/20/2000 11:48:07
[ Forgot to cc the list the first time.  Oops. ]

In article <v03130300b665ed15e034@[209.46.51.197]> you write:
>I'm getting wild and crazy...
>
>I'm trying to debug the serial ports - specifically the Cyclades 8Y card.
>
>I built me a kernel with some printf's in it, and they're coming
>out on the console, which is OK, but inconvenient, /dev/ttyE0 being
>slow, and hard to capture.
>
>I could use the serial boot console, and Zterm, but...
>
>Are there any easy ways to capture or redirect the output of kernel printfs,
>preferrably without using the serial ports?  I'd like to simply redirect them
>to a file, or another device, if I could.  Can I redirect them to,
>say, /dev/ttyp1?

I believe that console printfs all end up in the kernel message buffer, and
hence should get logged by syslogd, and be extractable using dmesg.  Is this
good enough for you?

Otherwise, you could look up TIOCCONS in tty(4), which redirects console
messages to a specified tty, which should be able to be ttyp1.

-- 
Ben Harris                                                   <bjh21@netbsd.org>
Portmaster, NetBSD/arm26               <URL:http://www.netbsd.org/Ports/arm26/>