The 2004-09-16 at 14:41 +0100, Dave Howorth wrote:
Of course, as soon as I started watching, nothing happened for several days. Now the system has crashed again and I'm trying to set up a serial line from the problem box to another. I have a couple of questions :)
Murphy's rules! ;-)
(1) It's been a while since I played with serial ports on unix. I've got the link kind of working but with an odd symptom that I'd like to fix. I've connected a serial cable between the problem box (Suse 9.1) and another box (Debian woody, sorry :) Using terminal windows, on both boxes I've typed: stty raw < /dev/ttyS0 Then on one machine I type cat > /dev/ttyS0 and on the other cat < /dev/ttyS0
Mmmm... I have to confess. I have never tried anything like that: my serial ports experiments were done with PCs running msdos, breadboards and chips, cp/m type machines, 68000 processors on vme bus... but never on unix or with cats or dogs ;-)
So far so good. When I type a line of text on the > box, I see it (including a ^J) on the < box, repeated lots of times.
Handshaking faulty, I'd guess. It's got to be bidirectional to work.
Then it settles down and anything more that I type is faithfully reproduced on the other box. It doesn't matter which box I use as source. Does anybody know what causes this?
Nope, not sure. But I would simply use "minicom" at the receiving end. It can display and log to disk (I forgot how), and that is handy.
(2) The next thing I need to do is configure kernel messages to be sent to the serial line. Does anybody know whether it is as simple as adding a line in /etc/syslog.conf:
kern.*;*.err /dev/ttyS0
That would certainly work, as long as syslog lasts a few seconds more than the kernel. I think there is a low level thing, kernel level, I mean... unfortunately, today I'm at an old machine, pentium 120 with SuSE 7.3, I can't look at a recent kernel. Look at the "kernel debugging", the last item in menuconfig. I think I saw it there. If Murphy's looking the other way, you will not need to recompile.
and then kill -HUP `cat /var/run/syslogd.pid`
Kill syslog? What for? I got lost here. [...] I suggested the serial port thing hoping somebody would know and explain to us. However, I'm founding references on the kernel documentation. For example, look at this paragraph (oops-tracing.txt): (2) Boot with a serial console (see Documentation/serial-console.txt), run a null modem to a second machine and capture the output there using your favourite communication program. Minicom works well. That looks promising. Then, serial-console.txt says: To use a serial port as console you need to compile the support into your kernel - by default it is not compiled in. For PC style serial ports it's the config option next to "Standard/generic (dumb) serial support". You must compile serial support into the kernel and not as a module. If it is compiled, a boot option enables and configures it. Read that file, it explains a lot. I haven't searched to see if SuSE compiled that option on their kernels. Also, there is klogd (Kernel Log Daemon). It can dump to a file, and that file could be a serial port, I suppose. Not mentioned at the man page. Well... I'm closing for the day, ie, I'm going to sleep. I hope one of these ideas is good enough to help you, or to suggest another. In any case, I'm interested in learning the outcome. :-) Good hunting :-) -- Cheers, Carlos Robinson