home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!unixhub!unixhub.slac.stanford.edu!alhy
- From: alhy@unixhub.slac.stanford.edu (J. Scott Berg)
- Newsgroups: comp.unix.aix
- Subject: Re: xterm: no available ptys
- Message-ID: <5112@unixhub.SLAC.Stanford.EDU>
- Date: 15 Aug 92 00:10:07 GMT
- References: <BIS.92Aug14124438@maud.ifi.uio.no> <1992Aug14.223914.401@iscnvx.lmsc.lockheed.com>
- Sender: news@unixhub.SLAC.Stanford.EDU
- Reply-To: alhy@unixhub.slac.stanford.edu
- Organization: Stanford University, dept of Physics / SLAC
- Lines: 77
- Nntp-Posting-Host: courant.slac.stanford.edu
-
- In article <1992Aug14.223914.401@iscnvx.lmsc.lockheed.com>, rahner@iscnvx.lmsc.lockheed.com (Mark Rahner) writes:
- |> bis@ifi.uio.no (Bjorn Ivar Stark) writes:
- |> : When I try to start more than a certain limit of xterms I get
- |> : this error-message:
- |> : fosli@asterix: xterm
- |> : xterm: no available ptys
- |>
- |> This has given us massive headaches. Our system administrator has
- |> increased one of our RS/6000s to what he says is the limit of 64.
- |> Sorry, but I don't know how.
- |>
- |> When we first reported this to IBM, IBM said "Xterm is provided on the
- |> RISC/6000 as a binary sample only and is unsupported." (More on this in
- |> a minute.) After explaining to the #!%&*s that the problem wasn't with
- |> xterm, but with their system chewing up ptys, they reexamined the problem
- |> and determined that the software that controls our many X Stations was
- |> not properly releasing the ptys when the X Stations were being turned
- |> off. As yet, this has not been fixed.
- |>
-
- If your problem is what I think it is, the following fix MAY (no
- guarantees) work: before exiting mwm (I'm assuming that's what you're
- running), execute the following perl script:
-
- #!/usr/local/bin/perl
- #
- # Exit gracefully from an x windows session on an RS6000--i.e., don't leave
- # behind any csh's. At the same time, don't kill anything unnecessarily.
- #
- $indx = 0;
- # Get a list of processes
- open(psout,"ps lgxw |");
- while (<psout>) {
- $psout[$indx++] = $_;
- }
- close(psout);
- $cmd = "kill -9";
- for ($i = 0 ; $i < $indx ; $i++) {
- @psline = split(/ +/,$psout[$i]);
- if (("$psline[3]" eq "$<") && ("$psline[5]" ne "$$") &&
- ("$psline[11]" eq "EVENT") && !($psline[12] =~ /hft\/[0-9]/) &&
- (($psline[14] =~ /^-?[bck]?sh/) || ($psline[14] =~ /^-?tcsh/))) {
- for ($j = 0 ; $j < $indx ; $j++) {
- @xtst = split(/ +/,$psout[$j]);
- last if (("$psline[5]" eq "$xtst[4]") && ($xtst[13] =~ /^xterm/));
- }
- if ($j != $indx) {
- $cmd = "$cmd $psline[4]";
- }
- }
- }
- exec $cmd;
-
-
- Here's what it does: it does a ps lgxw to find all the shells that
- are children of xterms and have this "EVENT" state set, and kills
- them. These seem to be the things that are hanging around that are
- eating pty's. As best as I can figure, the problem is in mwm, not the
- server. That's a guess (running R3 or R5 server with twm doesn't seem
- to exhibit the problem at the moment).
-
- I hope this is what you are looking for. Good luck, and God bless
-
- -Scott Berg
-
- --
- -------------------------------------------------------------------------------
- The opinions expressed here are, of course, my own and nobody else's.
- -------------------------------------------------------------------------------
- J. Scott Berg
- email: alhy@unixhub.slac.stanford.edu
- real mail: Varian Physics
- Stanford CA 94305-4060
- phone: (415) 926-4732 (w)
- (415) 328-8246 (h)
- -------------------------------------------------------------------------------
-
-