124139Sjoerg TOP 289750Sdwmalone Version 3.5 389750Sdwmalone Beta Release 11 424139Sjoerg 524139Sjoerg William LeFebvre 689750Sdwmalone with much help from others 724139Sjoerg 824139Sjoerg 924139SjoergFREQUENTLY ASKED QUESTIONS AND THEIR ANSWERS 1024139Sjoerg 1124139SjoergThis FAQ is broken out in to several topics. 1224139Sjoerg 1324139Sjoerg 1424139SjoergGENERAL 1524139Sjoerg 1624139Sjoerg 1. "Where do I get the latest version of top?" 1724139Sjoerg 1889750SdwmaloneThe official site for top is "ftp.groupsys.com" in the directory 1989750Sdwmalone"/pub/top". It is also available from the following mirror sites: 2089750Sdwmalone"pharos.dgim.doc.ca" in /packages/top, "uiarchive.uiuc.edu" in 2189750Sdwmalone/pub/packages/top, "sunsite.auc.dk" in /pub/unix/top. European 2289750Sdwmaloneusers should consider using the Denmark (dk) site. 2389750Sdwmalone 2424139Sjoerg 2. "Is there a web page for top?" 2524139Sjoerg 2689750SdwmaloneYes. Point your browser at http://www.groupsys.com/top. It includes 2789750Sdwmaloneall documentation, a nice interactive display which describes the 2889750Sdwmalonevarious components of the output of top, web-based retrieval of the 2989750Sdwmalonepackage, year 2000 information, and pointers to the mailing list. 3024139Sjoerg 3124139Sjoerg 3. "Is there a mailing list for top?" 3224139Sjoerg 3389750SdwmaloneThe official list for announcements is "top-announce@groupsys.com". 3489750SdwmaloneThis list is managed by "majordomo@groupsys.com". Announcements of 3589750Sdwmaloneimportance to all top users will be sent to this list, including new 3689750Sdwmalonereleases, availability of beta test versions, emergency revisions and 3789750Sdwmalonepatches, etc. Anyone is welcome to join top-announce. This is a 3889750Sdwmaloneread-only list. The list of subscribers will not (intentionally) be 3989750Sdwmalonemade available, and postings to the list are limited. 4024139Sjoerg 4189750SdwmaloneIn addition, there is a top developers mailing list that is used by 4289750Sdwmalonebeta testers and other people who help me port the program to various 4389750Sdwmalonemachines. Membership to this list is solely at my discretion. If you 4489750Sdwmalonefeel qualified to act as a beta tester, or if you are doing development 4589750Sdwmalonework on top (such as porting to a new platform), you may submit a 4689750Sdwmalonerequest by sending a message to "top-spinners-request@groupsys.com" 4789750Sdwmalonecontaining the word "subscribe". I will contact you within a few days, 4889750Sdwmaloneas my schedule permits. 4924139Sjoerg 5089750Sdwmalone 4. "What about Year 2000 compliance"? 5124139Sjoerg 5289750SdwmaloneTop should not experience any problems with the transition to the year 5389750Sdwmalone2000. A full statement concerning top and the year 2000 can be found 5489750Sdwmalonein the file "Y2K" included with the distribution. 5589750Sdwmalone 5689750Sdwmalone 5724139Sjoerg 5. "Why does it take so long for a new version of top to go through the 5824139Sjoerg beta test process?" 5924139Sjoerg 6089750SdwmaloneThis is completely my fault. I have just not had the time to give top 6189750Sdwmalonethe attention it deserves. I thank everyone for their patience, and I 6289750Sdwmalonehope that with the recent changes in the direction of my career that I 6389750Sdwmalonecan spend more time on this. 6424139Sjoerg 6524139Sjoerg 6. "Top is not written in ANSI C. Do you ever plan to change that?" 6624139Sjoerg 6724139SjoergTop predates ANSI C by about 5 years. Yeah, it'll get "fixed" eventually. 6889750SdwmaloneProbably in 3.6. 6924139Sjoerg 7024139Sjoerg 7124139SjoergCONFIGURING 7224139Sjoerg 7324139Sjoerg 7. "Configure said that it saw /proc and is recommending that I install top 7424139Sjoerg setuid root. Is there any way around this? Is it safe?" 7524139Sjoerg 7624139SjoergThere is no way around it. Complain to POSIX. Every effort has been made 7724139Sjoergto make top a secure setuid program. However, we cannot guarantee that 7824139Sjoergthere are no security problems associated with this configuration. The 7924139Sjoergplaces where top is most vulnerable are the builtin kill and renice 8024139Sjoergcommands. There is no internal top command that causes top to start a shell 8124139Sjoergas a subprocess. Some SVR4 systems may contain a bug that enables a user to 8224139Sjoergrenice his own processes downward (to lower nice values that are more 8324139Sjoergfavorable for the process). This problem has been fixed for the Solaris 2.x 8424139Sjoergmodules, but may still exist in others. We will hopefully fix this up in 8524139Sjoergthe next release. 8624139Sjoerg 8724139Sjoerg 8. "Why is Configure a c-shell script? I thought c-shell scripts were 8824139Sjoerg evil?" 8924139Sjoerg 9024139SjoergThey are. :-) I'll probably be rewriting the Configure script for the 9189750Sdwmalonenext release, or switching to something like Gnu configure. 9224139Sjoerg 9324139Sjoerg 9424139SjoergCOMPILING 9524139Sjoerg 9624139Sjoerg 9. "We just upgraded our operating system to a new version and top broke. 9724139Sjoerg What should we do?" 9824139Sjoerg 9924139SjoergRecompile it. Top is very sensitive to changes in internal kernel data 10024139Sjoergstructures. It is not uncommon for a new version of the operating system to 10124139Sjoerginclude changes to kernel data structures. 10224139Sjoerg 10324139Sjoerg 10424139SjoergRUNNING 10524139Sjoerg 10624139Sjoerg10. "I just finished compiling top and it works fine for root, but when 10724139Sjoerg I try to run it as a regular user it either complains about files 10824139Sjoerg it can't open or it doesn't display all the information it should. 10924139Sjoerg Did I do something wrong?" 11024139Sjoerg 11124139SjoergWell, you're just not done. On many operating systems today, access to 11224139Sjoergmany of the kernel memory devices and other system files is restricted to 11324139Sjoergeither root or a particular group. The Configure script figures this out 11424139Sjoerg(usually) and makes sure that the "intsall" rule in the Makefile will 11524139Sjoerginstall top so that anyone can run it successfully. However, you have to 11624139Sjoerg*install* it first. Do this with the command "make install". 11724139Sjoerg 11824139Sjoerg11. "Top is (not) displaying idle processes and I don't (do) want it to." 11924139Sjoerg 12024139SjoergThis default has only changed about a dozen times, and I finally got tired 12124139Sjoergof people whining about it. Go read the manual page for the current version 12224139Sjoergand pay special attention to the description of the "TOP" environment 12324139Sjoergvariable. 12424139Sjoerg 12524139Sjoerg12. "We have so much memory in our machine that the memory status display 12624139Sjoerg (the fourth line) ends up being longer than 80 characters. This 12724139Sjoerg completely messes up top's output. Is there a patch?" 12824139Sjoerg 12924139SjoergMost modules have been changed to use new memory formatting functions which 13024139Sjoergwill display large values in terms of megabytes instead of kilobytes. This 13124139Sjoergshould fix all occurences of this problem. If you encounter a system where 13224139Sjoergthis large memory display overflow is still occurring, please let me know 13324139Sjoerg(send mail to <wnl@groupsys.com>). Also note that newer versions of top can 13424139Sjoerguse columns beyond 79, and understand window resizes. So you can always 13524139Sjoergmake your window bigger. 13624139Sjoerg 13724139Sjoerg13. "I tried to compile top with gcc and it doesn't work. I get 13824139Sjoerg compilation errors in the include files, or I get an executable that 13924139Sjoerg dumps core, or top displays incorrect numbers in some of the displays. 14024139Sjoerg What's wrong?" 14124139Sjoerg 14224139SjoergGnu CC likes very much to use its own include files. Not being a gcc 14389750Sdwmaloneexpert, I can't explain why it does this. But I can tell you that if 14489750Sdwmaloneyou upgrade your operating system (say from Solaris 2.4 to Solaris 14589750Sdwmalone2.5) after installing gcc, then the include files that gcc uses will 14689750Sdwmalonebe incorrect, especially those found in the "sys" directory. Your 14789750Sdwmalonechoices are: (1) rebuild and reinstall the "standard" include files 14889750Sdwmalonefor gcc (look for scripts in the distribution called "fixincludes" and 14989750Sdwmalone"fixinc.svr4"), (2) compile machine.c with "CFLAGS=-I/usr/include" 15089750Sdwmalonethen make the rest of the object files normally, or (3) use "cc". 15189750SdwmaloneSolaris 2.6 users should also consult FAQ #20. 15224139Sjoerg 15324139Sjoerg14. "The cpu state percentages are all wrong, indicating that my machine is 15424139Sjoerg using 95% system time when it is clearly idle. What's wrong?" 15524139Sjoerg 15624139SjoergThis can happen if you compiled with gcc using the wrong include files. 15724139SjoergSee the previous question. 15824139Sjoerg 15924139Sjoerg 16024139SjoergSUNOS PROBLEMS 16124139Sjoerg 16224139Sjoerg15. "I tried compiling top under SunOS version 4.1.x and it got compile time 16324139Sjoerg errors. Is there a patch?" 16424139Sjoerg 16524139SjoergIf you try compiling top in a "System V environment" under SunOS (that is, 16624139Sjoerg/usr/5bin is before /usr/bin on your path) then the compilation may fail. 16724139SjoergThis is mostly due to the fact that top thinks its being compiled on a 16824139SjoergSystem V machine when it really isn't. The only solution is to put /usr/bin 16924139Sjoergand /usr/ucb before /usr/5bin on your path and try again. 17024139Sjoerg 17124139Sjoerg 17224139SjoergSVR4-derived PROBLEMS 17324139Sjoerg 17424139Sjoerg16. "When I run top on my SVR4-derived operating system, it displays all 17524139Sjoerg the system information at the top but does not display any process 17624139Sjoerg information (or only displayes process information for my own 17724139Sjoerg processes). Yet when I run it as root, everything works fine." 17824139Sjoerg 17924139SjoergYour system probably uses the pseudo file system "/proc", which is by 18024139Sjoergdefault only accessible by root. Top needs to be installed setuid root on 18124139Sjoergsuch systems if it is going to function correctly for normal users. 18224139Sjoerg 18324139Sjoerg 18424139SjoergSOLARIS PROBLEMS 18524139Sjoerg 18624139Sjoerg17. "Under Solaris 2, when I run top as root it only shows root processes, 18724139Sjoerg or it only shows processes with a PID less than 1000. It refuses to 18824139Sjoerg show anything else. What do I do?" 18924139Sjoerg 19024139SjoergYou probably compiled it with /usr/ucb/cc instead of the real C compiler. 19124139Sjoerg/usr/ucb/cc is a cc front end that compiles programs in BSD source-level 19224139Sjoergcompatability mode. You do not want that. Make sure that /usr/ucb is not 19324139Sjoergon your path and try compiling top again. 19424139Sjoerg 19524139Sjoerg18. "Under Solaris 2, I compiled top using what I am sure is the correct 19624139Sjoerg compiler but when I try to run it it complains about missing dynamic 19724139Sjoerg libraries. What is wrong?" 19824139Sjoerg 19924139SjoergCheck to see if you have LD_LIBRARY_PATH defined in your shell. If you do, 20024139Sjoergmake sure that /usr/ucblib is not on the path anywhere. Then try compiling 20124139Sjoergtop again. 20224139Sjoerg 20324139Sjoerg19. "Under Solaris 2, when I try to run top it complains that it can't open 20424139Sjoerg the library "libucb.so.1". So I changed the LIBS line in m_sunos5.c 20524139Sjoerg to include -R/usr/ucblib to make sure that the dynamic linker will look 20624139Sjoerg there when top runs. I figured this was just an oversight. Was I 20724139Sjoerg right?" 20824139Sjoerg 20989750SdwmaloneNo, you were not right. As distributed, top requires NO alterations 21089750Sdwmalonefor successful compilation and operations under any release of Solaris 21189750Sdwmalone2. You probably compiled top with /usr/ucb/cc instead of the real C 21224139Sjoergcompiler. See FAQ #10 for more details. 21324139Sjoerg 21489750Sdwmalone20. "When I try to compile top under Solaris 2.6 using gcc I get compile 21589750Sdwmalone time errors. There appear to be problems with the include files, 21689750Sdwmalone such as 'u_rlimit has incomplete type' and/or 'u_saved_rlimit has 21789750Sdwmalone incomplete type'. I've already run fixinc.svr4 as per FAQ #13. 21889750Sdwmalone Why didn't that fix it?" 21924139Sjoerg 22089750SdwmaloneOnly top versions 3.5 and later are compatible with Solaris 2.6. Make 22189750Sdwmalonesure you are using the most up-to-date version. Earlier beta release 22289750Sdwmalonecopies of version 3.5 had additional problems when compiled with gcc. 22389750SdwmaloneRetrieve the official version 3.5 (non-beta) release from one of the 22489750Sdwmalonesites listed in FAQ #1 or FAQ #2. 22589750Sdwmalone 22689750Sdwmalone 22724139SjoergSCO PROBLEMS 22824139Sjoerg 22989750Sdwmalone21. "When I try to run Configure, it complains about a syntax error." 23024139Sjoerg 23189750SdwmaloneSome versions of SCO's csh do not understand the syntax "$<". Earlier 23289750Sdwmalonereleases of top depended on this syntax to read input from the installer's 23389750Sdwmaloneterminal during the installation process. Version 3.5 fixes this. 23424139Sjoerg 23524139Sjoerg 23624139SjoergSVR42 PROBLEMS 23724139Sjoerg 23889750Sdwmalone22. "The memory display doesn't work right. Why?" 23924139Sjoerg 24024139SjoergThis is a known bug with the svr42 module. The problem has been traced down 24124139Sjoergto a potential bug in the "mem" driver. The author of the svr42 module is 24224139Sjoergworking on a fix. 24324139Sjoerg 24424139Sjoerg 24524139SjoergSTILL STUCK 24624139Sjoerg 24789750Sdwmalone23. I'm still stuck. To whom do I report problems with top?" 24824139Sjoerg 24924139SjoergThe most common problems are caused by top's sensitivity to internal kernel 25024139Sjoergdata structures. So make sure that you are using the right include files, 25124139Sjoergand make sure that you test out top on the same machine where you compiled 25224139Sjoergit. Sun's BSD Source Compatability Mode is also a common culprit. Make 25324139Sjoergsure you aren't using either /usr/ucb/cc or any of the libraries in 25424139Sjoerg/usr/ucblib. Finally, make sure you are using the correct module. If there 25524139Sjoergdoes not appear to be one appropriate for your computer, then top probably 25624139Sjoergwill not work on your system. 25724139Sjoerg 25824139SjoergIf after reading all of this file and checking everything you can you are 25924139Sjoergstill stuck, then send mail to "wnl@groupsys.com". I will answer your mail 26024139Sjoergwhen I have time. Please bear with me in that regard! If it looks like the 26124139Sjoergproblem is machine-specific, I will forward the report along to the module's 26224139Sjoergauthor. If you would like to converse directly with the module author, the 26324139Sjoergauthors' names are listed at the beginning of the module .c file in the 26424139Sjoerg"machine" directory. 265