[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1933: w from procps gives wrong idle times

Package: procps
Version: 0.97-4

valour$ w
  5:07pm  up 15 days, 20:31,  7 users,  load average: 0.16, 0.11, 0.09, 3/76
User     tty       login@  idle   JCPU   PCPU  what
and1000  ttyp0     4:15pm    49     24         -bash (bash)
and1000  ttyp1     4:15pm    30      2         bash
jbk1000  ttyp4     4:41pm    11   2:12     58  xpilot mphhpd.ph.man.ac.uk
ijackson ttyp5     5:04pm    22                /bin/bash
ajm46    ttyp6     4:45pm  2:10                -bash (bash)
ajm46    ttyp7     4:45pm            3      2  rlogin chiark.chu
ajm46    ttyp8     4:45pm    18      1      1  rlogin thor
valour$ date
Fri Dec  1 17:07:31 GMT 1995

Notice that:

(1) ijackson logged in at 5.04pm, but is allegedly idling 22 mins -
    this is clearly impossible, since it's now 5.07pm!

(2) the same thing is true of ajm46, on ttyp6.

This is a reasonably reproducable situation. The idle time is wrong
from the appearance of the xterm, and is correct once something has
been typed at it.

Could the maintainer please have a look at how idle times are
calculated ?

[I suspect that the idle time is taken as the atime on the /dev/ttyp??
devices, but maybe they're not being updated during the login
sequence, so that the idle time is really the time since that tty was
last used.  Of course, as soon as the user uses the shell, the idle
time is correct.]


Reply to: