ftp.nice.ch/pub/next/unix/admin/top.0.3.s.tar.gz#/top-src/machine/m_next32.man

This is m_next32.man in view mode; [Download] [Up]

.SH "NEXTSTEP DIFFERENCES"
NEXTSTEP v.0.3 of TOP  -  2/14/1996 tpugh
The NEXTSTEP port includes reports on the number of threads per process
which appears under the heading "THR".

The field "%WCPU" has been removed until we can figure out how to calculate the weighted CPU time with the given process information.

Memory statistics show the total RAM for the system, and the number of active,
inactive, wired, and free Mach virtual memory pages (in bytes).  Also shown 
is the number of bytes moving into and out of virtual memory. 

The NEXTSTEP port was written by Tim Pugh <tpugh@oce.orst.edu>.

COMPATIBILITY - next32
This is the machine-dependent module for NEXTSTEP v3.x
Reported to work for NEXTSTEP v3.0, v3.2, and v3.3 Mach OS:
	NEXTSTEP v3.0 on Motorola machines.
	NEXTSTEP v3.2 on Intel and Motorola machines.
	NEXTSTEP v3.3 on Intel and Motorola machines.
Problem with command column for (Choose next40 for fix):
	NEXTSTEP v3.2 on HP machines.
	NEXTSTEP v3.3 on HP and Sparc machines.
Has not been tested for NEXTSTEP v2.x machines, although it should work.
Has not been tested for NEXTSTEP v3.1 machines, although it should work.

COMPATIBILITY - next40
This is the machine-dependent module for NEXTSTEP v3.x/4.x
Reported to work for:
	NEXTSTEP v3.2 on HP machines.
	NEXTSTEP v3.3 on HP and Sparc machines.
Has not been tested for NEXTSTEP v4.0 machines, although it should work.


HISTORY
*  9/8/95  tpugh.  Removed the %WCPU field, no support for it.
*  9/8/95  tpugh.  Removed all C++ style comments from machine.c to be
ANSI C compatible.
* 2/13/96 tpugh.  Fixed command name display problem for hppa and sparc
machines,and NS4.0 alpha machines.  NeXT changed the task structure, so 
top could not find utask structure.  <mach/task.h> is not shipped with 
any NEXTSTEP system.
* 2/14/96 tpugh.  Reduced line length to less than 80 columns.  Some commands
are long and will extend beyond 80 colums.
* 2/14/96 tpugh.  Fixed "top -U" fails with bus error.  In special cases 
where only a specific user is displayed, the process index variable was 
being improperly advanced, resulting in zero process address values 
and bus errors.
* 2/14/96 tpugh.  Eliminated the text artifacts in the command column.

FREQUENTLY ASKED QUESTIONS
#1:  top 3.3 (after configuring for next32 with all defaults) on my i386 
running NEXTSTEP 3.3, I get:  Error calling task_by_unix_pid(): failure(5)

Answer:
The call is failing because you do not have permission.  You must be the superuser, root, or the program must have root privileges to work properly.  It's been reported that setting the group sticky bit for kmem does not work, and the fix is to set the user sticky bit for root.  So install "top" with the permissions 4755.

As root, do the following:

tsunami# chown root.kmem top
tsunami# chmod 4755 top
tsunami# ls -lg top
-rwsr-xr-x  1 root     kmem      121408 Sep  1 10:14 top*

With the kmem group sticky bit set, we can read kernal memory without problems, but to communicate with the Mach kernal for task and thread info, it requires root privileges.


#2:  How to compile top to create a multiple binary file or FAT?

Answer:
Added the -arch flags.  Due to the task.h file differences between (m68k,Intel) and (sparc,hppa) NEXTSTEP operating systems, a single binary file can be generated, except for NS4.0 machines.

Change line 64 to:
CFLAGS = -DSHOW_UTT -arch m68k -arch i386 -arch hppa -arch sparc $(CDEFS)

Added $(CFLAGS).  Change line 79 to:
	$(CC) $(CFLAGS) -o top $(OBJS) -ltermcap -lm $(LIBS)

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.