Re: [Balloon] Redirect console to ssh pty

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Patrick Doyle
Date:  
To: Jonathan McDowell
CC: balloon
Subject: Re: [Balloon] Redirect console to ssh pty
On Tue, Sep 13, 2011 at 11:53 AM, Jonathan McDowell <> wrote:
> On Tue, Sep 13, 2011 at 10:37:04AM -0400, Patrick Doyle wrote:
>> OK, I'm stumped...
>>
>> I would like to redirect the console output (specifically printk
>> messages) away from ttyS2 (over which I'm running ppp) and onto the
>> pty associated with my ssh login.
>>
>> Is this possible?  If so, how would I do it?  Everything I've seen in
>> the kernel documentation is related to switching consoles between VTs
>> on a PC and the frame buffer.  This is a little different.
>
> Not quite what you asked for, but you might want to investigate
> netconsole, which will output kernel console output over the network.

Hi Jonathan,
Thank you for your reply....

Basically, I'm trying to spend some time now in order that I might be
lazy later :-)

Right now, I do:

# insmod mymodule.ko; dmesg | tail; # look at printk messages
# rmmod mymodule
(go fix mymodule and try again)

I would like to do

# setconsole mypty
(once, when I log in)

(repeatedly, as I debug my module)
# insmod mymodule.ko
(see printk messages spewing back at me -- I happen to be logged in via ssh)
# rmmod mymodule
(go fix mymodule and try again)

Look at all of those pesky "dmesg | tail" I don't have to type anymore.

As I said, I'm just trying to be lazy here, and thought I recalled an
ioctl for redirecting the console (such as is done with a Konsole
window in KDE, and I've read is done with screen as well).

I figured I couldn't be the first person to be that lazy, but I guess
I'm asking the wrong group :-)

--wpd