FAQ revision 89750
1                             TOP
2                          Version 3.5
3		        Beta Release 11
4
5                       William LeFebvre
6		  with much help from others
7
8
9FREQUENTLY ASKED QUESTIONS AND THEIR ANSWERS
10
11This FAQ is broken out in to several topics.
12
13
14GENERAL
15
16 1.  "Where do I get the latest version of top?"
17
18The official site for top is "ftp.groupsys.com" in the directory
19"/pub/top".  It is also available from the following mirror sites:
20"pharos.dgim.doc.ca" in /packages/top, "uiarchive.uiuc.edu" in
21/pub/packages/top, "sunsite.auc.dk" in /pub/unix/top.  European
22users should consider using the Denmark (dk) site.
23 
24 2.  "Is there a web page for top?"
25
26Yes.  Point your browser at http://www.groupsys.com/top.  It includes
27all documentation, a nice interactive display which describes the
28various components of the output of top, web-based retrieval of the
29package, year 2000 information, and pointers to the mailing list.
30
31 3.  "Is there a mailing list for top?"
32
33The official list for announcements is "top-announce@groupsys.com".
34This list is managed by "majordomo@groupsys.com".  Announcements of
35importance to all top users will be sent to this list, including new
36releases, availability of beta test versions, emergency revisions and
37patches, etc.  Anyone is welcome to join top-announce.  This is a
38read-only list.  The list of subscribers will not (intentionally) be
39made available, and postings to the list are limited.
40
41In addition, there is a top developers mailing list that is used by
42beta testers and other people who help me port the program to various
43machines.  Membership to this list is solely at my discretion.  If you
44feel qualified to act as a beta tester, or if you are doing development
45work on top (such as porting to a new platform), you may submit a
46request by sending a message to "top-spinners-request@groupsys.com"
47containing the word "subscribe".  I will contact you within a few days,
48as my schedule permits.
49
50 4.  "What about Year 2000 compliance"?
51
52Top should not experience any problems with the transition to the year
532000.  A full statement concerning top and the year 2000 can be found
54in the file "Y2K" included with the distribution.
55
56
57 5.  "Why does it take so long for a new version of top to go through the
58      beta test process?"
59
60This is completely my fault.  I have just not had the time to give top
61the attention it deserves.  I thank everyone for their patience, and I
62hope that with the recent changes in the direction of my career that I
63can spend more time on this.
64
65 6.  "Top is not written in ANSI C.  Do you ever plan to change that?"
66
67Top predates ANSI C by about 5 years.  Yeah, it'll get "fixed" eventually.  
68Probably in 3.6.
69
70
71CONFIGURING
72
73 7.  "Configure said that it saw /proc and is recommending that I install top
74      setuid root.  Is there any way around this?  Is it safe?"
75
76There is no way around it.  Complain to POSIX.  Every effort has been   made 
77to make top a secure setuid program.  However, we cannot guarantee that 
78there are no security problems associated with this configuration.  The 
79places where top is most vulnerable are the builtin kill and renice 
80commands.  There is no internal top command that causes top to start a shell 
81as a subprocess.  Some SVR4 systems may contain a bug that enables a user to 
82renice his own processes downward (to lower nice values that are more 
83favorable for the process).  This problem has been fixed for the Solaris 2.x 
84modules, but may still exist in others.  We will hopefully fix this up in 
85the next release.
86
87 8.  "Why is Configure a c-shell script?  I thought c-shell scripts were 
88      evil?"
89
90They are.  :-)  I'll probably be rewriting the Configure script for the
91next release, or switching to something like Gnu configure.
92
93
94COMPILING
95
96 9.  "We just upgraded our operating system to a new version and top broke.  
97      What should we do?"
98
99Recompile it.  Top is very sensitive to changes in internal kernel data 
100structures.  It is not uncommon for a new version of the operating system to 
101include changes to kernel data structures.
102
103
104RUNNING
105
10610.  "I just finished compiling top and it works fine for root, but when
107      I try to run it as a regular user it either complains about files
108      it can't open or it doesn't display all the information it should.
109      Did I do something wrong?"
110
111Well, you're just not done.  On many operating systems today, access to
112many of the kernel memory devices and other system files is restricted to
113either root or a particular group.  The Configure script figures this out
114(usually) and makes sure that the "intsall" rule in the Makefile will
115install top so that anyone can run it successfully.  However, you have to
116*install* it first.  Do this with the command "make install".
117
11811.  "Top is (not) displaying idle processes and I don't (do) want it to."
119
120This default has only changed about a dozen times, and I finally got tired 
121of people whining about it.  Go read the manual page for the current version 
122and pay special attention to the description of the "TOP" environment 
123variable.
124
12512.  "We have so much memory in our machine that the memory status display 
126      (the fourth line) ends up being longer than 80 characters.  This
127      completely messes up top's output.  Is there a patch?"
128
129Most modules have been changed to use new memory formatting functions which 
130will display large values in terms of megabytes instead of kilobytes.  This 
131should fix all occurences of this problem.  If you encounter a system where 
132this large memory display overflow is still occurring, please let me know 
133(send mail to <wnl@groupsys.com>).  Also note that newer versions of top can 
134use columns beyond 79, and understand window resizes.  So you can always 
135make your window bigger.
136
13713.  "I tried to compile top with gcc and it doesn't work.  I get
138      compilation errors in the include files, or I get an executable that
139      dumps core, or top displays incorrect numbers in some of the displays.
140      What's wrong?"
141
142Gnu CC likes very much to use its own include files.  Not being a gcc
143expert, I can't explain why it does this.  But I can tell you that if
144you upgrade your operating system (say from Solaris 2.4 to Solaris
1452.5) after installing gcc, then the include files that gcc uses will
146be incorrect, especially those found in the "sys" directory.  Your
147choices are: (1) rebuild and reinstall the "standard" include files
148for gcc (look for scripts in the distribution called "fixincludes" and
149"fixinc.svr4"), (2) compile machine.c with "CFLAGS=-I/usr/include"
150then make the rest of the object files normally, or (3) use "cc".
151Solaris 2.6 users should also consult FAQ #20.
152
15314.  "The cpu state percentages are all wrong, indicating that my machine is 
154      using 95% system time when it is clearly idle.  What's wrong?"
155
156This can happen if you compiled with gcc using the wrong include files.
157See the previous question.
158
159
160SUNOS PROBLEMS
161
16215.  "I tried compiling top under SunOS version 4.1.x and it got compile time 
163      errors.  Is there a patch?"
164
165If you try compiling top in a "System V environment" under SunOS (that is, 
166/usr/5bin is before /usr/bin on your path) then the compilation may fail.  
167This is mostly due to the fact that top thinks its being compiled on a 
168System V machine when it really isn't. The only solution is to put /usr/bin 
169and /usr/ucb before /usr/5bin on your path and try again.
170
171
172SVR4-derived PROBLEMS
173
17416.  "When I run top on my SVR4-derived operating system, it displays all
175      the system information at the top but does not display any process
176      information (or only displayes process information for my own
177      processes).  Yet when I run it as root, everything works fine."
178
179Your system probably uses the pseudo file system "/proc", which is by 
180default only accessible by root.  Top needs to be installed setuid root on 
181such systems if it is going to function correctly for normal users.
182
183
184SOLARIS PROBLEMS
185
18617.  "Under Solaris 2, when I run top as root it only shows root processes,
187      or it only shows processes with a PID less than 1000.  It refuses to
188      show anything else.  What do I do?"
189
190You probably compiled it with /usr/ucb/cc instead of the real C compiler.  
191/usr/ucb/cc is a cc front end that compiles programs in BSD source-level 
192compatability mode.  You do not want that.  Make sure that /usr/ucb is not 
193on your path and try compiling top again.
194
19518.  "Under Solaris 2, I compiled top using what I am sure is the correct
196      compiler but when I try to run it it complains about missing dynamic
197      libraries.  What is wrong?"
198
199Check to see if you have LD_LIBRARY_PATH defined in your shell.  If you do, 
200make sure that /usr/ucblib is not on the path anywhere.  Then try compiling 
201top again.
202
20319.  "Under Solaris 2, when I try to run top it complains that it can't open 
204      the library "libucb.so.1".  So I changed the LIBS line in m_sunos5.c
205      to include -R/usr/ucblib to make sure that the dynamic linker will look 
206      there when top runs.  I figured this was just an oversight.  Was I
207      right?"
208
209No, you were not right.  As distributed, top requires NO alterations
210for successful compilation and operations under any release of Solaris
2112.  You probably compiled top with /usr/ucb/cc instead of the real C
212compiler.  See FAQ #10 for more details.
213
21420.  "When I try to compile top under Solaris 2.6 using gcc I get compile
215      time errors.  There appear to be problems with the include files,
216      such as 'u_rlimit has incomplete type' and/or 'u_saved_rlimit has
217      incomplete type'.  I've already run fixinc.svr4 as per FAQ #13.
218      Why didn't that fix it?"
219
220Only top versions 3.5 and later are compatible with Solaris 2.6.  Make
221sure you are using the most up-to-date version.  Earlier beta release
222copies of version 3.5 had additional problems when compiled with gcc.
223Retrieve the official version 3.5 (non-beta) release from one of the
224sites listed in FAQ #1 or FAQ #2.
225
226
227SCO PROBLEMS
228
22921.  "When I try to run Configure, it complains about a syntax error."
230
231Some versions of SCO's csh do not understand the syntax "$<".  Earlier
232releases of top depended on this syntax to read input from the installer's
233terminal during the installation process.  Version 3.5 fixes this.
234
235
236SVR42 PROBLEMS
237
23822.  "The memory display doesn't work right.  Why?"
239
240This is a known bug with the svr42 module. The problem has been traced down 
241to a potential bug in the "mem" driver.  The author of the svr42 module is 
242working on a fix.
243
244
245STILL STUCK
246
24723.  I'm still stuck.  To whom do I report problems with top?"
248
249The most common problems are caused by top's sensitivity to internal kernel 
250data structures.  So make sure that you are using the right include files, 
251and make sure that you test out top on the same machine where you compiled 
252it.  Sun's BSD Source Compatability Mode is also a common culprit.  Make 
253sure you aren't using either /usr/ucb/cc or any of the libraries in 
254/usr/ucblib.  Finally, make sure you are using the correct module.  If there 
255does not appear to be one appropriate for your computer, then top probably 
256will not work on your system.
257
258If after reading all of this file and checking everything you can you are 
259still stuck, then send mail to "wnl@groupsys.com".  I will answer your mail 
260when I have time.  Please bear with me in that regard!  If it looks like the 
261problem is machine-specific, I will forward the report along to the module's 
262author.  If you would like to converse directly with the module author, the 
263authors' names are listed at the beginning of the module .c file in the 
264"machine" directory.
265