idle time for w command
Rob McMahon
cudcv at warwick.ac.uk
Thu May 2 02:32:45 AEST 1991
In article <1019 at dri500.dri.nl> slootman at 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 at uk.ac.warwick INET: cudcv at warwick.ac.uk
Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England
More information about the Comp.unix.programmer
mailing list