procps "w" command failing (1.3.59, procps 0.99)

procps "w" command failing (1.3.59, procps 0.99)

Post by Zed C. Pob » Tue, 30 Jan 1996 04:00:00



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

kienna   tty1     Sun11am                      -
zed      tty3     12:52pm    11                -
root     tty5      4:07pm     5                -
kienna   tty2      3:08pm    32                -

Results of "ps" (account "zed"):

  PID TTY STAT  TIME COMMAND
 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

Results of "finger":

Login    Name                 Tty  Idle  Login Time   Office     Office Phone
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    

=============================================================================

=============================================================================

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

 
 
 

procps "w" command failing (1.3.59, procps 0.99)

Post by John Garn » Thu, 01 Feb 1996 04:00:00



Quote:> 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:

Yup, got the same problem on this side: I got a P100 32 meg w/ an adaptec 2940
SCSI and a 3Com Elink3 card. Same problem... I first discovered it by
trying to run 'top' and geting the following error:

 9:21pm  up 26 min,  1 user,  load average: 0.00, 0.00, 0.00
40 processes: 38 sleeping, 1 running, 1 zombie, 0 stopped
CPU states:  2.7% user,  6.3% system,  9.0% nice, 91.0% idle
Mem:      0K av,     0K used,     0K free,     0K shrd,     0K buff
Swap:     0K av,     0K used,     0K free

Floating exception
mitnick:~>

I checked the output of the w command and got the same results as Zed...

Glad to know that i aint the only out there... granted, its not a critical
bug  (at least not yet) but i would love to know if there is a fix... 1.3.60??

john garner


 
 
 

procps "w" command failing (1.3.59, procps 0.99)

Post by Craig McNi » Thu, 01 Feb 1996 04:00:00




>> 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:

>Yup, got the same problem on this side: I got a P100 32 meg w/ an adaptec
2940
>SCSI and a 3Com Elink3 card. Same problem... I first discovered it by
>trying to run 'top' and geting the following error:

> 9:21pm  up 26 min,  1 user,  load average: 0.00, 0.00, 0.00
>40 processes: 38 sleeping, 1 running, 1 zombie, 0 stopped
>CPU states:  2.7% user,  6.3% system,  9.0% nice, 91.0% idle
>Mem:      0K av,     0K used,     0K free,     0K shrd,     0K buff
>Swap:     0K av,     0K used,     0K free

>Floating exception
>mitnick:~>

>I checked the output of the w command and got the same results as Zed...

>Glad to know that i aint the only out there... granted, its not a critical
>bug  (at least not yet) but i would love to know if there is a fix...
1.3.60??

>john garner


The utilities that come in the procps package read /proc/meminfo for the
memory information.  There was a change in meminfo in the recent past (kernel
version unknown).  A new field was added 'cached' which threw off the parsing
of the meminfo file.  If you have the source look for an sscanf in top,w,..
that reads this file and the solution will be obvious.

Good Luck,
Craig McNiel
DBA - NCS

 
 
 

1. Problems compiling procps 0.99

  >
  > Hello,
  >
  > . . . I had to get a new version ob procps (the version
  > I ftpd is 0.99). . .  
  > to compile the sources on my system. This did not work. What I got was
  > as follows (I use gcc V2.7.0 at the moment ):
  >
  > gcc -O4 -I. -Wall -c ps.c
  > /usr/include/asm/string.h: In function `strtok':
  > In file included from ps.c:29:
  > /usr/include/asm/string.h:346: `___strtok' undeclared (first use this function)
  > /usr/include/asm/string.h:346: (Each undeclared identifier is reported only once
  > /usr/include/asm/string.h:346: for each function it appears in.)
  > make: *** [ps.o] Error 1

Yes. I have been troubled with exactly the same problem for more than
a week.  The very problem associated with ___strtok can be overcome,
but there wait other errors.  So many errors.
I have several times posted help myself and some other people did,
too.  But no answer exists, yet.  Incredible! :(

  >
  > Do I have to use gcc 2.7.2
  > instead of 2.7.0 ?
I have tried both with gcc-2.7.0 and gcc-2.7.2.
Not such a sort problem, I think.

  >
  > Thanks for any help
  > Rainer

-- wiz

2. Updating Driver/Make

3. Does RH5.0 have a umsdos install option?

4. procps 0.99 problem

5. Help Help

6. procps 2.x vs. procps 3.x

7. DDIF file info

8. procps-208-20020915 against Rik van Riel's procps-207-20020913

9. 1.3.59 Compilation

10. IDE CD-ROM with 386sx running 1.3.59

11. URGENT -- Problems running White Pine CU-SeeMe Reflector 2.0.1 and Linux 1.3.59

12. Apache httpd zombies with kernel > 1.3.59