home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Utilities / top-0.5-MI / FAQ < prev    next >
Encoding:
Text File  |  1995-03-02  |  6.6 KB  |  139 lines

  1.                              TOP
  2.                          Version 3.3
  3.  
  4.                        William LeFebvre
  5.              and a cast of dozens
  6.  
  7.  
  8. FREQUENTLY ASKED QUESTIONS AND THEIR ANSWERS
  9.  
  10. 1. "We just upgraded our operating system to version 99.9.9.9 and top
  11.    broke.  What should we do?"
  12.  
  13.    Recompile.  Top is very sensitive to changes in internal kernel data
  14.    structures.  It is not uncommon for a new version of the operating
  15.    system to include changes to kernel data structures.
  16.  
  17. 2. "I tried compiling top under SunOS version 4.1.3 and it got compile
  18.    time errors.  Is there a patch?"
  19.  
  20.    If you try compiling top in a "System V environment" under SunOS
  21.    (that is, /usr/5bin is before /usr/bin on your path) then the 
  22.    compilation will fail.  This is mostly due to the fact that top
  23.    thinks its being compiled on a System V machine when it really isn't.
  24.    The only solution is to put /usr/bin and /usr/ucb before /usr/5bin
  25.    on your path and try again.
  26.  
  27. 3. "Under Solaris 2, when I run top as root it only shows root processes.
  28.    It refuses to show anything else.  What do I do?"
  29.  
  30.    You probably compiled it with /usr/ucb/cc instead of the real C
  31.    compiler.  /usr/ucb/cc is a cc front end that compiles programs in
  32.    BSD source-level compatability mode.  You do not want that.  Make
  33.    sure that /usr/ucb is not on your path and try compiling top again.
  34.  
  35. 4. "Under Solaris 2, when I try to run top it complains that it can't
  36.    open the library "libucb.so.1".  So I changed the LIBS line in
  37.    m_sunos5.c to include -R/usr/ucblib to make sure that the dynamic
  38.    linker will look there when top runs.  I figured this was just an
  39.    oversight.  Was I right?"
  40.  
  41.    No, you were not right.  As distributed, top requires NO alterations
  42.    for successful compilation and operations under Solaris 2.0, 2.1, 2.2,
  43.    2.3, and 2.4.  You probably compiled top with /usr/ucb/cc instead of
  44.    the real C compiler.  See FAQ #3 for more details.
  45.  
  46. 5. "Top is (not) displaying idle processes and I don't (do) want it to."
  47.  
  48.    This default has only changed about a dozen times, and I finally got
  49.    tired of people whining about it.  Go read the manual page for the
  50.    current version and pay special attention to the description of the
  51.    "TOP" environment variable.
  52.  
  53. 6. "We have so much memory in our machine that the memory status display
  54.    (the fourth line) ends up being longer than 80 characters.  This
  55.    completely messes up top's output.  Is there a patch?"
  56.  
  57.    Most modules have been changed to use new memory formatting functions
  58.    which will display large values in terms of megabytes instead of
  59.    kilobytes.  This should fix all occurences of this problem.  If you
  60.    encounter a system where this large memory display overflow is still
  61.    occurring, please let me know (send mail to <lefebvre@dis.anl.gov>).
  62.  
  63. 7. "When I run top on my SVR4-derived operating system, it displays all
  64.    the system information at the top but does not display any process
  65.    information (or only displayes process information for my own
  66.    processes).  Yet when I run it as root, everything works fine."
  67.  
  68.    Your system probably uses the pseudo file system "/proc", which is
  69.    by default only accessible by root.  Top needs to be installed setuid
  70.    root on such systems if it is going to function correctly for normal
  71.    users.
  72.  
  73. 8. "Configure said that it saw /proc and is recommending that I install
  74.    top setuid root.  Is there any way around this?  Is it safe?"
  75.  
  76.    There is no way around it.  Complain to POSIX.  Every effort has been
  77.    made to make top a secure setuid program.  However, we cannot guarantee
  78.    that there are no security problems associated with this configuration.
  79.    The places where top is most vulnerable are the builtin kill and renice
  80.    commands.  There is no internal top command that causes top to start
  81.    a shell as a subprocess.  Some SVR4 systems may contain a bug that
  82.    enables a user to renice his own processes downward (to lower nice
  83.    values that are more favorable for the process).  This problem has
  84.    been fixed for the Solaris 2.x modules, but may still exist in others.
  85.    We will hopefully fix this up in the next release.
  86.  
  87. 9. "Top is not showing the command names.  Everything else is fine, just
  88.    no command names.  What's wrong?"
  89.  
  90.    This usually occurs when top is compiled under one revision of the
  91.    operating system (say SunOS 4.1.3) but run under another (say
  92.    SunOS 4.1.3C_U1_B3_V9_Z47_*HIKE*).  What has happened is that the
  93.    user structure is different, and the location of the array that
  94.    contains the command name is not at the same offset.  Other than
  95.    maintaining separate executables for every variant of the operating
  96.    system, there is little you can do about this.  This will also occur
  97.    if you compile top on one machine sub-architecture (i.e.: sun4c) and
  98.    try to run the resulting executable on a different sub-architecture
  99.    (i.e.: sun4m).  Read "INSTALL" for more details.
  100.  
  101. 10."Is there a module that will make top work under AIX?"
  102.  
  103.    Not at the current time.  Many people have started this project but
  104.    none have yet to finish.  That may say something about the difficulty
  105.    of the task......
  106.  
  107. 11."I tried to compile top with gcc and it doesn't work (either compilation
  108.    errors in the include files or a non-working executable).  What's wrong?"
  109.  
  110.    Gnu CC likes very much to use its own include files.  Not being a gcc
  111.    expert, I can't explain why it does this.  But I can tell you that 
  112.    if you upgrade your operating system (say from SunOS 4.1.2 to SunOS
  113.    4.1.3) after installing gcc, then the include files that gcc uses will
  114.    be incorrect, especially those found in the "sys" directory.  Your
  115.    choices are:  (1) rebuild and reinstall the "standard" include files
  116.    for gcc (no I don't know how to do this), (2) compile machine.c with
  117.    "CFLAGS=-I/usr/include" then make the rest of the object files
  118.    normally, or (3) use "cc".
  119.  
  120. 12."Top is not written in ANSI C.  Do you ever plan to change that?"
  121.  
  122.    Top predates ANSI C by about 5 years.  Yeah, it'll get "fixed"
  123.    eventually (if you can call that "fixing").  Maybe in 3.4, maybe
  124.    not until 4.0.  I'm not big on standards.
  125.  
  126. 13."To whom do I report problems with top?"
  127.  
  128.    First, look through all the FAQ answers.  Chances are an answer to
  129.    your question can be found in this file.  If you still have an
  130.    unanswered question, you can send mail to "lefebvre@dis.anl.gov".
  131.    If it looks like the problem is machine-specific, I will forward the
  132.    report along to the module's author.  If you would like to converse
  133.    directly with the module author, the authors' names are listed at the
  134.    beginning of the module .c file in the "machine" directory.
  135.  
  136. 14."Are you superstitious?"
  137.  
  138.    Not usually, no.   :-)
  139.