Why is finger so stupid?
Jonathan I. Kamens
jik at athena.mit.edu
Thu May 2 05:54:24 AEST 1991
In article <1991May1.140438.21171 at cse.uta.edu>, rduff at cse.uta.edu (Robert Duff) writes:
|> I have noticed that almost every UNIX machine in the world has a problem
|> with the amount of time a user has been logged in. Very regularly,
|> finger reports that someone has been logged in for 147 days!
Are you talking about the "When" or "On since" time or the "Idle" time?
The former is determined by finger from the ut_time field of the utmp
structure for the user and tty in the /etc/utmp file. If that file is not
kept up-to-date by the programs that write to it, then finger is going to get
bad information from it. I don't recall seeing this occur very often.
I do, however, recall seeing idle times that are far longer than the person
has even been logged in. This is due to the fact that many tty devices won't
update their access times until the first time the user types something on a
tty. Therefore, when you (for example) start up an xterm window, until you
type something in it, your idle time is the current time minus whatever the
access time of the pty that the xterm window ends up with was when it first
inherited the pty.
If xterm inherits a pty that hasn't been used for a while, or if devices
have just been restored from backup and therefore have very old access times,
or something like this, then the idle time displayed will be somewhat
ridiculous.
--
Jonathan Kamens USnail:
MIT Project Athena 11 Ashford Terrace
jik at Athena.MIT.EDU Allston, MA 02134
Office: 617-253-8085 Home: 617-782-0710
More information about the Comp.unix.questions
mailing list