[SuSE Linux] "w" reports incorrect IDLE time
Hi, everyone I noticed an interesting thing with the w command: -----------start of example--------------------- alexm@quake:/home/alexm > w 8:45am up 2 days, 19:54, 8 users, load average: 1.96, 0.48, 0.16 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT yevik tty1 8:44am 38.00s 11.19s 0.06s sh /usr/X11R6/b alexm ttyp0 192.35.232.13 7:18am 0.00s 0.50s 0.17s w masha ttyp1 129.116.232.137 7:23am 4:02 0.18s 0.18s -bash yevik ttyp2 :0.0 8:44am 1:00m 0.13s 0.13s -bash yevik ttyp3 :0.0 8:44am 24:11m 0.14s 0.14s -bash yevik ttyp4 :0.0 8:44am 24:45m 0.10s 0.10s -bash yevik ttyp5 :0.0 8:44am 24:49m 0.16s 0.16s -bash yevik ttyp6 :0.0 8:44am 23days 0.15s 0.15s -bash alexm@quake:/home/alexm > -------------end of example--------------------------------- As you can see from this example, this machine was up for 2 days, 19 h 54min, but there is a user "yevik" on ttyp6 that was idle for 23days. Moreover, this user logged in less than a minute before I ran this command (you can see that from the example as well). For more information the user yevik started KDE at the console. Does anybody know where this incorrect info comes from? -alexm - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <A HREF="http://www.suse.com/Support/Doku/FAQ/"><A HREF="http://www.suse.com/Support/Doku/FAQ/</A">http://www.suse.com/Support/Doku/FAQ/</A</A>> and the archiv at <A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html"><A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html</A">http://www.suse.com/Mailinglists/suse-linux-e/index.html</A</A>>
As you can see from this example, this machine was up for 2 days, 19 h 54min, but there is a user "yevik" on ttyp6 that was idle for 23days. Moreover, this user logged in less than a minute before I ran this command (you can see that from the example as well). For more information the user yevik started KDE at the console.
Not sure but it might be due to the the fact that "kvt" (the KDE terminal) is broken (KDE 1.0, SuSE 6.0 for sure; others I don't know). When starting up "kvt" it gives more or less random initial idle times. They disappear after the first key is pressed in the terminal. What's worse is that kvt has another bug in that it doesn't remove it's "wtmp" entry when being killed by a KDE shutdown, i.e. a "who" after exiting KDE lists the user as still being logged in on all the kvt's he/she had open. I have a patch for kvt that solves both problems. If anyone is interested I can send it over but it's probably easier to just wait for KDE 1.1 which (supposedly?) will have a kvt replacement or at least a newer kvt version... Andreas - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <A HREF="http://www.suse.com/Support/Doku/FAQ/"><A HREF="http://www.suse.com/Support/Doku/FAQ/</A">http://www.suse.com/Support/Doku/FAQ/</A</A>> and the archiv at <A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html"><A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html</A">http://www.suse.com/Mailinglists/suse-linux-e/index.html</A</A>>
On Wed, 10 Feb 1999, Andreas Gerstlauer wrote:
As you can see from this example, this machine was up for 2 days, 19 h 54min, but there is a user "yevik" on ttyp6 that was idle for 23days. Moreover, this user logged in less than a minute before I ran this command (you can see that from the example as well). For more information the user yevik started KDE at the console.
Not sure but it might be due to the the fact that "kvt" (the KDE terminal) is broken (KDE 1.0, SuSE 6.0 for sure; others I don't know). When starting up "kvt" it gives more or less random initial idle times. They disappear after the first key is pressed in the terminal. What's worse is that kvt has another bug in that it doesn't remove it's "wtmp" entry when being killed by a KDE shutdown, i.e. a "who" after exiting KDE lists the user as still being logged in on all the kvt's he/she had open.
Isn't this the wtmp problem that Lenz mentioned yesterday? I had the same thing. A quick # cat /dev/null > /var/log/wtmp as suggested by Lenz fixed it. Phil -- Philip Stokes Email: phil@stokes.demon.co.uk Fax: +44 (0)870 164 1242 - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e Check out the SuSE-FAQ at <A HREF="http://www.suse.com/Support/Doku/FAQ/"><A HREF="http://www.suse.com/Support/Doku/FAQ/</A">http://www.suse.com/Support/Doku/FAQ/</A</A>> and the archiv at <A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html"><A HREF="http://www.suse.com/Mailinglists/suse-linux-e/index.html</A">http://www.suse.com/Mailinglists/suse-linux-e/index.html</A</A>>
participants (3)
-
alexm@quake.tx.symbio.net
-
andreas@gerstlauer.de
-
phil@stokes.demon.co.uk