idle time for w command

Jonathan I. Kamens jik at athena.mit.edu
Tue Apr 30 07:21:01 AEST 1991


In article <4274 at pluto.dss.com>, cat at pluto.dss.com (Iain Wacey) writes:
|> How does the w command determine how long someone has been idle?

  It checks the access time on the device file (i.e. the st_atime field of the
stat structure obtained by calling stat() on the user's tty device.

|> We are
|> writing a login protocol using our own devices and w always reports
|> users on these devices as being idle for a long period of time.

  Do your devices correctly update their access times when appropriate?

-- 
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.programmer mailing list