Path: utzoo!utgpu!watmath!clyde!att!rutgers!deimos!uxc!uwmcsd1!marque!uunet!seismo!esosun!ucsdhub!isg100!elgar!ag From: ag@elgar.UUCP (Keith Gabryelski) Newsgroups: comp.unix.wizards Subject: Re: Autologout of unused terminals Message-ID: <20@elgar.UUCP> Date: 1 Dec 88 04:40:01 GMT References: <74@attibr.UUCP> <3603@jpl-devvax.JPL.NASA.GOV> Reply-To: ag@elgar.UUCP (Keith Gabryelski) Organization: Elgar Corporation, San Diego, CA Lines: 44 In article <74@attibr.UUCP> vch@attibr.UUCP (Vincent C. Hatem) writes: >You could also use 'who -u' (on Sys V), which tells the idle time... Idle time messages on some versions of system V who are broken. They use st_mtime instead of st_atime. From `man stat': sed -n "s/(S)/(2)/gp" # if appropriate. st_atime Time when file data was last accessed. Changed by the following system calls: creat(S), mknod(S), pipe(S), utime(S), and read(S). ^^^^^^^ st_mtime Time when data was last modified. Changed by the following system calls: creat(S), mknod(S), pipe(S), utime(S), and write(S). ^^^^^^^^ The idle daemon code is trivial (written during halftime on Monday). If anyone would like a copy, send me mail. In article <3603@jpl-devvax.JPL.NASA.GOV> lwall@jpl-devvax.jpl.nasa.gov (Larry Wall) brings up: >[...] but idle-killers are so easy to spoof, unless you disable >people from executing utime() or ioctl(). The daemon code, IMHO, should not be intended for use against malicious(*) or unwilling idlers. The code is used to logout users who forget to logout. Also, an idle daemon may not be appropriate for some (even most) sites, but it is a valid option for a few. You don't even have to be fascist about the code, set it for three hours if you like ... with warning messages. (*) ``malicious idlers'' here is defined as a user that hogs a terminal (by being logged in) for an usually long period of time without using the terminal. nohup(1) is a viable alternative in a lot of the idle terminal cases. Pax, Keith -- ag@elgar.CTS.COM Keith Gabryelski ...!{ucsd, jack}!elgar!ag