From: devzero@web.de
To: linux-kernel@vger.kernel.org
Cc: jengelh@linux01.gwdg.de
Subject: Re: serial console _after_ boot ? - was: Redirect kernel console
Date: Thu, 03 Jan 2008 13:43:33 +0100 [thread overview]
Message-ID: <83531397@web.de> (raw)
hi !
i was wondering how to make kernel messages appear on /dev/ttyS0 without a reboot, i.e. kernelparam "console=ttyS0"
after playing for a while with setconsole, setterm and klogconsole i didn`t find a way to make that happen.
i can do "setconsole /dev/tty1 </dev/console" and then "echo test >/dev/console" and see "test" on tty1
"setterm -msg on -msglevel 8 >/dev/console" (or >/dev/tty1), modprobe loop;rmmod loop - and i see the kernel message there
i can do "setconsole /dev/ttyS0 </dev/console" and then "echo test >/dev/console" and see "test" on ttyS0
BUT :
"setterm -msg on -msglevel 8 >/dev/console" (or >/dev/ttyS0), modprobe loop;rmmod loop ...... nothing!
since i came across jan`s posting from 2005, which didn`t get a reply i think it`s not that stupid to ask again...
any clue how to do that at runtime or what`s the issue here ? (see excerpts below)
i can set
regards
roland
List: linux-kernel
Subject: Redirect kernel console
From: Jan Engelhardt <jengelh () linux01 ! gwdg ! de>
Date: 2005-08-13 12:48:22
Message-ID: Pine.LNX.4.61.0508131447220.4457 () yvahk01 ! tjqt ! qr
[Download message RAW]
Hi,
there is a klogconsole utiltity that allows to change the console to which
kernel messages are printed. However, is it possible to redirect to ttyS0
without a reboot?
Jan Engelhardt
-------
>> Subject: Re: serial console _after_ boot ?
>> > Setterm outputs the correct escape sequences to stdout. You can
>> > configure another tty using 'setterm -msglevel 8 -msg on > /dev/ttyS0'.
>> > I tested this on the standard kernel consoles (/dev/tty1-9), and it
>> > worked. You obviously need root access to write the escape sequences to
>> > the tty's.
>>
>> oh - yes, this works! but with tty1-9 only.
>> not with ttyS0 :(
>
>.....as the docs tell.....
>
> Some options however (marked "virtual consoles only" below) do not correspond to a terminfo(5) capability.
>
> -msg [on|off] (virtual consoles only)
> Enables or disables the sending of kernel printk() messages to the console.
>
> -msglevel 1-8 (virtual consoles only)
> Sets the console logging level for kernel printk() messages. All messages strictly more important than this
> will be printed, so a logging level of 0 has the same effect as -msg on and a logging level of 8 will print
> all kernel messages. klogd(8) may be a more convenient interface to the logging of kernel messages.
> > > but i don`t have change_console.
> > > searched the net and found that this eventually should be part of sysvinit package.
> > > but mine doesn`t provide that tool.
> > >
> > > found "setconsole" which looks like something similar, but "setconsole /dev/ttyS0 < /dev/console"
> > > doesn`t have any effect
> >
> > What distribution do you use? I have change_console on gentoo, yet I
> > cannot find the tool on a debian etch. But that's a vserver, so it's
> > probably not a reference.
>
> i have opensuse 10.3
_____________________________________________________________________
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071&distributionid=000000000066
next reply other threads:[~2008-01-03 12:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-03 12:43 devzero [this message]
2008-01-03 13:27 ` serial console _after_ boot ? - was: Redirect kernel console Jan Engelhardt
2008-01-03 17:55 ` Miquel van Smoorenburg
-- strict thread matches above, loose matches on Subject: below --
2008-01-03 14:39 devzero
2008-01-03 15:04 ` Jan Engelhardt
2008-01-03 16:02 devzero
2008-01-03 20:29 devzero
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83531397@web.de \
--to=devzero@web.de \
--cc=jengelh@linux01.gwdg.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox