Subject: Re: Having trouble running pppd on tty0
To: None <netbsd-help@netbsd.org>
From: Trevin Beattie <spam@xmission.com>
List: netbsd-help
Date: 05/12/1999 18:37:10
Manuel Bouyer wrote:
> This is really, really strange. Do you have some swap space enabled ?
> what does 'pstat -sk' reports ?
> You need a line like
> /dev/sd0b none swap sw 0 0
> in your /etc/fstab

Actually, I have two swap partitions of 128MB each:

etc# cat fstab
/dev/sd0a	/	ffs	rw		1 1
/dev/sd0b	none	swap	sw		0 0
/dev/sd0e	/home	ffs	rw		1 2
/dev/sd1a	/usr/local ffs	rw		1 2
/dev/sd1b	none	swap	sw		0 0
/dev/sd1e	/var	ffs	rw		1 2
/dev/sd1f	/tmp	ffs	rw		1 2
kernfs		/kern	kernfs	rw		0 0
/usr/local/X11R6 /usr/X11R6 union rw		0 0

etc# pstat -sk
Device      1K-blocks     Used    Avail Capacity  Priority
/dev/sd0b      130995        4   130991     0%    0
/dev/sd1b      130995        4   130991     0%    0
Total          261990        8   261982     0%

> 
> You need to tweak you /etc/syslog.conf and kill -HUP syslogd to redirect
> the debug messages to a file (something like:
> *.debug                                     /dev/console

Perhaps you didn't see this line in my original post:

etc# diff syslog.conf{.orig,}
5a6
> daemon.debug                                          /var/log/messages

I also tried changing the first part to "*.debug", but that doesn't give
my any data either.

> > > tty00 "/usr/libexec/getty usr36000"   unknown off secure local
> 
> What happens if you kill the 'local' flag here ?

Originally, I hadn't changed this line at all:

tty00 "/usr/libexec/getty std.9600"   unknown off secure

> If you kill the complete tty00 line ?

No help.  The modem still won't respond.

Frederick Bruckman wrote:
> IIRC, cu forks into two processes. If you quit it with ^C instead
> of `~.', you may only exit one of them, which means you won't be
> able to read from the port. Check to see that there's no other cu
> running before trying it again, e.g. `ps axl | grep tty00 -'.

After typing "~.", `ps' shows only one cu process.  However, I noticed
this time that if I leave it alone for at least 30 seconds, it will
eventually time out and exit.

`pppd', on the other hand, apparently has no timeout (there's about 5
seconds between each of the following commands):

uucp# pppd debug
uucp# ps ax | sort | tail
  330 p1  Ds     0:00.03 -sh (csh)
  331 p0  Ss     0:00.03 -csh 
  338 p1  I      0:00.04 xconsole 
  353 p0  S+     0:00.00 tail -f /var/log/messages 
  355 ??  Ss     0:00.00 pppd debug 
  356 ??  S      0:00.00 sh -c /usr/sbin/chat -v -f
/etc/ppp/xmission.chat 
  357 ??  S      0:00.01 /usr/sbin/chat -v -f /etc/ppp/xmission.chat 
  358 p1  R+     0:00.00 ps -ax 
  359 p1  RV     0:00.00 -sh (csh)
  PID TT  STAT      TIME COMMAND
uucp# ps ax | sort | tail
  330 p1  Ds     0:00.04 -sh (csh)
  331 p0  Is     0:00.03 -csh 
  338 p1  I      0:00.04 xconsole 
  353 p0  S+     0:00.01 tail -f /var/log/messages 
  355 ??  Ss     0:00.00 pppd debug 
  356 ??  S      0:00.00 sh -c /usr/sbin/chat -v -f
/etc/ppp/xmission.chat 
  357 ??  S      0:00.01 /usr/sbin/chat -v -f /etc/ppp/xmission.chat 
  361 p1  R+     0:00.00 ps -ax 
  362 p1  RV     0:00.00 -sh (csh)
  PID TT  STAT      TIME COMMAND
uucp# ps ax | sort | tail
  330 p1  Ds     0:00.04 -sh (csh)
  331 p0  Is     0:00.03 -csh 
  338 p1  I      0:00.04 xconsole 
  353 p0  S+     0:00.01 tail -f /var/log/messages 
  355 ??  Is     0:00.00 pppd debug 
  356 ??  I      0:00.00 sh -c /usr/sbin/chat -v -f
/etc/ppp/xmission.chat 
  357 ??  I      0:00.01 /usr/sbin/chat -v -f /etc/ppp/xmission.chat 
  364 p1  R+     0:00.00 ps -ax 
  365 p1  RV     0:00.00 -sh (csh)
  PID TT  STAT      TIME COMMAND
uucp# ps ax | sort | tail
  329 ??  R      0:00.28 xterm -e /usr/local/bin/su 
  330 p1  Ds     0:00.04 -sh (csh)
  331 p0  Is     0:00.03 -csh 
  338 p1  I      0:00.04 xconsole 
  355 ??  Is     0:00.00 pppd debug 
  370 p0  I      0:00.02 -sh (csh)
  375 p0  S+     0:00.00 cat 
  376 p1  R+     0:00.00 ps -ax 
  377 p1  RV     0:00.00 -sh (csh)
  PID TT  STAT      TIME COMMAND
uucp# tail /var/log/messages
May 12 17:45:59 clay /netbsd: root on sd0a dumps on sd0b
May 12 17:45:59 clay /netbsd: /dev/sd0a: file system not clean
(fs_flags=10); please fsck(8)
May 12 17:45:59 clay /netbsd: IP Filter: initialized.  Default = pass
all, Logging = enabled
May 12 17:45:59 clay /netbsd: /dev/sd1e: file system not clean
(fs_flags=10); please fsck(8)
May 12 17:45:59 clay /netbsd: /dev/sd0a: file system not clean
(fs_flags=10); please fsck(8)
May 12 17:45:59 clay /netbsd: /dev/sd0e: file system not clean
(fs_flags=10); please fsck(8)
May 12 17:45:59 clay /netbsd: /dev/sd1a: file system not clean
(fs_flags=10); please fsck(8)
May 12 17:45:59 clay /netbsd: /dev/sd1f: file system not clean
(fs_flags=10); please fsck(8)
May 12 17:45:59 clay /netbsd: 
May 12 17:45:59 clay /netbsd:  Aperture driver for XFree86 version 1.6
uucp# tail /var/log/debug
tail: /var/log/debug: No such file or directory
uucp# kill -HUP 355
uucp# ps ax | sort | tail
  328 ??  I      0:00.05 xpostit+ 
  329 ??  R      0:00.40 xterm -e /usr/local/bin/su 
  330 p1  Ds     0:00.05 -sh (csh)
  331 p0  Is     0:00.03 -csh 
  355 ??  Is     0:00.00 pppd debug 
  370 p0  I      0:00.02 -sh (csh)
  389 p0  S+     0:00.01 cat 
  390 p1  R+     0:00.00 ps -ax 
  391 p1  RV     0:00.00 -sh (csh)
  PID TT  STAT      TIME COMMAND

I checked again after more than a minute, and "pppd debug" was still
there.