This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 2296 - w reports wrong idle times
w reports wrong idle times
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: procps (Show other bugs)
6.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-04-20 18:53 EDT by seti
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-07-29 18:00:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description seti 1999-04-20 18:53:03 EDT
Idle times for remote users are reported wrongly and they
don't match up with finger. eg.

finger:
Login     Name      Tty  Idle  Login Time   Office
Office Phone
seti                  pt        Apr 21 08:34
(elan.maths.monash.edu.au)

w:
USER     TTY      FROM              LOGIN@   IDLE   JCPU
PCPU  WHAT
seti      pts/0    elan.maths.monas  8:34am  4:40m 38.33s
0.01s  w

w shows 4:40minutes of idle time wheras finger shows zero
(the correct value). w gets hours and seconds screwed up
as well I think.

This has happened on all i386 platforms that I've tried.
Comment 1 rob 1999-04-23 19:17:59 EDT
$ w
  6:12pm  up 5 days, 23:47,  2 users,  load average: 0.20, 0.14, 0.10
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU  WHAT
rob      tty1                       5:38pm 29.00s  2:05   0.07s  -bash
root     tty2                       6:11pm 34.00s  0.14s  0.05s  -bash
$ finger
Login     Name               Tty  Idle  Login Time   Office     Office
Phone
rob       Robert W. Current   1         Apr 23 17:38
root      root               *2         Apr 23 18:11
$

Mine shows exactly what your reporting, ALTHOUGH, I don't believe w is
showing an incorrect idle time, it is just reporting times from
console.  If your in X, it's likely that w isn't picking up the
actions you do in an xterm.  Try to look at them from console.

eg:
[rob@water rob]$ w
  6:15pm  up 5 days, 23:50,  2 users,  load average: 0.01, 0.07, 0.08
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU  WHAT
rob      tty1                       5:38pm  0.00s  2:08   0.01s
script times
root     tty2                       6:11pm  3:24   0.14s  0.05s  -bash
[rob@water rob]$ finger
Login     Name               Tty  Idle  Login Time   Office     Office
Phone
rob       Robert W. Current   1         Apr 23 17:38
root      root               *2      3  Apr 23 18:11
[rob@water rob]$

Which appears correctly.  So, it looks like something to do with
what's going on in X (don't know about telnet, maybe that acts like X
also).  But, they are working correctly from console.

Don't know if it's any help, but at least it's more specific.
Comment 2 Michael K. Johnson 1999-07-29 18:00:59 EDT
Rob appears to be right.

Note You need to log in before you can comment on or make changes to this bug.