Merge branch 'vendor/OPENSSL'
[dragonfly.git] / contrib / top / FAQ
1                                         TOP
2                                   Version 3.8beta1
3
4                                   William LeFebvre
5                              with much help from others
6
7                     Frequently Asked Questions and their Answers
8
9
10
11      GENERAL
12
13  1.  What is top? 
14
15      Top provies the user with a regularly updated display showing
16      information about the system and its top cpu-using processes. Think
17      of it as a full-screen "ps" output that gets updated at regular
18      intervals.
19
20  2.  Where do I get the latest version of top? 
21
22      The official site for top is "ftp.unixtop.org" in the directory
23      "/pub/top". Top is also a SourceForge project, and the most recent
24      releases are available on any of the SourceForge mirrors. The
25      SourceForge project page is at
26      http://sourceforge.net/projects/unixtop.
27
28  3.  Is there a web page for top? 
29
30      Yes. Point your browser at http://www.unixtop.org. It includes all
31      documentation, a nice interactive display which describes the various
32      components of the output of top, web-based retrieval of the package,
33      year 2000 information, and other neat stuff.
34
35  4.  Is there a mailing list or on-line bulletin board for top? 
36
37      There is a mailing list used for general announcements regarding top,
38      including new releases. This mailing list is available to sourceforge
39      members and can be accessed from the unixtop sourceforge project
40      page. Visit SourceForge and search for the project "unixtop", then
41      click on "mailing lists". There are also on-line forums available
42      through SourceForge where members can post questions and comments.
43
44  5.  What about Year 2000 compliance? 
45
46      Top did not experience any problems with the transition to the year
47      2000. A full statement concerning top and the year 2000 can be found
48      in the file "Y2K" included with the distribution.
49
50  6.  Will there be another major release of top? Will there be a top
51      version 4? 
52
53      I have some great ideas for the next major release of top, and I very
54      much want to make those ideas a reality. What I don't have much of
55      these days is free time. But I will keep poking at it and I hope to
56      have top version 4.0 ready by the fall of 2006.
57
58  7.  Does top really support multi-processor systems? 
59
60      On platforms that support multiple processors, top is able to detect
61      and correctly summarize the information about those processors. What
62      top does not do is break down the cpu states summary (the third line
63      of the display) by cpu. Instead it collects the cpu state information
64      from all processors and combines them in to a single line. Some
65      vendors  include a modified version of top that presents this
66      information for each cpu. Top 3.7 may have this functionality but it
67      is not present in the standard top 3.6 release.
68
69  8.  Is top under CVS control? Can I access the sources via SourceForge
70      CVS or Subversion? 
71
72      I maintain top using subversion, not CVS. Although I utilize my own
73      private subversion repository, it is regularly mirrored in to the
74      SourceForge Subversion repository. You can access the SourceForge
75      repository here: https://svn.unixtop.org/unixtop/top-3.
76
77
78      COMPILING
79
80  9.  We just upgraded our operating system to a new version and top broke.
81      What should we do? 
82
83      Recompile it. Top is very sensitive to changes in internal kernel
84      data structures. It is not uncommon for a new version of the
85      operating system to include changes to kernel data structures.
86
87
88      RUNNING
89
90 10.  I just finished compiling top and it works fine for root, but when I
91      try to run it as a regular user it either complains about files it
92      can't open or it doesn't display all the information it should. Did I
93      do something wrong? 
94
95      Well, you're just not done. On many operating systems today, access
96      to many of the kernel memory devices and other system files is
97      restricted to either root or a particular group. The configure script
98      figures this out (usually) and makes sure that the "install" rule in
99      the Makefile will install top so that anyone can run it successfully.
100      However, you have to *install* it first. Do this with the command
101      "make install".
102
103 11.  Top is (not) displaying idle processes and I don't (do) want it to. 
104
105      This default has only changed about a dozen times, and I finally got
106      tired of people whining about it. Go read the manual page for the
107      current version and pay special attention to the description of the
108      "TOP" environment variable.
109
110 12.  We have so much memory in our machine that the memory status display
111      (the fourth line) ends up being longer than 80 characters. This
112      completely messes up top's output. Is there a patch? 
113
114      Most modules have been changed to use new memory formatting functions
115      which will display large values in terms of megabytes instead of
116      kilobytes. This should fix all occurences of this problem. Also note
117      that newer versions of top can use columns beyond 79, and understand
118      window resizes. So you can always make your window wider.
119
120 13.  I tried to compile top with gcc and it doesn't work. I get
121      compilation errors in the include files, or I get an executable that
122      dumps core, or top displays incorrect numbers in some of the
123      displays. What's wrong? 
124
125      Gnu CC likes very much to use its own include files. Not being a gcc
126      expert, I can't explain why it does this. But I can tell you that if
127      you upgrade your operating system (say from Solaris 2.6 to Solaris
128      2.7) after installing gcc, then the include files that gcc uses will
129      be incorrect, especially those found in the "sys" directory. Your
130      choices are: (1) rebuild and reinstall the "standard" include files
131      for gcc (look for scripts in the distribution called "fixincludes"
132      and "fixinc.svr4"), (2) compile machine.c with
133      "CFLAGS=-I/usr/include" then make the rest of the object files
134      normally, or (3) use a different compiler.
135
136 14.  The cpu state percentages are all wrong, indicating that my machine
137      is using 95% system time when it is clearly idle. What's wrong? 
138
139      This can happen if you compiled with gcc using the wrong include
140      files. See the previous question.
141
142
143      FREEBSD PROBLEMS
144
145 15.  This version of top does not show individual threads with the "t" or
146      "H" commands. Instead it says "command not available." Why? 
147
148      Previous versions of top attempted to support the display of
149      individual threads under FreeBSD through the use of the "t" command.
150      However,  the FreeBSD kernel does not supply sufficient or correct
151      information on the individual threads within a process. So the data
152      that was being displayed was incorrect and misleading. Therefore, top
153      version 3.8 disables the use of this command to prevent the display
154      of incorrect information. FreeBSD 8.0 will correctly report
155      per-thread information and top version 3.8 supports the use of the
156      "t" command for version 8.0.
157
158 16.  The "f" command (to display full command lines for the processes)
159      does not work and instead says "command not available". Why? 
160
161      The current version of top is able to use sysctl to retrieve almost
162      all of the information it needs without having to open /dev/kmem. The
163      one piece of information not available via sysctl is the full command
164      line of each argument. If you run top as a regular user and it cannot
165      open /dev/kmem (in other words, it is not installed set-gid to the
166      kmem group) then it will disable the "f" command. Make sure the top
167      binary is installed with a group ownership of "kmem" and with the
168      set-gid bit on if you want the "f" command to work properly.
169
170
171      MACOSX PROBLEMS
172
173 17.  I tried to configure top on my Mac OSX system and I got an error
174      claiming "macosx not supported". What up? 
175
176      Since I don't have full time root access to a Mac OSX system I cannot
177      provide effective support for the platform. MacOSX uses Mach, and it
178      is very difficult to extract accurate system and process information
179      from the system. It takes a lot of trial and error, along with root
180      access. I have included the most up-to-date version of the macosx
181      module in the distribution, but I do not claim that it works. If you
182      want to try to use it, you can configure with "./configure
183      --with-module=macosx".
184
185
186      SUNOS PROBLEMS
187
188 18.  I tried compiling top under SunOS version 4.1.x and it got compile
189      time errors or run time errors. Is there a patch? 
190
191      If you try compiling top in a "System V environment" under SunOS
192      (that is, /usr/5bin is before /usr/bin on your path) then the
193      compilation may fail. This is mostly due to the fact that top thinks
194      its being compiled on a System V machine when it really isn't. The
195      only solution is to put /usr/bin and /usr/ucb before /usr/5bin on
196      your path and try again.
197
198
199      SOLARIS PROBLEMS
200
201
202      NOTE: the most common source of problems with top under Solaris is
203      the result of compiling it with the wrong front end. Make sure that
204      /usr/ucb is not on your path before attempting to compile top under
205      Solaris.
206
207 19.  Is there somewhere I can get a pre-compiled package? 
208
209      Yes. Although I don't provide pre-compiled binaries, you can get a
210      Sun-style package from www.sunfreeware.com.
211
212 20.  Under Solaris 2, when I type "make", the system says "language
213      optional software package not installed." What's going on? 
214
215      You tried to compile with /usr/ucb/cc. Make sure /usr/ucb is not on
216      your path. Furthermore, you do not have a Sun compiler installed on
217      your system. You need a compiler to make top. Either Sun's C compiler
218      or the Gnu C compiler will work fine.
219
220 21.  Under Solaris 2, when I run top as root it only shows root processes,
221      or it only shows processes with a PID less than 1000. It refuses to
222      show anything else. What do I do? 
223
224      You probably compiled it with /usr/ucb/cc instead of the real C
225      compiler. /usr/ucb/cc is a cc front end that compiles programs in BSD
226      source-level compatability mode. You do not want that. Make sure that
227      /usr/ucb is not on your path and try compiling top again.
228
229 22.  Under Solaris 2, I compiled top using what I am sure is the correct
230      compiler but when I try to run it it complains about missing dynamic
231      libraries. What is wrong? 
232
233      Check to see if you have LD_LIBRARY_PATH defined in your shell. If
234      you do, make sure that /usr/ucblib is not on the path anywhere. Then
235      try compiling top again.
236
237 23.  Under Solaris 2, when I try to run top it complains that it can't
238      open the library "libucb.so.1". So I changed the LIBS line in
239      m_sunos5.c to include -R/usr/ucblib to make sure that the dynamic
240      linker will look there when top runs. I figured this was just an
241      oversight. Was I right? 
242
243      No, you were not right. As distributed, top requires no alterations
244      for successful compilation and operations under any release of
245      Solaris 2. You probably compiled top with /usr/ucb/cc instead of the
246      real C compiler. See FAQ 22 for more details.
247
248 24.  On my 64-bit system some processes show up with incorrect information
249      (such as zero memory). 
250
251      If you are running a 64-bit system, then you need to make sure that
252      you are running the 64-bit top binary. Top's configure script
253      attempts to detect 64-bit systems, and will automatically generate
254      both 32-bit and 64-bit binaries on such systems. If you use or
255      install the 32-bit binary on a 64-bit system top will still run but
256      will not produce the correct results. This will also happen if you
257      configure your distribution on a 32-bit system then compile with that
258      configuration on a 64-bit system. You must configure and compile on
259      the same system. For Sparc systems the 32-bit binary will be created
260      in the subdirectory "sparcv7" and the 64-bit binary will be created
261      in the subdirectory "sparcv9". For Intel systems the directories will
262      be "i386" (32-bit) and "amd64" (64-bit). In all cases a copy of 
263      /usr/lib/isaexec is made in the main directory and called "top". This
264      program will choose the correct binary to run from one of these
265      subdirectories. See isaexec(3c) for more details.
266
267 25.  Can I install both 32-bit and 64-bit binaries on a central file
268      server and have machines which mount it automatically use the correct
269      one? 
270
271      Yes. If you configure and compile on a 64-bit system, top's configure
272      script and makefile will automatically create both 32-bit and 64-bit
273      binaries. The "install" rule in the makefile will install these
274      binaries in subdirectories of /usr/local/bin appropriate to the
275      architecture (sparcv7/sparcv9 or i386/amd64) then create a copy of
276      /usr/lib/isaexec named "top" in /usr/local/bin to ensure that the
277      appropriate is run when a user types "top". If you make sure that you
278      configure and compile on a 64-bit system, then "make install" will do
279      the right thing.
280
281 26.  This version of top show less available swap space than previous
282      versions. Why does it no longer match the output of the swap summary
283      produced with "swap -s"? 
284
285      Starting with version 3.6 of top, the amount of swap space reported
286      by top has been changed to reflect only disk-based swap space. The 
287      swap summary produced with "swap -s" also includes memory-based swap
288      space. This changed was made for several reasons. It makes the
289      display under Solaris more like those of other operating systems. The
290      display is more what users expect (except those used to previous
291      versions of top). Most importantly, "swap -s" gets its data via an
292      undocumented system interface. Now that top no longer displays that
293      data it can use publically documented and maintained system
294      interfaces to retrieve its data.
295
296
297      SVR4-DERIVED PROBLEMS
298
299 27.  When I run top on my SVR4-derived operating system, it displays all
300      the system information at the top but does not display any process
301      information (or only displays process information for my own
302      processes). Yet when I run it as root, everything works fine. What's
303      wrong? 
304
305      Your system probably uses the pseudo file system "/proc", which is by
306      default only accessible by root. Top needs to be installed setuid
307      root on such systems if it is going to function correctly for normal
308      users.
309
310
311      SVR42 PROBLEMS
312
313 28.  The memory display doesn't work right. Why? 
314
315      This is a known bug with the svr42 module. The problem has been
316      traced down to a potential bug in the "mem" driver. The author of the
317      svr42 module is working on a fix.
318
319
320      STILL STUCK
321
322 29.  I'm still stuck. To whom do I report problems with top? 
323
324      The most common problems are caused by top's sensitivity to internal
325      kernel data structures. So make sure that you are using the right
326      include files, and make sure that you test out top on the same
327      machine where you compiled it. Sun's BSD Source Compatability Mode is
328      also a common culprit. Make sure you aren't using either /usr/ucb/cc
329      or any of the libraries in /usr/ucblib. Finally, make sure you are
330      using the correct module. If there does not appear to be one
331      appropriate for your computer, then top probably will not work on
332      your system.
333
334      If after reading all of this file and checking everything you can you
335      are still stuck, then please use SourceForge to submit a support
336      request or a bug. Top is supported by the SourceForge project  named
337      "unixtop". On SourceForge you will find defect tracking, a mailing
338      list, and on-line forums. You can also contact the author through
339      SourceForge.
340