From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,f1086cc65bb06bfd,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1992-10-22 10:42:30 PST Newsgroups: comp.sys.dec Path: sparky!uunet!utcsri!torn!watserv2.uwaterloo.ca!watdragon.uwaterloo.ca!watdragon.uwaterloo.ca!kcwellsc From: kcwellsc@watdragon.uwaterloo.ca (Ken Wellsch) Subject: running out of pty's? Message-ID: <92Oct22.191107edt.168257-3@watdragon.uwaterloo.ca> Sender: root@watdragon.uwaterloo.ca (System PRIVILEGED Account) Organization: University of Waterloo Date: Thu, 22 Oct 1992 23:11:06 GMT We have a DECsystem 5500 running Ultrix 4.2A that normally has around 30 or 40 simultaneous users peek a day. Several days ago, we ran out of pty's. I checked and there were not 176 pty's in service (as gen'ed). Oddly enough, using "pstat -t", I found that around 140 or 150 pty's were in "W" state (waiting for pending open to complete). It took a day or so but I tracked it down to a few users that used "sysline". I was able to solve the problem via a "fix" to sysline. When sysline notices a user has logged out (the invoking user no longer owns the tty) it attempts to clear the status line before exiting. It does that approximately like this: signal(SIGALRM,exit); alarm(30); if ( ( fd = open(tty,1) ) >= 0 ) clear status line close(fd); exit(0); I discontinued this (I consider) odd behaviour. If the user doesn't own the tty I'd think it likely the open will fail anyway (at least on non-real tty ports). Apparently Ultrix hangs the above open and does not clean the pending open status up when the alarm hits and the process exits. There never were any processes left around on the pty's. I traced it via "lastcomm" on userid's that last logged in - the offending sysline's were the last command on the pty login trace and had no controlling tty listed.