Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!julius.cs.uiuc.edu!psuvax1!psuvm!blekul11!ffaac09 From: FFAAC09@cc1.kuleuven.ac.be (Nicole Delbecque & Paul Bijnens) Newsgroups: comp.unix.admin Subject: Re: Program to log off idle users Message-ID: <90284.162714FFAAC09@cc1.kuleuven.ac.be> Date: 11 Oct 90 16:26:14 GMT References: <10504@hacgate.UUCP> <9800001@hpbbi4.BBN.HP.COM> <1990Oct4.135333.19139@warwick.ac.uk> <1990Oct10.180836.12313@sci.ccny.cuny.edu> Organization: K.U.Leuven - Academic Computing Center Lines: 43 >>The trouble with all these idle timeout schemes is that they rely on the idle >>time on the particular /dev/tty device. >> >>1) You don't really want to kill all such sessions, what about people who jus >> ... >>2) This just doesn't work. If an application is talking to /dev/tty instead >>of the particular port, it's the times on /dev/tty, not /dev/tty?? that get >>updated. Our most popular editor round here works like this. Even the ones >>that try to be clever and go hunting down the process list looking for busy >>processes don't work, after 127 seconds you can't tell how long a process has >>been idle: >... >What I do now that seems to work is to use a hacked version of csh >which has a timeout if it sits at the prompt too long. The timeout is >set by a variable in the user's environment. If you don't have sources, this little Bourne-shell program, called "alive" can help sometimes (execute it from the /dev/tty??? in question): # alive -- give signes of life on this terminal if [ -z "$MYTTY" ] then # fork into the background cd / MYTTY=`tty`; export MYTTY nice -19 $0 $* & exit 0 fi while touch -m $MYTTY do sleep ${1:-3600} done > In addition I run an >idlekiller of the sort described in the original article about 3 times >a day -- once after most people have gone home and once just before >they arrive for the day and once after midnight. This catches the >forgetful emacs users. Yes, a good advice: if you want to run that idle-killer, give it a real long permitted idle-time, or don't run it at all. -- Polleke