[9083] | 1 | .SH "NEXTSTEP DIFFERENCES" |
---|
| 2 | NEXTSTEP v.0.4 of TOP - 2/22/1996 tpugh |
---|
| 3 | .br |
---|
| 4 | The NEXTSTEP port includes reports on the number of threads per process which appears under the heading "THR". |
---|
| 5 | .PP |
---|
| 6 | The field "%WCPU" has been removed until we can figure out how to calculate the weighted CPU time with the given process information. |
---|
| 7 | .PP |
---|
| 8 | 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. |
---|
| 9 | .PP |
---|
| 10 | The NEXTSTEP port was written by Tim Pugh <tpugh@oce.orst.edu>. |
---|
| 11 | .PP |
---|
| 12 | .SH COMPATIBILITY - next32 |
---|
| 13 | .br |
---|
| 14 | This is the machine-dependent module for NEXTSTEP v3.x |
---|
| 15 | .br |
---|
| 16 | Reported to work for NEXTSTEP v3.0, v3.2, and v3.3 Mach OS: |
---|
| 17 | .br |
---|
| 18 | NEXTSTEP v3.0 on Motorola machines. |
---|
| 19 | .br |
---|
| 20 | NEXTSTEP v3.2 on Intel and Motorola machines. |
---|
| 21 | .br |
---|
| 22 | NEXTSTEP v3.3 on Intel and Motorola machines. |
---|
| 23 | .br |
---|
| 24 | Problem with command column for (Choose next40 for fix): |
---|
| 25 | .br |
---|
| 26 | NEXTSTEP v3.2 on HP machines. |
---|
| 27 | .br |
---|
| 28 | NEXTSTEP v3.3 on HP and Sparc machines. |
---|
| 29 | .br |
---|
| 30 | Has not been tested for NEXTSTEP v2.x machines, although it should work. |
---|
| 31 | .br |
---|
| 32 | Has not been tested for NEXTSTEP v3.1 machines, although it should work. |
---|
| 33 | .PP |
---|
| 34 | .SH COMPATIBILITY - next40 |
---|
| 35 | .br |
---|
| 36 | This is the machine-dependent module for NEXTSTEP v3.x/4.x |
---|
| 37 | .br |
---|
| 38 | Reported to work for: |
---|
| 39 | .br |
---|
| 40 | NEXTSTEP v3.2 on HP machines. |
---|
| 41 | .br |
---|
| 42 | NEXTSTEP v3.3 on HP and Sparc machines. |
---|
| 43 | .br |
---|
| 44 | Has not been tested for NEXTSTEP v4.0 machines, although it should work. |
---|
| 45 | .PP |
---|
| 46 | .SH HISTORY |
---|
| 47 | .br |
---|
| 48 | * 9/8/95 tpugh. Removed the %WCPU field, no support for it. |
---|
| 49 | .br |
---|
| 50 | * 9/8/95 tpugh. Removed all C++ style comments from machine.c to be |
---|
| 51 | ANSI C compatible. |
---|
| 52 | .br |
---|
| 53 | * 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. |
---|
| 54 | .br |
---|
| 55 | * 2/14/96 tpugh. Reduced line length to less than 80 columns. Some commands are long and will extend beyond 80 colums. |
---|
| 56 | .br |
---|
| 57 | * 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 invalid process addresses and bus errors. |
---|
| 58 | .br |
---|
| 59 | * 2/14/96 tpugh. Eliminated the text artifact in the command column. |
---|
| 60 | .br |
---|
| 61 | * 2/22/96 tpugh. Fixed problem with quiting the program. When quiting the program, a message "nobody" was printed and the cursor was not placed at the bottom of the screen. The hash_table was corrupting memory when hashit(uid=-2) = -2 or any negative number. |
---|
| 62 | .br |
---|
| 63 | * 2/22/96 tpugh. Fixed incorrect load average display. Incorrect scaling of the kernel load average fixed-point values. |
---|
| 64 | .PP |
---|
| 65 | .SH FREQUENTLY ASKED QUESTIONS |
---|
| 66 | .br |
---|
| 67 | #1: top 3.3 (after configuring for next32 with all defaults) on my i386 running NEXTSTEP 3.3, I get: |
---|
| 68 | .br |
---|
| 69 | Error calling task_by_unix_pid(): failure(5) |
---|
| 70 | .PP |
---|
| 71 | Answer: |
---|
| 72 | .br |
---|
| 73 | The call is failing due to TOP file permission problems. The user must be the superuser, root, or the program must have root privileges to work properly. So install "top" with the permissions 4755. Setting the group sticky bit for kmem does not work, because TOP needs to communicate with the Mach kernal for task and thread info, which requires root privileges. |
---|
| 74 | .PP |
---|
| 75 | As root, do the following: |
---|
| 76 | .br |
---|
| 77 | hostname# chown root.kmem top |
---|
| 78 | .br |
---|
| 79 | hostname# chmod 4755 top |
---|
| 80 | .br |
---|
| 81 | hostname# ls -lg top |
---|
| 82 | .br |
---|
| 83 | -rwsr-xr-x 1 root kmem 121408 Sep 1 10:14 top* |
---|
| 84 | .PP |
---|
| 85 | #2: How to compile top to create a multiple architecture binary file? |
---|
| 86 | .PP |
---|
| 87 | Answer: |
---|
| 88 | .br |
---|
| 89 | Add the -arch flags to the Makefile. Due to the task.h file differences between (m68k,Intel) and (sparc,hppa) NEXTSTEP 3.x operating systems, a single binary file can not be generated. |
---|
| 90 | .br |
---|
| 91 | Change line 61 to: |
---|
| 92 | .br |
---|
| 93 | CDEFS = -O -arch m68k -arch i386 -arch hppa -arch sparc |
---|
| 94 | .PP |
---|
| 95 | Add $(CFLAGS) to link command. Change line 79 to: |
---|
| 96 | .br |
---|
| 97 | $(CC) $(CFLAGS) -o top $(OBJS) -ltermcap -lm $(LIBS) |
---|
| 98 | .PP |
---|
| 99 | #3: I installed 'top' chmod 4711, chown root.kmem, but cannot use the '-q' |
---|
| 100 | flag unless I am logged in as 'root' |
---|
| 101 | .br |
---|
| 102 | "top: warning: `-q' option can only be used by root" |
---|
| 103 | .br |
---|
| 104 | This seems to indicate that the setuid to root isn't being recognized |
---|
| 105 | correctly. |
---|
| 106 | .PP |
---|
| 107 | Answer: |
---|
| 108 | .br |
---|
| 109 | In order to run top with the "-q" command, top currently requires the user to be logged in a root because top checks the uid of the user logged in, not the effective uid of the file. Why? To not allow regular users to swamp the system with a high-priority process. Imagine what a regular user could do with "top -q -s0 all"! |
---|
| 110 | .PP |
---|