# logging kernel messages via the serial port to another box

## mattmatteh

i got gentoo installed on an old pentium 133.  almost everything works, except when i compile gcc i am getting a nasty kernel oops.  i had someone look at the error message once and was told that the kernel is allocation memory.  but that fails and it still uses it, then will oops.

so i enabled debug messages in the kernel to see whats going on and want to log to another box.  when the oops happens, it sometimes freezes.  i want to save the messages.

i made a null modem cable and tested it by echo "hello" > /dev/ttyS2 and received it on box2 cat /dev/ttyS2, that worked.

then i set up grub:

kernel /bzImage-2.6.18-gentoo-r2 root=/dev/hde3 console=ttyS2,115200

i tried cat /dev/ttyS2 and all i get is junk from it.

i was trying minicom but that doesnt work in screen.  well it does but the ctrl-a commands conflict with screen.

is this a good way to log kernel messages to another box for debug ?

will cat'ing /dev/ttyS2 work for this ?

thanks

matt

----------

## M1Sports20

hit Ctrl+A twice when using minicom inside of screen. 

1.  You could have syslog send the logs to a different box over your lan.

2.  Do you have your settings correct in minicom, bitrate and 8 None 1

----------

## mattmatteh

i was trying to use minicom, it doesnt work well.  and it doesnt work with screen.

i was thinking that the serial port would be better for kernel messages when it oops.  like the buffer on the ethernet or the hard drive will not get written when it freezes.

thanks

matt

----------

## M1Sports20

true about the kernel.  Serial would be the best option.

I was just saying that I use minicom within screen.  And it does work you just have it hit Ctrl+A twice to access the minicom options and not screens.

So did you make sure the settings are correct in minicom?

----------

## mattmatteh

minicom and screen do not work.  tried several times and get kicked out of screen  :Sad: 

any other way to log the serial port ?

matt

----------

## mattmatteh

i tried again today.  all i get is garbage text to the logging box when i cat /dev/ttyS2.   i tried several times to get minicom to work,  all i get on that is modem hang up... junk.

any idea why cat /dev/ttyS2 gives garbage ?

thanks

matt

----------

