2

Here is output of who -u command:

xenoadmin :0           2015-10-12 11:04   ?          2881 (:0)
xenoadmin pts/11       2015-10-12 11:04  old         3744 (:0)
xenoadmin pts/13       2015-10-12 12:39  old         3744 (:0)
xenoadmin pts/21       2015-10-15 19:15  old         3744 (:0)
xenoadmin pts/22       2015-10-15 12:19   .          3744 (:0)
xenoadmin pts/23       2015-10-15 12:29 00:57        3744 (:0)
xenoadmin pts/24       2015-10-15 12:30  old         3744 (:0)
xenoadmin pts/25       2015-10-15 12:30  old          447 (localhost)
xenoadmin pts/29       2015-10-21 16:52  old         3744 (:0)

In idle-time column, what is the meaning of 'old' and '?'. I was writing a small script which captures the ssh idle sessions and terminate them if they are idle for more than ; I am not sure how to treat these values ('old' & '?')

Thanks

1 Answers1

4

It is documented in the info page. From info who:

'-u'

 After the login time, print the number of hours and minutes that
 the user has been idle. '.' means the user was active in the last
 minute. 'old' means the user has been idle for more than 24 hours.

Additionally ? is for X sessions, confirmed by the display number (:0). Expectedly there is no such thing as idle time as far as the X session is concerned hence the value ? (unknown).

heemayl
  • 93,925