(SUMMARY ??)w (output info)wrong

From: Tru64 User <tru64user_at_yahoo.com>
Date: Tue, 28 Nov 2000 07:50:59 -0800 (PST)

I received three very good responses, but
unfortunately I was not able to deduce the information
to help myself in this case, so I am posting this
again with more information, and the attached
information below. I will highly appreciate any new
ideas, otherwise, this should be taken as the summary
of responses.
The only reason I am concerned about the output from
"w" is becuase I was running idled command to log off
users who are idle for more that 60minutes. I only run
it from 6:00pm to 6:00am and on weekends.
Now, when it gets to 6:00pm, whoever "w" is reporting
wrong information on gets kicked off, almost
immediately. Even though the warning is set to
30minutes. I have currently disabled idled, and am
looking for a better solution to killing idle users.
Here is another example from today, just logged in,
shows 7 days idle. If I log out, log in as root, user
mollel is nowhere to be seen:
janus_at_/usr0/users/mollel$ w
10:37 up 11 days, 2:43, 52 users, load average:
1.65, 0.66, 0.60
User tty from login_at_ idle
JCPU PCPU what
schubert p1 variance:0 07:26 18:50
9:14 -tcsh
mollel sky:0 sky:0 08:59 7days
           /usr/sbin/get

mollel pe sky:0.0 08:59
 58 57 w
augustin pf ox:0.0 09:01 40
       

Anymore input will be highly appreciated.

Dr. Thomas Blinn wrote:
****************************************************
There are several possibilities. Start by verifying
that your
/var/adm/utmp
file is getting updated correctly on logout/login
(since that is where
the
"w" command gets the data it displays, as documented
in the reference
page).

Since you didn't indicate any relevant information
like what version of
the
system software you are running, it's hard to check
for known bugs.
There
have been bugs in some of the "accounting" related
utilities from time
to
time. The format of some of the files has changed
over time, and using
an
up to date utility with an out of date file format, or
vice versa,
could
lead to display problems. These changes have been
documented in
release
notes as they have occurred, and there have been
utilities delivered
that
should have run to convert the files when it made
sense to do so, but
I'd
have to go back and check all the release notes to
understand just when
the file format changes occurred and whether in some
cases the fix for
the
older file formats was to delete some of the files and
reboot. Often,
if
you remove the /var/adm/utmp file and then recreate it
as an empty file
and
reboot, all sorts of problems just "go away".

I am not going to try to tell you there is nothing
wrong or that what
you
report isn't happening, but I can tell you I've never
seen it happen on
my
systems running V4.0G or V5.1. But, they are all
running as clean
installs
of the relevant versions, not systems updated from
older versions that
may
have had incompatible file formats.

Tom
 
 Dr. Thomas P. Blinn + UNIX Software Group + Compaq
Computer
Corporation
  110 Spit Brook Road, MS ZKO3-2/W17 Nashua, New
Hampshire 03062-2698
   Technology Partnership Engineering Phone:
 (603) 884-0646
    Internet: tpb_at_zk3.dec.com Compaq's
Easynet: alpha::tpb
     ACM Member: tpblinn_at_acm.org PC_at_Home:
tom_at_felines.mv.net


[{My question here is: Do I just perform a simple rm
on utmp? How do I get it recreate itself? Can it be
done without a system shutdown? }]


*********************************************************
Robert Mully wrote:

I'm sure people have responded to you but as you
haven't posted a summary yet then I will give my
answer. In this case w
is giving the correct information. If you look at your
list of users currently logged on:

11:49 up 7 days, 3:55, 12 users, load average:
0.00, 0.00, 0.03
User tty from login_at_ idle
JCPU PCPU what
jwaldrop p1 nino:0.0 08:49 3:00
  1 1 /bin/X11/colo
mollel sky:0 sky:0 10:31 3days
           /usr/sbin/get
sarith p2 nsipp04:0.0 10:28 6
 47 2 xemacs catchm

sarith nsipp04:0 nsipp04:0 10:27 3days

jwaldrop nino:0 nino:0 08:48 3days
           /usr/sbin/get
jwaldrop p8 nino:0.0 08:49 10
           /bin/X11/colo
mollel pb sky:0.0 10:32
3:06 2:19 w
mkistler quetzalcoa quetzalcoatl:0 14:34 2days
           /usr/sbin/get

Do you notice that mollel is logged on twice. One of
the sessions (should be in bold) is the session that
you logged on and
issued the "w" command with. Thus the w at the end of
the line. The other mollel session is an open
connection that has
been idle for three days. Either you have another
session open somewhere or that terminal emulator lost
connection. So
to conclude the w command is correct.

Robert Mulley
Unix Admin

[{My comments: When I log out, log back in as root, I
do not see user "mollel" logged in or idle anywhere.
but as soon as I log back in as mollel, w shows mollel
idle for 3days. Then idled, or any other script in
this case that uses w, will kill the user "mollel" }]



*******************************************************

Tom Payerle wrote:


The w (and I believe who) commands both use the wtmp
> database, which can
> often get corrupted. As it really isn't used for
> anything else, is not
> a big deal. (Basically, everytime you log in an
> entry made in wtmp database,
> which is supposed to get updated when you log out.
> If you don't log out
> properly, e.g. network problems kill a telnet
> session, the logout update
> might not occur, and w command will think you are
> still logged in, and idle.
> As there is no process attached to the wtmp entry,
> no resources are really
> being consumed.)
>
> I believe some systems have a command to clean up
> wtmp file, or maybe can
> download something. OTherwise, live with it until
> next reboot (at reboot
> time, the system KNOWS everyone is logged off, and
> so wtmp problem is fixed)
> Tom Payerle
> Dept of Physics payerle_at_physics.umd.edu
> University of Maryland (301) 405-6973
> College Park, MD 20742-4111 Fax: (301) 314-9525


{My response: Is there a way to safely reset/recreate
this wtmp/utmp file without a system shutdown?}]
******************************************************

=====
Richard F. MollelExperience is what allows you to recognize a mistake the second time you make it.

__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/
Received on Tue Nov 28 2000 - 15:52:39 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:41 NZDT