Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!unmvax!ncar!ames!amdahl!nsc!taux01!taux02!amos From: amos@taux02.UUCP (Amos Shapir) Newsgroups: comp.unix.wizards Subject: Re: Autologout of unused terminals Message-ID: <323@taux02.UUCP> Date: 30 Nov 88 12:43:25 GMT References: <201.nlunix6@orcenl.uucp> <8978@smoke.BRL.MIL> <2682@sultra.UUCP> <9012@smoke.BRL.MIL> Organization: National Semiconductor (IC) Ltd, Israel Home of the 32532 Lines: 21 Hdate: 21 Kislev 5749 In article <9012@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn (VLD/VMB)) writes: >There are many ways to deal with careless terminal users other than >automatic idle-terminal killer software. Here's one: the following command file, for BSD systems, uses the output of 'w' to mail notes to idle users. The only bug is that such users are usually not there to read their mail... #!/bin/sh w -hs | \ sed -n 's/^\(.........\)\(..\)\(.[0-9]\).*/(echo You have a login session on tty\2\ echo which has been inactive for more than \3 days now. \ echo You can use ps -ut\2 to find out what processes run there and kill them.) \\\ |Mail -s "Idle login session" \1/p' |sh -- Amos Shapir amos@nsc.com National Semiconductor (Israel) P.O.B. 3007, Herzlia 46104, Israel Tel. +972 52 522261 TWX: 33691, fax: +972-52-558322 34 48 E / 32 10 N (My other cpu is a NS32532)