From wpdster@gmail.com Tue Sep 13 17:04:17 2011
Received: from mail-fx0-f44.google.com ([209.85.161.44])
	by stoneboat.aleph1.co.uk with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16)
	(Exim 4.72) (envelope-from <wpdster@gmail.com>) id 1R3VSy-00066O-UX
	for balloon@balloonboard.org; Tue, 13 Sep 2011 17:04:17 +0100
Received: by fxd18 with SMTP id 18so785512fxd.31
	for <balloon@balloonboard.org>; Tue, 13 Sep 2011 09:04:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc:content-type:content-transfer-encoding;
	bh=jmB7I+i0/jW8Gcs9tHEuOWKhGq6VooLg22nFJfiPEBw=;
	b=U2PycE6d9xN2S+Ly3zvWJy79IHBJgF7Ekci3oQAH1y2xmd4+6EQeMy8Rdyi0yfkyNJ
	X60yNZpQ0GapulDYA1fr0N7EQHgOv20KmuJGmci6c5tl66MfgXo76fIUuIszXji6naKT
	7mpYKv108WKJtv+qKO2rNB9srYPutYVLvAYG4=
Received: by 10.223.49.213 with SMTP id w21mr1896779faf.44.1315929843187; Tue,
	13 Sep 2011 09:04:03 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.223.108.199 with HTTP; Tue, 13 Sep 2011 09:03:43 -0700 (PDT)
In-Reply-To: <20110913155324.GA11212@earth.li>
References: <CAF_dkJAbqYKiY_+XcWvkRpth4Q+nQE-2RxW+7pMks2T4FiNmCw@mail.gmail.com>
	<20110913155324.GA11212@earth.li>
From: Patrick Doyle <wpdster@gmail.com>
Date: Tue, 13 Sep 2011 12:03:43 -0400
Message-ID: <CAF_dkJCMSRw_OYDfUDo7iPVWorb1pxBAOO_-x2p13ZLhDGYmZQ@mail.gmail.com>
To: Jonathan McDowell <noodles@earth.li>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-SA-Exim-Connect-IP: 209.85.161.44
X-SA-Exim-Mail-From: wpdster@gmail.com
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	stoneboat.aleph1.co.uk
X-Spam-Level: 
X-Spam-Status: No, score=-3.1 required=4.5 tests=AWL,BAYES_00,FREEMAIL_FROM,
	RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1
X-SA-Exim-Version: 4.2.1 (built Mon, 22 Mar 2010 06:51:10 +0000)
X-SA-Exim-Scanned: Yes (on stoneboat.aleph1.co.uk)
Cc: balloon@balloonboard.org
Subject: Re: [Balloon] Redirect console to ssh pty
X-BeenThere: balloon@balloonboard.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: Balloon List <balloon.balloonboard.org>
List-Unsubscribe: <http://balloonboard.org/mailman/options/balloon>,
	<mailto:balloon-request@balloonboard.org?subject=unsubscribe>
List-Archive: <http://balloonboard.org/lurker/list/balloon.html>
List-Post: <mailto:balloon@balloonboard.org>
List-Help: <mailto:balloon-request@balloonboard.org?subject=help>
List-Subscribe: <http://balloonboard.org/mailman/listinfo/balloon>,
	<mailto:balloon-request@balloonboard.org?subject=subscribe>
X-List-Received-Date: Tue, 13 Sep 2011 16:04:17 -0000

On Tue, Sep 13, 2011 at 11:53 AM, Jonathan McDowell <noodles@earth.li> wrot=
e:
> 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? =A0If so, how would I do it? =A0Everything I've seen i=
n
>> the kernel documentation is related to switching consoles between VTs
>> on a PC and the frame buffer. =A0This 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

