how to redirect serial console to telnet session?
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
Signature · 4 lines
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: [email protected]
Quoted 3 lines · Chris Friesen
Accordingly, I grabbed what looked like the important bits of xconsole, but it appears that this only gets me stuff written to
/dev/consolefrom 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.
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
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).
Signature · 1 line
~Randy
Quoted 8 lines · Russell King
Quoted 3 lines · Chris Friesen
Accordingly, I grabbed what looked like the important bits of xconsole, but it appears that this only gets me stuff written to
/dev/consolefrom 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
Signature · 4 lines
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: [email protected]
Quoted 1 line · Chris Friesen
I found some patches by Ingo Molnar, but they look like kernel mods.
That's the one.
Quoted 2 lines
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.
Quoted 3 lines
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/ttyS0onto 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.
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
Quoted 10 lines · Chris Friesen
Quoted 8 lines · Russell King
Quoted 4 lines · Chris Friesen
Accordingly, I grabbed what looked like the important bits of xconsole, but it appears that this only gets me stuff written to
/dev/consolefrom 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.
Quoted 6 lines
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/ttyS0onto 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