FAQ revision 24139
124139Sjoerg TOP 224139Sjoerg Version 3.4 324139Sjoerg 424139Sjoerg William LeFebvre 524139Sjoerg and a cast of dozens 624139Sjoerg 724139Sjoerg 824139SjoergFREQUENTLY ASKED QUESTIONS AND THEIR ANSWERS 924139Sjoerg 1024139SjoergThis FAQ is broken out in to several topics. 1124139Sjoerg 1224139Sjoerg 1324139SjoergGENERAL 1424139Sjoerg 1524139Sjoerg 1. "Where do I get the latest version of top?" 1624139Sjoerg 1724139SjoergThe latest version of top is now available at the site "ftp.groupsys.com" in 1824139Sjoergthe directory "/pub/top". It is also available at "eecs.nwu.edu" in the 1924139Sjoergdirectory "/pub/top". 2024139Sjoerg 2124139Sjoerg 2. "Is there a web page for top?" 2224139Sjoerg 2324139SjoergNot at this time, but I am planning one. When it is finally available, you 2424139Sjoergwill be able to find it at "www.groupsys.com." 2524139Sjoerg 2624139Sjoerg 3. "Is there a mailing list for top?" 2724139Sjoerg 2824139SjoergCurrently there is a top developers mailing list that is used by beta 2924139Sjoergtesters and other people who help me port the program to various machines. 3024139SjoergI am planning a general mailing list for announcements and such, but it is 3124139Sjoergnot yet available. 3224139Sjoerg 3324139Sjoerg 4. "How can I find out when all these things become available?" 3424139Sjoerg 3524139SjoergInformation about the web site and the mailing list will be made available 3624139Sjoergin future distributions of top. New distributions will be announced on the 3724139Sjoergappropriate Usenet newsgroups (including comp.sources.unix). 3824139Sjoerg 3924139Sjoerg 5. "Why does it take so long for a new version of top to go through the 4024139Sjoerg beta test process?" 4124139Sjoerg 4224139SjoergThis is completely my fault. I have just not had the time recently to give 4324139Sjoergtop the attention it deserves. I thank everyone for their patience, and I 4424139Sjoerghope that with the recent changes in the direction of my career that I can 4524139Sjoergspend more time on this. 4624139Sjoerg 4724139Sjoerg 6. "Top is not written in ANSI C. Do you ever plan to change that?" 4824139Sjoerg 4924139SjoergTop predates ANSI C by about 5 years. Yeah, it'll get "fixed" eventually. 5024139SjoergProbably in 3.5. 5124139Sjoerg 5224139Sjoerg 5324139SjoergCONFIGURING 5424139Sjoerg 5524139Sjoerg 7. "Configure said that it saw /proc and is recommending that I install top 5624139Sjoerg setuid root. Is there any way around this? Is it safe?" 5724139Sjoerg 5824139SjoergThere is no way around it. Complain to POSIX. Every effort has been made 5924139Sjoergto make top a secure setuid program. However, we cannot guarantee that 6024139Sjoergthere are no security problems associated with this configuration. The 6124139Sjoergplaces where top is most vulnerable are the builtin kill and renice 6224139Sjoergcommands. There is no internal top command that causes top to start a shell 6324139Sjoergas a subprocess. Some SVR4 systems may contain a bug that enables a user to 6424139Sjoergrenice his own processes downward (to lower nice values that are more 6524139Sjoergfavorable for the process). This problem has been fixed for the Solaris 2.x 6624139Sjoergmodules, but may still exist in others. We will hopefully fix this up in 6724139Sjoergthe next release. 6824139Sjoerg 6924139Sjoerg 8. "Why is Configure a c-shell script? I thought c-shell scripts were 7024139Sjoerg evil?" 7124139Sjoerg 7224139SjoergThey are. :-) I'll probably be rewriting the Configure script for the 7324139Sjoergnext release. 7424139Sjoerg 7524139Sjoerg 7624139SjoergCOMPILING 7724139Sjoerg 7824139Sjoerg 9. "We just upgraded our operating system to a new version and top broke. 7924139Sjoerg What should we do?" 8024139Sjoerg 8124139SjoergRecompile it. Top is very sensitive to changes in internal kernel data 8224139Sjoergstructures. It is not uncommon for a new version of the operating system to 8324139Sjoerginclude changes to kernel data structures. 8424139Sjoerg 8524139Sjoerg 8624139SjoergRUNNING 8724139Sjoerg 8824139Sjoerg10. "I just finished compiling top and it works fine for root, but when 8924139Sjoerg I try to run it as a regular user it either complains about files 9024139Sjoerg it can't open or it doesn't display all the information it should. 9124139Sjoerg Did I do something wrong?" 9224139Sjoerg 9324139SjoergWell, you're just not done. On many operating systems today, access to 9424139Sjoergmany of the kernel memory devices and other system files is restricted to 9524139Sjoergeither root or a particular group. The Configure script figures this out 9624139Sjoerg(usually) and makes sure that the "intsall" rule in the Makefile will 9724139Sjoerginstall top so that anyone can run it successfully. However, you have to 9824139Sjoerg*install* it first. Do this with the command "make install". 9924139Sjoerg 10024139Sjoerg11. "Top is (not) displaying idle processes and I don't (do) want it to." 10124139Sjoerg 10224139SjoergThis default has only changed about a dozen times, and I finally got tired 10324139Sjoergof people whining about it. Go read the manual page for the current version 10424139Sjoergand pay special attention to the description of the "TOP" environment 10524139Sjoergvariable. 10624139Sjoerg 10724139Sjoerg12. "We have so much memory in our machine that the memory status display 10824139Sjoerg (the fourth line) ends up being longer than 80 characters. This 10924139Sjoerg completely messes up top's output. Is there a patch?" 11024139Sjoerg 11124139SjoergMost modules have been changed to use new memory formatting functions which 11224139Sjoergwill display large values in terms of megabytes instead of kilobytes. This 11324139Sjoergshould fix all occurences of this problem. If you encounter a system where 11424139Sjoergthis large memory display overflow is still occurring, please let me know 11524139Sjoerg(send mail to <wnl@groupsys.com>). Also note that newer versions of top can 11624139Sjoerguse columns beyond 79, and understand window resizes. So you can always 11724139Sjoergmake your window bigger. 11824139Sjoerg 11924139Sjoerg13. "I tried to compile top with gcc and it doesn't work. I get 12024139Sjoerg compilation errors in the include files, or I get an executable that 12124139Sjoerg dumps core, or top displays incorrect numbers in some of the displays. 12224139Sjoerg What's wrong?" 12324139Sjoerg 12424139SjoergGnu CC likes very much to use its own include files. Not being a gcc 12524139Sjoergexpert, I can't explain why it does this. But I can tell you that if you 12624139Sjoergupgrade your operating system (say from Solaris 2.4 to Solaris 2.5) after 12724139Sjoerginstalling gcc, then the include files that gcc uses will be incorrect, 12824139Sjoergespecially those found in the "sys" directory. Your choices are: (1) 12924139Sjoergrebuild and reinstall the "standard" include files for gcc (look for a 13024139Sjoergscript in the distribution called "fixincludes"), (2) compile machine.c 13124139Sjoergwith "CFLAGS=-I/usr/include" then make the rest of the object files 13224139Sjoergnormally, or (3) use "cc". 13324139Sjoerg 13424139Sjoerg14. "The cpu state percentages are all wrong, indicating that my machine is 13524139Sjoerg using 95% system time when it is clearly idle. What's wrong?" 13624139Sjoerg 13724139SjoergThis can happen if you compiled with gcc using the wrong include files. 13824139SjoergSee the previous question. 13924139Sjoerg 14024139Sjoerg 14124139SjoergSUNOS PROBLEMS 14224139Sjoerg 14324139Sjoerg15. "I tried compiling top under SunOS version 4.1.x and it got compile time 14424139Sjoerg errors. Is there a patch?" 14524139Sjoerg 14624139SjoergIf you try compiling top in a "System V environment" under SunOS (that is, 14724139Sjoerg/usr/5bin is before /usr/bin on your path) then the compilation may fail. 14824139SjoergThis is mostly due to the fact that top thinks its being compiled on a 14924139SjoergSystem V machine when it really isn't. The only solution is to put /usr/bin 15024139Sjoergand /usr/ucb before /usr/5bin on your path and try again. 15124139Sjoerg 15224139Sjoerg 15324139SjoergSVR4-derived PROBLEMS 15424139Sjoerg 15524139Sjoerg16. "When I run top on my SVR4-derived operating system, it displays all 15624139Sjoerg the system information at the top but does not display any process 15724139Sjoerg information (or only displayes process information for my own 15824139Sjoerg processes). Yet when I run it as root, everything works fine." 15924139Sjoerg 16024139SjoergYour system probably uses the pseudo file system "/proc", which is by 16124139Sjoergdefault only accessible by root. Top needs to be installed setuid root on 16224139Sjoergsuch systems if it is going to function correctly for normal users. 16324139Sjoerg 16424139Sjoerg 16524139SjoergSOLARIS PROBLEMS 16624139Sjoerg 16724139Sjoerg17. "Under Solaris 2, when I run top as root it only shows root processes, 16824139Sjoerg or it only shows processes with a PID less than 1000. It refuses to 16924139Sjoerg show anything else. What do I do?" 17024139Sjoerg 17124139SjoergYou probably compiled it with /usr/ucb/cc instead of the real C compiler. 17224139Sjoerg/usr/ucb/cc is a cc front end that compiles programs in BSD source-level 17324139Sjoergcompatability mode. You do not want that. Make sure that /usr/ucb is not 17424139Sjoergon your path and try compiling top again. 17524139Sjoerg 17624139Sjoerg18. "Under Solaris 2, I compiled top using what I am sure is the correct 17724139Sjoerg compiler but when I try to run it it complains about missing dynamic 17824139Sjoerg libraries. What is wrong?" 17924139Sjoerg 18024139SjoergCheck to see if you have LD_LIBRARY_PATH defined in your shell. If you do, 18124139Sjoergmake sure that /usr/ucblib is not on the path anywhere. Then try compiling 18224139Sjoergtop again. 18324139Sjoerg 18424139Sjoerg19. "Under Solaris 2, when I try to run top it complains that it can't open 18524139Sjoerg the library "libucb.so.1". So I changed the LIBS line in m_sunos5.c 18624139Sjoerg to include -R/usr/ucblib to make sure that the dynamic linker will look 18724139Sjoerg there when top runs. I figured this was just an oversight. Was I 18824139Sjoerg right?" 18924139Sjoerg 19024139SjoergNo, you were not right. As distributed, top requires NO alterations for 19124139Sjoergsuccessful compilation and operations under Solaris 2.0, 2.1, 2.2, 2.3, 2.4, 19224139Sjoergand 2.5. You probably compiled top with /usr/ucb/cc instead of the real C 19324139Sjoergcompiler. See FAQ #10 for more details. 19424139Sjoerg 19524139Sjoerg 19624139SjoergSCO PROBLEMS 19724139Sjoerg 19824139Sjoerg20. "When I try to run Configure, it complains about a syntax error." 19924139Sjoerg 20024139SjoergSome versions of SCO's csh do not understand the syntax "$<". This breaks 20124139SjoergConfigure. You'll just have to hack around it for now: the Configure script 20224139Sjoergis going to be completely redone in the near future anyway. 20324139Sjoerg 20424139Sjoerg 20524139SjoergSVR42 PROBLEMS 20624139Sjoerg 20724139Sjoerg21. "The load average and memory displays don't work right. Why?" 20824139Sjoerg 20924139SjoergThis is a known bug with the svr42 module. The problem has been traced down 21024139Sjoergto a potential bug in the "mem" driver. The author of the svr42 module is 21124139Sjoergworking on a fix. 21224139Sjoerg 21324139Sjoerg 21424139SjoergSTILL STUCK 21524139Sjoerg 21624139Sjoerg22. I'm still stuck. To whom do I report problems with top?" 21724139Sjoerg 21824139SjoergThe most common problems are caused by top's sensitivity to internal kernel 21924139Sjoergdata structures. So make sure that you are using the right include files, 22024139Sjoergand make sure that you test out top on the same machine where you compiled 22124139Sjoergit. Sun's BSD Source Compatability Mode is also a common culprit. Make 22224139Sjoergsure you aren't using either /usr/ucb/cc or any of the libraries in 22324139Sjoerg/usr/ucblib. Finally, make sure you are using the correct module. If there 22424139Sjoergdoes not appear to be one appropriate for your computer, then top probably 22524139Sjoergwill not work on your system. 22624139Sjoerg 22724139SjoergIf after reading all of this file and checking everything you can you are 22824139Sjoergstill stuck, then send mail to "wnl@groupsys.com". I will answer your mail 22924139Sjoergwhen I have time. Please bear with me in that regard! If it looks like the 23024139Sjoergproblem is machine-specific, I will forward the report along to the module's 23124139Sjoergauthor. If you would like to converse directly with the module author, the 23224139Sjoergauthors' names are listed at the beginning of the module .c file in the 23324139Sjoerg"machine" directory. 234