「舊」和「?」是什麼意思?意思是誰命令輸出?

「舊」和「?」是什麼意思?意思是誰命令輸出?

這是who -u命令的輸出:

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)

在空閒時間欄中,「舊」和「?」的意思是什麼。我正在編寫一個小腳本,它捕獲 ssh 空閒會話,並在空閒時間超過 時終止它們;我不確定如何處理這些值(“舊”和“?”)

謝謝

答案1

它記錄在info頁面中。從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.

另外?適用於 X 個會話,由顯示編號 ( :0) 確認。就 X 會話而言,預計不存在空閒時間,因此該值?(未知)。

相關內容