I'm getting bad behaviour from the "w" command included in procps
v0.99. I am running Linux v1.3.59, kernel compiled as a.out with Elf
support, the elf libraries installed and working. I wasn't able to
get the procps source code to compile (even after tinkering with where
it was looking for various include files), and ended up using the
included binary. My best guess is that somehow it is failing to read
utmp properly, but what it actually IS doing is well beyond me.
Symptoms are as follows:
Displays the username of the first person to log in at each
console (NOT on the incoming lines, which are completely ignored).
After those initial logins and logouts, the JCPU, PCPU and What fields
are left blank. Idle time is kept track of properly on each console.
I browsed through /etc/utmp (linked to /var/log/utmp) by hand and
found the correct names and terminals there. Floating through the
other files, I was unable to find a recent occurence of one of the
names that were listed by "w". I'm still trying to figure out where
it stored them.
Included below is the output of a "w", "finger" and "ps" all done
in quick succession, so you can get an idea of what's going on. Note
also that the username "kienna" didn't show up in a grep through
either utmp or lastlog. Anyone have any idea? Anyone else manage to
get it to do the same thing?
=========================================================================== Results of "w": 12:16am up 6:29, 4 users, load average: 0.16, 0.07, 0.07 Results of "ps" (account "zed"): PID TTY STAT TIME COMMAND Results of "finger": Login Name Tty Idle Login Time Office Office Phone =========================================================================== ===========================================================================
kienna tty1 Sun11am -
zed tty3 12:52pm 11 -
root tty5 4:07pm 5 -
kienna tty2 3:08pm 32 -
3148 4 S 0:00 -tcsh
3394 1 S 0:01 -tcsh
3461 4 S 0:01 playmidi -f hangar18.mid
3473 1 R 0:01 ps
innana Christy Johnson p1 Jan 28 23:27 [ b63381.STUDENT.C ]
root root 5 5 Jan 28 23:49
zed Zed C. Pobre 4 1 Jan 29 00:14 b65201
zed Zed C. Pobre 1 Jan 29 00:06 b65201
---------------------------------------------------------------------------