rduff@cse.uta.edu (Robert Duff) (05/01/91)
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! I know that can't be true because the machine was only booted 25 minutes ago! At first I thought that this was a quirk of our SPARC station, but then I noticed it on our NeXT as well. After fingering several people I know at various other sites, the problem seems fairly wide spread. Any idea what's wrong? ------------------------------------------------------------------------------- He wants some Angry Young Men, | Robert Duff Ones who can't be bought, | Automation & Robotics Research Ones who will not run from a fight! | Institute - (817) 794-5957 -- Randy Stonehill | rduff@cse.uta.edu
jik@athena.mit.edu (Jonathan I. Kamens) (05/02/91)
In article <1991May1.140438.21171@cse.uta.edu>, rduff@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@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8085 Home: 617-782-0710