Date: Mon, 8 Oct 90 13:58:46 EST From: Dwight D. McKay (The Moderator) Reply-To: Suns-at-Home@orchestra.ecn.purdue.edu Subject: Suns-at-Home Digest V3 #30 To: Suns-at-Home-List Suns-at-Home Digest Mon, 8 Oct 90 Volume 3 : Issue 30 Today's Topics: Script to kill "bad" getty processes Suns-at-Home Digest V3 #29 +--------------------------------------------------------------------+ | Submissions: suns-at-home \ @orchestra.ecn.purdue.edu | | Requests: suns-at-home-request > -- or -- | | Archives: suns-at-home-archives / ...rutgers!pur-ee!... | +--------------------------------------------------------------------+ ---------------------------------------------------------------------- Date: 5 Oct 90 00:14:14 GMT From: mrapple@quack.sac.ca.us (Nick Sayer) Subject: Script to kill "bad" getty processes To: suns-at-home@orchestra.ecn.purdue.edu quack is a Sun 2/170 running SunOS 4.0 + yapt5.5c -- quite a buggy system to be sure. One problem that seems to happen once in a while is that someone on a modem port will log out with a process running in the background. Under this circumstance, the tty file attached to the modem is not closed -- the background process keeps it open. So "stty hupcl" does not take place. The getty sees a good carrier, so the open succeeds and the user gets a login prompt. The user then just drops carrier, which leaves the getty in a fairly confused state. It can't read or write, since the carrier is out, but it DID open the tty file. What results is that sps reports that getty is stuck with a "w?tym0" status. Well, this has all sorts of other negative conotations which at least in MY case make it beneficial that these processes get killed. This script uses sps to look for processes that have ?ty in their status indicator window and "-" as their name. If it finds any, it prints out the sps data from from those processes, and kill -9's them. This may or may not be a useful thing for others. I am sharing it in case it is. ---------- cut here ---------- #! /bin/sh kill=`sps -va 2>/dev/null | awk ' { if ( ( $2 ~ /\?ty/ ) && ( $9 == "-" ) ) print $8 } '` if [ -z "$kill" ] ; then exit 0 fi echo Killing processes: $kill sps -vp $kill kill -9 $kill exit 0 ---------- ereh tuc ---------- -- Nick Sayer | Disclaimer: N6QQQ [44.2.1.17 soon] | "Just because you're reading my post doesn't mrapple@quack.sac.ca.us | mean we're gonna take long showers together." 209-952-5347 (Telebit) | -- Gunnery Sgt. Thomas Highway ------------------------------ Date: Mon Oct 1 21:54:23 1990 From: ssi!beowulf!bownesrm@uunet.uu.net Subject: Suns-at-Home Digest V3 #29 To: Suns-at-Home@orchestra.ecn.purdue.edu A while back someone offered to make tapes of X11 binaries for sun-2's available. I'd like to get a copy if possible, but I don't remember who it was that offered......Any volunteers? Thanks, bob ------------------------------ End of Suns-at-Home Digest ******************************