mgetty won't see the modem after the first call
Eric Veldhuyzen (eric@terra.telemediair.nl)
Mon, 18 Oct 1999 14:46:43 +0200
Gert Doering wrote:
>
> Hi,
>
> On Mon, Oct 18, 1999 at 10:15:50AM +0200, Eric Veldhuyzen wrote:
> > Since I didn't get any answer the last time I asked this question,
> > I try another time, this time with some additional information.
>
> Actually, I was just bogged down with work, trade show, etc.
No problem, I understand.
> The problem is really weird. Mgetty should never start up without
> at least logging the version number - that is done before the serial
> device is touched at all, so it really should show up.
Weird. I seems that if I let mgetty log to a named pipe, and let logger
log this through syslog some information disapears. That is a problem
since now I can't do logging of the serial ports reliably. Because mgetty
will run from a boot floppy, there won't be room for a local logile. And
since I want to use the same disk for more than one server, I also can't
do logging the some other machine because the logfiles would overwrite
eachother. Or the logs would mix, which is equally unusable.
It would be nice if all information could be logged through syslog,
or if the logfile to log to could be defined in the configuration file.
I'll log to a file on the ramdisk for now, for testing this is acceptable.
> Are you sure about the "new mgetty" that's being started?
Yes, it doesn have a new process number, and while the exec-ed program
is ran there isn't a mgetty listining to the port.
> What you could do is use "strace" to attach to that mgetty process,
> and find out what it's doing. Or attach to "init" (*warning* - don't
> do this on a production system with lots of stuff going on) while
> the first login is still active, logout, and watch what's going on.
>
> (Something like "strace -f -p 1 >/tmp/log 2>&1", if I remember the syntax
> correctly).
Yes, but on linux stracing the init process is forbidden :-(
I'll have to do with stracing the mgettys then.
> Then send the last few hundred lines of the output to us... (the part
> showing the mgetty PID only).
[some time later]
Hmm... Is it possible that mgetty for some reason is very confused if
the logfile it writes to isn't a real normal file but a named pipe? I
just removed the named pipe that I was using for logging an replaced it
with an empty file, and suddenly I can't reproduce the problem. And this
is the only thing I've changed....
Then the only problem I will have is how I can get the logging to a
remote system. The ram disk isn't big enough for logging locally.
--
#!perl # Life ain't fair, but root passwords help.
# Eric Veldhuyzen eric@terra.telemediair.nl
$!=$;=$_+(++$_);($:,$~,$/,$^,$*,$@)=$!=~ # Perl Monger
/.(.)...(.)(.)....(.)..(.)..(.)/;`$^$~$/$: $^$*$@$~ $_>&$;`