SUMMARY: Garbage output w/ "w" command

From: Gary Richardson (gpr@proteon.com)
Date: Wed Feb 12 1992 - 19:00:59 CST


My original message:

>
>
> Hi everyone,
>
> For the past couple of months I've noticed that the output of the "w"
> command will become garbled:
>
> {sonny.proteon.com:56} w
> 11:04am up 1 day, 2:48, 13 users, load average: 0.21, 0.14, 0.35
> User tty login@ idle JCPU PCPU what
> console 31Dec69 14 -
> ccl ttyp0 6:38pm 14:49 16 1 -sh
> tty1e 31Dec69 14 -
> mlr ttyp6 8:38am 2:25 -sh
> axm ttypa 10:16am 10 14 2 -csh
> pjm ttypc 10:06am 33 23 1 -csh
> dmw ttype 5:41pm 16:45 33 3 -csh
> wfr ttyq1 10:47am 8 2:41 -csh
> X 1:01pm8068days -
> ttyp5 31Dec69 14 -
> ttyp6 31Dec69 14 -
> ttyp7 1:21pm 14 -
> ttyp8 31Dec69 14 -
> {sonny.proteon.com:57}
>
>
> A reboot will fix the problem, but within a day or so, it becomes garbled
> again. This causes a problem with using the "wall" command and just
> for me being able to check to see who's logged in and so forth. The
> system itself seems to be running fine, it's just this one problem I'm
> noticing.
>
> This is from a 3/280 running SunOS 3.5.
>
> Am I dealing with something trashed in the kernal or is this just a
> "feature" ;) of 3.5 that is arising on me? Or something else? :-)
>
>
> Thanks
>
> -Gary
>

And the responses (thanks to all who responded):

-------------------

From: Travis L Priest <travis@cs.odu.edu>
we occasionally get that problem here, and for us it seems to be
entries in the /etc/utmp that have not been cleared when the user
exits. i've never seen one with the console before, but usually if an
xterm or shelltool exits before cleaning up its entries then 'w' will
report a user logged in but no processes being run for that user.
also, you will probably not be able to log onto any of those ttys
until the entries are cleared out (try it to make sure -- i believe
the console would be an exception to that).

to fix it, you might want to take a look at what process are writing
to your utmps and seeing why they might be abnormally dieing all of
the time.

-------------------------

From: "Ric Anderson" <ric@cs.arizona.edu>
I suspect you have one or processes that don't clean up /etc/utmp
which is what "w" keys off of. the "-" indicates no shell active,
which usually means something exitied and left a stray utmp entry.
using
        ps -t1e
would let you check for procs on tty1e. If you find none, then
use "viutmp" (available from archive sites) to clean out the
bogus utmp entry. Possibly xterm (which updates utmp, depending
on compile options) is doing this.

Ric (<ric@cs.arizona.edu> "Ric Anderson")

----------------------

From: "John D. Barlow" <John.D.Barlow@arp.anu.edu.au>
I don't suppose it could be security related with
someone adding stuff to /etc/utmp ?

Just a thought - you might want to check up on this.

---------------------

From: paulo%dcc.unicamp.ansp.br@UICVM.UIC.EDU (Paulo L. de Geus)
I would suggest doing a fsck on /usr to see if it's OK (you didn't
mention anything in your msg). I've already had garbled command
outputs like that, but it was a problem with NIS, can't recall the
relation I'm afraid.

-------------------------------

From: Mike Raffety <miker@sbcoc.com>
Are you running this on an ASCII terminal? Perhaps you have a
handshaking problem (XON/XOFF, CTS/RTS, etc.). Does similar
garbling appear when you "cat" a long (100-200 lines) file?

This is NOT normal behavior for SunOS 3.5, Sun-3/280 or otherwise.

Please be sure to summarize back to the list; thanks.

-------------------------

From: stern@sunne.East.Sun.COM (Hal Stern - NE Area Systems Engineer)
old, old bug in 3.5 that causes ptty entries to be
left in the utmp file after you shut down sunview
or log out on a ptty.

-------------------------------

From: eckhard@ikarus.ts.go.dlr.de (Eckhard Rueggeberg)
No, that is no feature of 3.5, it is a feature in every OS version I've seen so
far (4.0.3,4.1,4.1.1,4.1.2), and it is because w only scans /etc/utmp, and that
file is not updated properly when the shells exit.

---------------------------

From: Stefan Mochnacki <stefan@centaur.astro.utoronto.ca>
Welcome to the wonderful world of ZOMBIES !

This problem persists well into 4.x.y.

You need the appropriate patches. Your problem is not quite like the
one I am more familiar with, which involves serial ports (especially
ALM boards). Do your zombies prevent logins ? If not, are they
apparently harmless (other than esthetically displeasing) ?



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:36 CDT