What constitutes "activity" for the purposes of the Unix "who" command? We're trying to find idle sessions but have disagreements as to the precise meaning of the activity in this context. One person contends that the activity time is only reset by user input--that is, data coming into the session from standard input. Others are saying any CPU activity. An authoritative answer would be useful.
S.0: The one I'm checking on, so definitely 0 time there.
S.1: I left a shell open. Two seconds before I pressed a key without pressing enter. So, any input received works even without a line return.
S.2: I ran
Idle time is reset when a character is read from the terminal input. Blocked input doesn't update idle time even if it does affect the screen display. Applications may update under different rules. For example, I used
Processes run all the time, and it doesnt matter for idle time.
If you do a:
in one terminal, and open another terminal, you will see that idle time of that other session is reset to zero, only when user inputs something (presses a key). If you run:
in the other terminal the idle time will continue to rise.
So only when the session reads user input, the idle timer is reset.