All of lore.kernel.org
 help / color / mirror / Atom feed
* how to redirect serial console to telnet session?
@ 2002-05-10 13:05 Chris Friesen
  2002-05-10 15:09 ` Russell King
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Friesen @ 2002-05-10 13:05 UTC (permalink / raw)
  To: linux-kernel


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
Nepean, ON K2H 8E9 Canada        | email: cfriesen@nortelnetworks.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to redirect serial console to telnet session?
  2002-05-10 15:09 ` Russell King
@ 2002-05-10 14:32   ` Chris Friesen
  2002-05-10 15:29     ` Russell King
  2002-05-11 14:26     ` Denis Vlasenko
  2002-05-10 15:18   ` Randy.Dunlap
  1 sibling, 2 replies; 6+ messages in thread
From: Chris Friesen @ 2002-05-10 14:32 UTC (permalink / raw)
  To: Russell King; +Cc: linux-kernel

Russell King wrote:
> 
> On Fri, May 10, 2002 at 09:05:41AM -0400, Chris Friesen wrote:
> > 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
Nepean, ON K2H 8E9 Canada        | email: cfriesen@nortelnetworks.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to redirect serial console to telnet session?
  2002-05-10 13:05 how to redirect serial console to telnet session? Chris Friesen
@ 2002-05-10 15:09 ` Russell King
  2002-05-10 14:32   ` Chris Friesen
  2002-05-10 15:18   ` Randy.Dunlap
  0 siblings, 2 replies; 6+ messages in thread
From: Russell King @ 2002-05-10 15:09 UTC (permalink / raw)
  To: Chris Friesen; +Cc: linux-kernel

On Fri, May 10, 2002 at 09:05:41AM -0400, Chris Friesen wrote:
> 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.

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to redirect serial console to telnet session?
  2002-05-10 15:09 ` Russell King
  2002-05-10 14:32   ` Chris Friesen
@ 2002-05-10 15:18   ` Randy.Dunlap
  1 sibling, 0 replies; 6+ messages in thread
From: Randy.Dunlap @ 2002-05-10 15:18 UTC (permalink / raw)
  To: Russell King; +Cc: Chris Friesen, linux-kernel

On Fri, 10 May 2002, Russell King wrote:

| On Fri, May 10, 2002 at 09:05:41AM -0400, Chris Friesen wrote:
| > 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to redirect serial console to telnet session?
  2002-05-10 14:32   ` Chris Friesen
@ 2002-05-10 15:29     ` Russell King
  2002-05-11 14:26     ` Denis Vlasenko
  1 sibling, 0 replies; 6+ messages in thread
From: Russell King @ 2002-05-10 15:29 UTC (permalink / raw)
  To: Chris Friesen; +Cc: linux-kernel

On Fri, May 10, 2002 at 10:32:10AM -0400, Chris Friesen wrote:
> I found some patches by Ingo Molnar, but they look like kernel mods.

That's the one.

> 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.

> 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.

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to redirect serial console to telnet session?
  2002-05-10 14:32   ` Chris Friesen
  2002-05-10 15:29     ` Russell King
@ 2002-05-11 14:26     ` Denis Vlasenko
  1 sibling, 0 replies; 6+ messages in thread
From: Denis Vlasenko @ 2002-05-11 14:26 UTC (permalink / raw)
  To: Chris Friesen, Russell King; +Cc: linux-kernel

On 10 May 2002 12:32, Chris Friesen wrote:
> Russell King wrote:
> > On Fri, May 10, 2002 at 09:05:41AM -0400, Chris Friesen wrote:
> > > 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-05-11  9:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-10 13:05 how to redirect serial console to telnet session? Chris Friesen
2002-05-10 15:09 ` Russell King
2002-05-10 14:32   ` Chris Friesen
2002-05-10 15:29     ` Russell King
2002-05-11 14:26     ` Denis Vlasenko
2002-05-10 15:18   ` Randy.Dunlap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.