[comp.unix.ultrix] porting TOP to ultrix 4.0

veltkamp@cpac.washington.edu (Dave Veltkamp) (12/20/90)

Has anyone ported the *top* program to ultrix 4.0??  We have the
sources and it works under 3.x but gives the error

	cp_time not a symbol in vmunix

when run on 4.0.  I looked around a bit and found that there is a
symbol "cptime" in several of the objects which are linked to form the
vmunix but grep cannot find it in the vmunix itself..(?)

Anyone done this already (or know what the cp_time symbol's
counterpart would be in 4.0)?

Thanks
Dave Veltkamp

veltkamp@cpac.washington.edu

mogul@wrl.dec.com (Jeffrey Mogul) (01/01/91)

In article <VELTKAMP.90Dec19192643@bailey.cpac.washington.edu> veltkamp@cpac.washington.edu (Dave Veltkamp) writes:

>Has anyone ported the *top* program to ultrix 4.0??

Get gatekeeper.dec.com:pub/DEC/top.tar.Z ... Last I checked, this
worked on Ultrix 3.0 and later, both Vax and RISC.

>We have the sources and it works under 3.x but gives the error
>
>	cp_time not a symbol in vmunix
>
>when run on 4.0.  I looked around a bit and found that there is a
>symbol "cptime" in several of the objects which are linked to form the
>vmunix but grep cannot find it in the vmunix itself..(?)

Hmm ... I couldn't find "cp_time" (or "cptime") in any of the object
modules at all.  (I did find "tcp_timers".)

>Anyone done this already (or know what the cp_time symbol's
>counterpart would be in 4.0)?

Since 4.0 introduced "symmetric multiprocessing" (SMP), the various
bits of information about the CPU state that used to be scattered
around in random global variables have now been gathered together
into a structure, which can then be replicated per-CPU.  See
/usr/include/sys/cpudata.h for more details.  Note that there are
a number of other changes between Ultrix 3.1 and Ultrix 4.0, so
porting "top" or similar programs isn't just a matter of changing
a few names.

-Jeff