From: stuart@coral.cs.jcu.edu.au (Stuart Kemp)
Subject: Re: How do I get rid of these idle entries?
Date: 5 May 94 03:31:55 GMT [thread overview]
Message-ID: <stuart.768108715@coral> (raw)
In-Reply-To: 2pjpsv$p0q@pdq.coe.montana.edu
In <2pjpsv$p0q@pdq.coe.montana.edu> osyjm@cs.montana.edu (Jaye Mathisen) writes:
>I don't like these idle 8000+ days crap... What's the proper solution?
>13:25 up 2 days, 17 mins, 21 users, load average: 0.20, 0.06, 0.07
>User tty from login@ idle JCPU PCPU what
>sandy 0q 12:57 18 1 -csh
>venky 0e 13:23 trn
>starkey p6 aji 14:15 6 29 2 trn -xms
>starkey aji 14:15 8882days -
>harkin pa sente 07:58 4 12 1 -csh
You don't easily get rid of them ... rather there is a bug in the 'w'
(and 'f') programs.
These entries in /usr/adm/utmp are made by 'xdm' when a user logs in from
an xterminal; they do not represent an actual shell.
Each entry in this above file has a field called 'ut_line' which normally is
the tty line used by that particular user. Now, the 'w' program uses the
ut_line field in order to get the idle-time (uses it to make a string e.g.
"/dev/ttyp6", then does a stat() call on it); however, xdm has put the name
of the xterminal in this field (e.g. "aji" for the "starkey" entry above).
Thus, 'w' looks for a file "/dev/aji...." now, I don't have source, so I can
only guess that 'w' does NOT check the return-value of this stat() call,
but proceeds as if it had worked. It then uses one of the fields in the
stat-struct to get the idle-time. In the cases where the call actually
failed, the field that it uses has a value of 0.
BUT! this value represents the number of seconds that have elapsed since
01 Jan 1970, since this /dev entry was last used ... thus the 8882 days ago.
You will see that this field increases daily.
Problem is still present is OSF 2.0
-SRK
--
Dept of Computer Science Internet: stuart@cs.jcu.edu.au
James Cook University
Townsville Tel: +61 77 814992
Qld 4811 Australia FAX: +61 77 814029
prev parent reply other threads:[~1994-05-05 3:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-04-26 19:26 How do I get rid of these idle entries? Jaye Mathisen
1994-05-05 3:31 ` Stuart Kemp [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox