Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!mcsun!ukc!warwick!cudcv From: cudcv@warwick.ac.uk (Rob McMahon) Newsgroups: comp.unix.programmer Subject: Re: idle time for w command Keywords: w Message-ID: Date: 1 May 91 16:32:45 GMT References: <4274@pluto.dss.com> <1991Apr29.212101.10931@athena.mit.edu> <1019@dri500.dri.nl> Sender: news@warwick.ac.uk (Network news) Organization: Computing Services, Warwick University, UK Lines: 20 Nntp-Posting-Host: shark In article <1019@dri500.dri.nl> slootman@dri.nl (Paul Slootman) writes: >I once hacked a program to show idle time (on our System V, we don't have >'w'). Only checking the access time (and mod. time) on the device file may >not be enough... > >If your 'ps' has a field to show the state of the process (e.g. S for >sleeping less than 20 seconds, I for sleeping longer than 20 seconds), you >can double-check by running 'ps'. Beware, even this isn't enough. If the user is running an editor which talks to /dev/tty, all the user has to do is stop typing for 20 seconds and he gets marked as idle. Killing him off is not always appreciated at this point. I think last time this discussion went round, it was decided there wasn't any sensible way to determine the real idle time. Rob -- UUCP: ...!mcsun!ukc!warwick!cudcv PHONE: +44 203 523037 JANET: cudcv@uk.ac.warwick INET: cudcv@warwick.ac.uk Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England