1 | TOP |
---|
2 | Version 3.4 |
---|
3 | |
---|
4 | William LeFebvre |
---|
5 | and a cast of dozens |
---|
6 | |
---|
7 | |
---|
8 | FREQUENTLY ASKED QUESTIONS AND THEIR ANSWERS |
---|
9 | |
---|
10 | This FAQ is broken out in to several topics. |
---|
11 | |
---|
12 | |
---|
13 | GENERAL |
---|
14 | |
---|
15 | 1. "Where do I get the latest version of top?" |
---|
16 | |
---|
17 | The latest version of top is now available at the site "ftp.groupsys.com" in |
---|
18 | the directory "/pub/top". It is also available at "eecs.nwu.edu" in the |
---|
19 | directory "/pub/top". |
---|
20 | |
---|
21 | 2. "Is there a web page for top?" |
---|
22 | |
---|
23 | Not at this time, but I am planning one. When it is finally available, you |
---|
24 | will be able to find it at "www.groupsys.com." |
---|
25 | |
---|
26 | 3. "Is there a mailing list for top?" |
---|
27 | |
---|
28 | Currently there is a top developers mailing list that is used by beta |
---|
29 | testers and other people who help me port the program to various machines. |
---|
30 | I am planning a general mailing list for announcements and such, but it is |
---|
31 | not yet available. |
---|
32 | |
---|
33 | 4. "How can I find out when all these things become available?" |
---|
34 | |
---|
35 | Information about the web site and the mailing list will be made available |
---|
36 | in future distributions of top. New distributions will be announced on the |
---|
37 | appropriate Usenet newsgroups (including comp.sources.unix). |
---|
38 | |
---|
39 | 5. "Why does it take so long for a new version of top to go through the |
---|
40 | beta test process?" |
---|
41 | |
---|
42 | This is completely my fault. I have just not had the time recently to give |
---|
43 | top the attention it deserves. I thank everyone for their patience, and I |
---|
44 | hope that with the recent changes in the direction of my career that I can |
---|
45 | spend more time on this. |
---|
46 | |
---|
47 | 6. "Top is not written in ANSI C. Do you ever plan to change that?" |
---|
48 | |
---|
49 | Top predates ANSI C by about 5 years. Yeah, it'll get "fixed" eventually. |
---|
50 | Probably in 3.5. |
---|
51 | |
---|
52 | |
---|
53 | CONFIGURING |
---|
54 | |
---|
55 | 7. "Configure said that it saw /proc and is recommending that I install top |
---|
56 | setuid root. Is there any way around this? Is it safe?" |
---|
57 | |
---|
58 | There is no way around it. Complain to POSIX. Every effort has been made |
---|
59 | to make top a secure setuid program. However, we cannot guarantee that |
---|
60 | there are no security problems associated with this configuration. The |
---|
61 | places where top is most vulnerable are the builtin kill and renice |
---|
62 | commands. There is no internal top command that causes top to start a shell |
---|
63 | as a subprocess. Some SVR4 systems may contain a bug that enables a user to |
---|
64 | renice his own processes downward (to lower nice values that are more |
---|
65 | favorable for the process). This problem has been fixed for the Solaris 2.x |
---|
66 | modules, but may still exist in others. We will hopefully fix this up in |
---|
67 | the next release. |
---|
68 | |
---|
69 | 8. "Why is Configure a c-shell script? I thought c-shell scripts were |
---|
70 | evil?" |
---|
71 | |
---|
72 | They are. :-) I'll probably be rewriting the Configure script for the |
---|
73 | next release. |
---|
74 | |
---|
75 | |
---|
76 | COMPILING |
---|
77 | |
---|
78 | 9. "We just upgraded our operating system to a new version and top broke. |
---|
79 | What should we do?" |
---|
80 | |
---|
81 | Recompile it. Top is very sensitive to changes in internal kernel data |
---|
82 | structures. It is not uncommon for a new version of the operating system to |
---|
83 | include changes to kernel data structures. |
---|
84 | |
---|
85 | |
---|
86 | RUNNING |
---|
87 | |
---|
88 | 10. "I just finished compiling top and it works fine for root, but when |
---|
89 | I try to run it as a regular user it either complains about files |
---|
90 | it can't open or it doesn't display all the information it should. |
---|
91 | Did I do something wrong?" |
---|
92 | |
---|
93 | Well, you're just not done. On many operating systems today, access to |
---|
94 | many of the kernel memory devices and other system files is restricted to |
---|
95 | either root or a particular group. The Configure script figures this out |
---|
96 | (usually) and makes sure that the "intsall" rule in the Makefile will |
---|
97 | install top so that anyone can run it successfully. However, you have to |
---|
98 | *install* it first. Do this with the command "make install". |
---|
99 | |
---|
100 | 11. "Top is (not) displaying idle processes and I don't (do) want it to." |
---|
101 | |
---|
102 | This default has only changed about a dozen times, and I finally got tired |
---|
103 | of people whining about it. Go read the manual page for the current version |
---|
104 | and pay special attention to the description of the "TOP" environment |
---|
105 | variable. |
---|
106 | |
---|
107 | 12. "We have so much memory in our machine that the memory status display |
---|
108 | (the fourth line) ends up being longer than 80 characters. This |
---|
109 | completely messes up top's output. Is there a patch?" |
---|
110 | |
---|
111 | Most modules have been changed to use new memory formatting functions which |
---|
112 | will display large values in terms of megabytes instead of kilobytes. This |
---|
113 | should fix all occurences of this problem. If you encounter a system where |
---|
114 | this large memory display overflow is still occurring, please let me know |
---|
115 | (send mail to <wnl@groupsys.com>). Also note that newer versions of top can |
---|
116 | use columns beyond 79, and understand window resizes. So you can always |
---|
117 | make your window bigger. |
---|
118 | |
---|
119 | 13. "I tried to compile top with gcc and it doesn't work. I get |
---|
120 | compilation errors in the include files, or I get an executable that |
---|
121 | dumps core, or top displays incorrect numbers in some of the displays. |
---|
122 | What's wrong?" |
---|
123 | |
---|
124 | Gnu CC likes very much to use its own include files. Not being a gcc |
---|
125 | expert, I can't explain why it does this. But I can tell you that if you |
---|
126 | upgrade your operating system (say from Solaris 2.4 to Solaris 2.5) after |
---|
127 | installing gcc, then the include files that gcc uses will be incorrect, |
---|
128 | especially those found in the "sys" directory. Your choices are: (1) |
---|
129 | rebuild and reinstall the "standard" include files for gcc (look for a |
---|
130 | script in the distribution called "fixincludes"), (2) compile machine.c |
---|
131 | with "CFLAGS=-I/usr/include" then make the rest of the object files |
---|
132 | normally, or (3) use "cc". |
---|
133 | |
---|
134 | 14. "The cpu state percentages are all wrong, indicating that my machine is |
---|
135 | using 95% system time when it is clearly idle. What's wrong?" |
---|
136 | |
---|
137 | This can happen if you compiled with gcc using the wrong include files. |
---|
138 | See the previous question. |
---|
139 | |
---|
140 | |
---|
141 | SUNOS PROBLEMS |
---|
142 | |
---|
143 | 15. "I tried compiling top under SunOS version 4.1.x and it got compile time |
---|
144 | errors. Is there a patch?" |
---|
145 | |
---|
146 | If you try compiling top in a "System V environment" under SunOS (that is, |
---|
147 | /usr/5bin is before /usr/bin on your path) then the compilation may fail. |
---|
148 | This is mostly due to the fact that top thinks its being compiled on a |
---|
149 | System V machine when it really isn't. The only solution is to put /usr/bin |
---|
150 | and /usr/ucb before /usr/5bin on your path and try again. |
---|
151 | |
---|
152 | |
---|
153 | SVR4-derived PROBLEMS |
---|
154 | |
---|
155 | 16. "When I run top on my SVR4-derived operating system, it displays all |
---|
156 | the system information at the top but does not display any process |
---|
157 | information (or only displayes process information for my own |
---|
158 | processes). Yet when I run it as root, everything works fine." |
---|
159 | |
---|
160 | Your system probably uses the pseudo file system "/proc", which is by |
---|
161 | default only accessible by root. Top needs to be installed setuid root on |
---|
162 | such systems if it is going to function correctly for normal users. |
---|
163 | |
---|
164 | |
---|
165 | SOLARIS PROBLEMS |
---|
166 | |
---|
167 | 17. "Under Solaris 2, when I run top as root it only shows root processes, |
---|
168 | or it only shows processes with a PID less than 1000. It refuses to |
---|
169 | show anything else. What do I do?" |
---|
170 | |
---|
171 | You probably compiled it with /usr/ucb/cc instead of the real C compiler. |
---|
172 | /usr/ucb/cc is a cc front end that compiles programs in BSD source-level |
---|
173 | compatability mode. You do not want that. Make sure that /usr/ucb is not |
---|
174 | on your path and try compiling top again. |
---|
175 | |
---|
176 | 18. "Under Solaris 2, I compiled top using what I am sure is the correct |
---|
177 | compiler but when I try to run it it complains about missing dynamic |
---|
178 | libraries. What is wrong?" |
---|
179 | |
---|
180 | Check to see if you have LD_LIBRARY_PATH defined in your shell. If you do, |
---|
181 | make sure that /usr/ucblib is not on the path anywhere. Then try compiling |
---|
182 | top again. |
---|
183 | |
---|
184 | 19. "Under Solaris 2, when I try to run top it complains that it can't open |
---|
185 | the library "libucb.so.1". So I changed the LIBS line in m_sunos5.c |
---|
186 | to include -R/usr/ucblib to make sure that the dynamic linker will look |
---|
187 | there when top runs. I figured this was just an oversight. Was I |
---|
188 | right?" |
---|
189 | |
---|
190 | No, you were not right. As distributed, top requires NO alterations for |
---|
191 | successful compilation and operations under Solaris 2.0, 2.1, 2.2, 2.3, 2.4, |
---|
192 | and 2.5. You probably compiled top with /usr/ucb/cc instead of the real C |
---|
193 | compiler. See FAQ #10 for more details. |
---|
194 | |
---|
195 | |
---|
196 | SCO PROBLEMS |
---|
197 | |
---|
198 | 20. "When I try to run Configure, it complains about a syntax error." |
---|
199 | |
---|
200 | Some versions of SCO's csh do not understand the syntax "$<". This breaks |
---|
201 | Configure. You'll just have to hack around it for now: the Configure script |
---|
202 | is going to be completely redone in the near future anyway. |
---|
203 | |
---|
204 | |
---|
205 | SVR42 PROBLEMS |
---|
206 | |
---|
207 | 21. "The load average and memory displays don't work right. Why?" |
---|
208 | |
---|
209 | This is a known bug with the svr42 module. The problem has been traced down |
---|
210 | to a potential bug in the "mem" driver. The author of the svr42 module is |
---|
211 | working on a fix. |
---|
212 | |
---|
213 | |
---|
214 | STILL STUCK |
---|
215 | |
---|
216 | 22. I'm still stuck. To whom do I report problems with top?" |
---|
217 | |
---|
218 | The most common problems are caused by top's sensitivity to internal kernel |
---|
219 | data structures. So make sure that you are using the right include files, |
---|
220 | and make sure that you test out top on the same machine where you compiled |
---|
221 | it. Sun's BSD Source Compatability Mode is also a common culprit. Make |
---|
222 | sure you aren't using either /usr/ucb/cc or any of the libraries in |
---|
223 | /usr/ucblib. Finally, make sure you are using the correct module. If there |
---|
224 | does not appear to be one appropriate for your computer, then top probably |
---|
225 | will not work on your system. |
---|
226 | |
---|
227 | If after reading all of this file and checking everything you can you are |
---|
228 | still stuck, then send mail to "wnl@groupsys.com". I will answer your mail |
---|
229 | when I have time. Please bear with me in that regard! If it looks like the |
---|
230 | problem is machine-specific, I will forward the report along to the module's |
---|
231 | author. If you would like to converse directly with the module author, the |
---|
232 | authors' names are listed at the beginning of the module .c file in the |
---|
233 | "machine" directory. |
---|