Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!ncrlnk!ncrcce!mercer From: mercer@ncrcce.StPaul.NCR.COM (Dan Mercer) Newsgroups: comp.unix.wizards Subject: Re: Watchdog program Message-ID: <1755@ncrcce.StPaul.NCR.COM> Date: 28 Nov 89 04:24:10 GMT References: <21529@adm.BRL.MIL> Reply-To: mercer@ncrcce.StPaul.NCR.COM (Dan Mercer) Organization: NCR Comten, Inc. Lines: 34 Keywords: In article <21529@adm.BRL.MIL> moore@ncsc.navy.mil (Moore) writes: : :It seems like a program such as this should be very common: does anyone have :a program (source, too, please!) to monitor terminal inactivity and shut down :any processes idle for a certain amount of time? It would have to detect :processes that indicate Idle but really aren't (like a Kermit file transfer). : :Target machine is an 11/750 running 4.3bsd (from Mt. Xinu). Please forgive :if this is a duplicate request, I may have already sent a query during the :panic phase of being assigned interim system administrator duties with no :experience.... : :Thanks for any assistance. : :jim :moore@NCSC.navy.mil Be wary of any such program if all it does is check the access times of the tty's (by doing a stat on /dev/ttyxx). Many programs, in particular vi and kermit, open the generic device /dev/tty. The times for the real device, /dev/ttyxx, are not updated. I have been stung by this on our news machine. Chronically short of space, yet because of the timeout limit, you get knocked off doing large transfers. What you really need is a re-engineered ps to examine activity times. -- Dan Mercer Reply-To: mercer@ncrcce.StPaul.NCR.COM (Dan Mercer)