Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!bria!mike Newsgroups: comp.unix.xenix.sco Subject: Re: Logging off idle users under SCO Xenix Message-ID: <338@bria> Date: 9 Jan 91 06:29:32 GMT References: <645@quad.sialis.com> Reply-To: mike@bria.UUCP (Michael Stefanik) Organization: Briareus Corporation, Los Angeles, CA Lines: 37 In article <645@quad.sialis.com> dts@quad.sialis.com (David Sandberg) writes: >I need to find a program which will automatically log out users >who haven't touched their terminals in a certain length of time. >I've heard of a program called untamo from the comp.sources.unix >archives which does this, but my impression is that it is rather >BSD-dependent. If anyone has a SCO Xenix 2.3.2 solution to this >quandray, I would be very grateful to them if they'd fill me in. >(Yes, I have the development system, so source is an option.) Well, yup, I actually do have a general purpose program called "watchdog" that will monitor processes and zap 'em if they linger. I originally wrote it under AIX (but it works swimmingly under XENIX) to kick our programmers off modems. How watchdog differs from idleout is that watchdog monitors *any* type of process that you want it to, not just login shells (it's great for zapping turkeys who dialup a system 3000 miles away, and then go out for lunch without disconnecting ...) Generally, how it works is this: you tell watchdog what processes you're looking for (in your case "-sh" for login shells), what is the amount of time that the associated terminal must be idle before the process is killed, and the interval for checking up on people. Watchdog will then nice itself and become a (rather deadly) daemon. Everytime it nails someone, it updates a text file /usr/adm/watchdog, telling you when it got 'em and why. As an aside, I also wrote a penable and pdisable for XENIX, which will enable and disable ports ala telinit or enable/disable; the difference being that if you pdisable a port, all processes associated with said port are killed (violently, at times :-) unlike disable, which wimps out and moans how someone is on that port. Remember, if you're gonna kill 'em, kill 'em fast and kill 'em hard! And if you want the watchdog, send mail to uunet!bria!mike -- Michael Stefanik, Systems Engineer (JOAT), Briareus Corporation UUCP: ...!uunet!bria!mike -- technoignorami (tek'no-ig'no-ram`i) a group of individuals that are constantly found to be saying things like "Well, it works on my DOS machine ..."