2003-03-03 07:03:57

by Prasad

[permalink] [raw]
Subject: redirecting printk to the Serial port


Hi,
Got a silly doubt. when trying to insert one of my modules into
the kernel, its getting rebooted and unfortunately i am losing all the
debug(printk) messages. Can i in some fashion capture all the printk's
through the serial port. (I have two linux boxes and a serial cable to
connect both of them)

Thanx in advance
Prasad.

--
Failure is not an option


2003-03-03 07:11:10

by Martin J. Bligh

[permalink] [raw]
Subject: Re: redirecting printk to the Serial port

> Got a silly doubt. when trying to insert one of my modules into
> the kernel, its getting rebooted and unfortunately i am losing all the
> debug(printk) messages. Can i in some fashion capture all the printk's
> through the serial port. (I have two linux boxes and a serial cable to
> connect both of them)

See Documentation/serial-console.txt

M.

2003-03-03 07:16:36

by Prasad

[permalink] [raw]
Subject: Re: redirecting printk to the Serial port



I have seen the Documentation/serial-console.txt and accordingly gave the
kernel arguments console=/dev/ttyS0,9600n8, but even after giving that i
am not getting anything to the other end. To check if the serial
communication was in place... i tried echo "abc" > /dev/ttyS0 and that
worked.

Prasad.

On Sun, 2 Mar 2003, Martin J. Bligh wrote:

> > Got a silly doubt. when trying to insert one of my modules into
> > the kernel, its getting rebooted and unfortunately i am losing all the
> > debug(printk) messages. Can i in some fashion capture all the printk's
> > through the serial port. (I have two linux boxes and a serial cable to
> > connect both of them)
>
> See Documentation/serial-console.txt
>
> M.
>

--
Failure is not an option

2003-03-03 07:22:18

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: redirecting printk to the Serial port

On Mon, 3 Mar 2003, Prasad wrote:

>
>
> I have seen the Documentation/serial-console.txt and accordingly gave the
> kernel arguments console=/dev/ttyS0,9600n8, but even after giving that i
> am not getting anything to the other end. To check if the serial
> communication was in place... i tried echo "abc" > /dev/ttyS0 and that
> worked.

console=ttyS0,38400n8 console=tty1

That works on my boxes.

Zwane
--
function.linuxpower.ca

2003-03-03 07:20:09

by Prasad

[permalink] [raw]
Subject: Re: redirecting printk to the Serial port



thankx... i got the mistake... instead of giving the argument as
console=ttyS0, i used console=/dev/ttyS0.... thank you very much

Prasad.

On Sun, 2 Mar 2003, Martin J. Bligh wrote:

> > Got a silly doubt. when trying to insert one of my modules into
> > the kernel, its getting rebooted and unfortunately i am losing all the
> > debug(printk) messages. Can i in some fashion capture all the printk's
> > through the serial port. (I have two linux boxes and a serial cable to
> > connect both of them)
>
> See Documentation/serial-console.txt
>
> M.
>

--
Failure is not an option

2003-03-03 07:21:13

by Martin J. Bligh

[permalink] [raw]
Subject: Re: redirecting printk to the Serial port



--On Monday, March 03, 2003 12:58:24 +0530 Prasad <[email protected]> wrote:

>
>
> I have seen the Documentation/serial-console.txt and accordingly gave the
> kernel arguments console=/dev/ttyS0,9600n8, but even after giving that i
> am not getting anything to the other end. To check if the serial
> communication was in place... i tried echo "abc" > /dev/ttyS0 and that
> worked.

I use "console=ttyS0,57600n8" - no "/dev".

M.

2003-03-03 07:29:06

by Prasad

[permalink] [raw]
Subject: Re: redirecting printk to the Serial port


the output stopped after it printed the line "Freeing unused kernel
memory". How do we manage to get the printk's to the serial line after
this. I can see the messages using 'dmesg' but am not getting them over
the serial line.

Prasad.

On Sun, 2 Mar 2003, Martin J. Bligh wrote:

>
>
> --On Monday, March 03, 2003 12:58:24 +0530 Prasad <[email protected]> wrote:
>
> >
> >
> > I have seen the Documentation/serial-console.txt and accordingly gave the
> > kernel arguments console=/dev/ttyS0,9600n8, but even after giving that i
> > am not getting anything to the other end. To check if the serial
> > communication was in place... i tried echo "abc" > /dev/ttyS0 and that
> > worked.
>
> I use "console=ttyS0,57600n8" - no "/dev".
>
> M.
>

--
Failure is not an option

2003-03-03 07:41:11

by Martin J. Bligh

[permalink] [raw]
Subject: Re: redirecting printk to the Serial port

Make sure there's no serial stuff, etc in your init scripts that
changes speeds or anything. Other than that, not sure ... been
so long since I set it up, I forget ...

M.

--On Monday, March 03, 2003 13:09:29 +0530 Prasad <[email protected]> wrote:

>
> the output stopped after it printed the line "Freeing unused kernel
> memory". How do we manage to get the printk's to the serial line after
> this. I can see the messages using 'dmesg' but am not getting them over
> the serial line.
>
> Prasad.
>
> On Sun, 2 Mar 2003, Martin J. Bligh wrote:
>
>>
>>
>> --On Monday, March 03, 2003 12:58:24 +0530 Prasad <[email protected]> wrote:
>>
>> >
>> >
>> > I have seen the Documentation/serial-console.txt and accordingly gave the
>> > kernel arguments console=/dev/ttyS0,9600n8, but even after giving that i
>> > am not getting anything to the other end. To check if the serial
>> > communication was in place... i tried echo "abc" > /dev/ttyS0 and that
>> > worked.
>>
>> I use "console=ttyS0,57600n8" - no "/dev".
>>
>> M.
>>
>
> --
> Failure is not an option
>
>