how to redirect serial console to telnet session?

how to redirect serial console to telnet session?

Post by Chris Friese » Sat, 11 May 2002 23:00:12



I have an embedded box with serial console.  I have a debug version of a driver
that wants to dump so much stuff to console that the poor serial can't keep up
and I can't run other commands.

I would like to redirect the stream of stuff going to the console to a telnet
session over ethernet.

Accordingly, I grabbed what looked like the important bits of xconsole, but it
appears that this only gets me stuff written to /dev/console from userspace.
How do I go about getting the output of kernel-level printk()s as well?

Thanks,

Chris

--
Chris Friesen                    | MailStop: 043/33/F10  
Nortel Networks                  | work: (613) 765-0557
3500 Carling Avenue              | fax:  (613) 765-2986

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

how to redirect serial console to telnet session?

Post by Russell Kin » Sun, 12 May 2002 00:20:06



> Accordingly, I grabbed what looked like the important bits of xconsole, but it
> appears that this only gets me stuff written to /dev/console from userspace.
> How do I go about getting the output of kernel-level printk()s as well?

Check the LKML archives for something called 'netconsole' (or use google).
It got mentioned here about 6 months to a year ago.

--

             http://www.arm.linux.org.uk/personal/aboutme.html

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

how to redirect serial console to telnet session?

Post by Randy.Dunla » Sun, 12 May 2002 00:30:07



| > Accordingly, I grabbed what looked like the important bits of xconsole, but it
| > appears that this only gets me stuff written to /dev/console from userspace.
| > How do I go about getting the output of kernel-level printk()s as well?
|
| Check the LKML archives for something called 'netconsole' (or use google).
| It got mentioned here about 6 months to a year ago.

It's in http://people.redhat.com/mingo/netconsole-patches/ (for 2.4.10).

--
~Randy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

how to redirect serial console to telnet session?

Post by Chris Friese » Sun, 12 May 2002 00:30:19




> > Accordingly, I grabbed what looked like the important bits of xconsole, but it
> > appears that this only gets me stuff written to /dev/console from userspace.
> > How do I go about getting the output of kernel-level printk()s as well?

> Check the LKML archives for something called 'netconsole' (or use google).
> It got mentioned here about 6 months to a year ago.

I found some patches by Ingo Molnar, but they look like kernel mods.

What I'm really looking for is a way to redirect this from userspace in a stock
kernel.  I want the serial console as normal, but then for just debugging this
one thing I want to telnet in over ethernet and basically redirect /dev/ttyS0
onto my telnet session.

Is this possible?

Chris

--
Chris Friesen                    | MailStop: 043/33/F10  
Nortel Networks                  | work: (613) 765-0557
3500 Carling Avenue              | fax:  (613) 765-2986

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

how to redirect serial console to telnet session?

Post by Russell Kin » Sun, 12 May 2002 00:40:07



> I found some patches by Ingo Molnar, but they look like kernel mods.

That's the one.

Quote:> What I'm really looking for is a way to redirect this from userspace in
> a stock kernel.

There isn't anything in the stock kernel that will let you do this
without some form of patches being applied.

Quote:> I want the serial console as normal, but then for just debugging this
> one thing I want to telnet in over ethernet and basically redirect /dev/ttyS0
> onto my telnet session.

telnet (and its associated protocol) is a completely different beast to
serial consoles - in fact any network connection is.

If you really want to get at the kernel message data, there's dmesg
or a simple cat /proc/kmsg.  The problem with these is, when the kernel
crashes, you won't get the last messages.  Also, if you're generating
more than 16K of messages before allowing the kernel to continue (and
thus user space) you're also going to loose messages.

--

             http://www.arm.linux.org.uk/personal/aboutme.html

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

how to redirect serial console to telnet session?

Post by Denis Vlasenk » Sun, 12 May 2002 18:30:10





> > > Accordingly, I grabbed what looked like the important bits of xconsole,
> > > but it appears that this only gets me stuff written to /dev/console
> > > from userspace. How do I go about getting the output of kernel-level
> > > printk()s as well?

> > Check the LKML archives for something called 'netconsole' (or use
> > google). It got mentioned here about 6 months to a year ago.

> I found some patches by Ingo Molnar, but they look like kernel mods.

> What I'm really looking for is a way to redirect this from userspace in a
> stock kernel.  I want the serial console as normal, but then for just
> debugging this one thing I want to telnet in over ethernet and basically
> redirect /dev/ttyS0 onto my telnet session.

I did not do it myself (no need yet), but isn't this scriptable?

If you telnet into box which receives serial console data on /dev/ttyS0,
what 'cat /dev/ttyS0' would show in your telnet window?
--
vda
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/