On Tue, 3 Dec 2024 at 19:21, Vincent Lefevre <vinc...@vinc17.net> wrote:

> Package: procps
> The "idle time" information output by "w" (in the IDLE column) is
> incorrect. It is a common, arbitrary value for all entries, which
> does not seem to be related to any idle time. It can be something
> like "2days" or "7days", and can be reset for an unknown reason.
>
Hi Vincent,
  Thanks for your report. The idle time is, indeed for most sessions wrong.
It is derived from the access time of the TTY device the user has.

$ w
 20:31:51 up 11 days, 13:18,  1 user,  load average: 0.18, 0.16, 0.10
USER     TTY       LOGIN@   IDLE   JCPU   PCPU  WHAT
csmall   tty2      22Nov24 11days  0.04s  0.02s
/usr/libexec/gnome-session-binary
$ stat -c %x /dev/tty2
2024-11-22 07:13:30.523999965 +1100

11 days ago from time of writing was 22 November. This used to work and
something has changed.

The problem is now, how to determine the idle time of the user if the tty
is not changing its access time?

 - Craig

Reply via email to