home *** CD-ROM | disk | FTP | other *** search
/ Atari FTP / ATARI_FTP_0693.zip / ATARI_FTP_0693 / Mint / mntutm94.zoo / top.1z / top
Text File  |  1992-06-21  |  6KB  |  149 lines

  1.  
  2. NAME
  3.     top - repeatedly display system status
  4.  
  5. SYNOPSYS
  6.     top [ -i ] [ -s seconds ] [ -w width ] [ -n nlines ]
  7.  
  8. DESCRIPTION
  9.     top  is  a  program  displays  a periodically-updated picture of
  10.     what's going on in your system.
  11.  
  12.     The display  is  a  snapshot  of  system  activity  at  periodic
  13.     intervals.   The  top  line  of  the display shows the number of
  14.     milliseconds included in the interval, the  percentage  of  that
  15.     time  not accounted for in the running times of processes listed
  16.     (idle time), the number of  processes,  the  number  of  running
  17.     processes,  and  the  total number of bytes used (the sum of the
  18.     memory sizes of the processes listed).
  19.  
  20.     Below that each process in the system is listed, one  per  line.
  21.     The fields of this line have the following meanings:
  22.  
  23.     PID    The process ID of this process
  24.  
  25.     PPID    The process ID of the parent of this process.
  26.  
  27.     STATUS    The  run state of the process: Wait, Sleep, Ready, Exit,
  28.         TSR, and Stop.  The Exit state means  this  process  has
  29.         terminated,  but  its  parent  has not received its exit
  30.         code.  The Ready state includes the Run state.
  31.  
  32.     SIZE    The amount of memory allocated to this process.
  33.  
  34.     TIME    The amount of time this process has run.   This  is  the
  35.         sum  of  the  user  and  system  times  of  the process,
  36.         displayed as mm:ss.ff (minutes, seconds, and fraction of
  37.         a second) or hh:mm:ss (hours, minutes, and  seconds)  if
  38.         the process has run one hour or more.
  39.  
  40.     %    The  percentage  of  the time in this interval that this
  41.         process accounted for.
  42.  
  43.     COMMAND    The command this process is running.
  44.  
  45.     The number of processes displayed is limited by  the  number  of
  46.     lines on your screen.
  47.  
  48. OPTIONS
  49.     The following command line options are recognized:
  50.  
  51.     -s sleep
  52.         Set  the  interval  between  updates  to  sleep seconds.
  53.         Default is 5.
  54.  
  55.     -w width
  56.         Set the maximum width of a line to width.  The arguments
  57.         in the COMMAND field will be truncated so the line is no
  58.         more than width  characters  long.    The  rest  of  the
  59.         display (PID, STATUS, etc.) is not affected.  Default is
  60.         the width of your screen.
  61.  
  62.     -n nlines
  63.         Set the  maximum  number  of processes to display.  This
  64.         defaults to the length of your screen  minus  three  for
  65.         the status, input, and header lines.
  66.  
  67.     -i    interactive mode
  68.  
  69.     In  interactive  mode  the  following single-key commands can be
  70.     used:
  71.  
  72.     s    Prompt for the number of seconds between intervals.
  73.  
  74.     w    Prompt for the width; the width can  be  more  than  the
  75.         screen  width,  in  which  case long argument lists will
  76.         take up multiple lines.
  77.  
  78.     n    Prompt for the maximum number of  processes  to  display
  79.         (nlines).   This  can  be smaller than your screen size,
  80.         but not larger.
  81.  
  82.     q    Quit.
  83.  
  84.     ^L (control-L)
  85.         clear and repaint the display.
  86.  
  87. NOTES
  88.     This program uses curses and termcap.   Appropriate  environment
  89.     variables must be set up.  The screen width and height, and thus
  90.     the  wraparound  point  for wide lines and the maximum number of
  91.     processes to display, are set at startup time.
  92.  
  93.     The "snapshot of your system" really is a  snapshot:  if  things
  94.     are moving  too  fast,  you can get blur.  If a process appears,
  95.     runs, and exits during a single interval, top will never see it,
  96.     and the time it took to run will appear as "idle" time,  because
  97.     it's not accounted for by the running times of the processes top
  98.     did see.    In  fact, any time a process exits, its running time
  99.     during the last interval appears as idle time.  Also, a  process
  100.     ("A")  can  appear  in the list along with another process ("B")
  101.     which can only have started after "A" exited (e.g.  if  make  is
  102.     running,  a  link  process  can  appear on the same list with an
  103.     assembler process which produced the linker's input).   Finally,
  104.     the sum  of the percentages might be greater than 100.  All this
  105.     is  caused  by  strobe,  roundoff,  and  nonzero  shutter   time
  106.     effects.
  107.  
  108. MiNT NOTES
  109.     Interactive  mode  is slower, which is why it isn't the default.
  110.     It's slower because it uses Fselect to sleep while  waiting  for
  111.     keyboard  input, rather than using Talarm and Pause, and Fselect
  112.     sits in a loop with Syield rather than truly blocking.  MiNT 0.9
  113.     is said to fix this.
  114.  
  115.     The Ready state includes the Run  state:  since  top  itself  is
  116.     always  the  running  process  when  it  gets a chance to check,
  117.     having a separate name for it conveys no information.
  118.  
  119.     The COMMAND field is the concatenation of the  "name"  field  of
  120.     the  process  and  the  command-line  arguments  in the process'
  121.     basepage.  It can be wildly inaccurate if the process  is  using
  122.     its basepage as its DTA for a directory search.
  123.  
  124.     Processes are shown in the order they arrived from the directory
  125.     search.   If  there are more processes than lines on your screen
  126.     (or your nlines value), you'll see the  older,  less-interesting
  127.     ones and lose the newer-more interesting ones off the bottom.
  128.  
  129.     Top  sometimes gets a bus error; this could be a problem related
  130.     to operating on processes which don't  exist  any  more.    MiNT
  131.     might  have to keep a process around if any other process has it
  132.     open (i.e. has Fopen'ed the process on drive X:).
  133.  
  134. AUTHOR
  135.     Top for MiNT was written in August, 1991 by Allan  Pratt,  Atari
  136.     Corp.  (atari!apratt).    The idea for top came from the program
  137.     of that name for BSD  UNIX  systems.    The  source  code  is  a
  138.     hacked-over  version  of  ps,  written  in March of 1991 by Tony
  139.     Reynolds (cctony@sgisci1.ocis.olemiss.edu) and modified by  Eric
  140.     Smith (Mr. MiNT himself).
  141.  
  142. IMPLEMENTATION
  143.     Built with  the  MiNT library, patchlevel 19.  Using a different
  144.     library, or an earlier version of the MiNT library, may  or  may
  145.     not  cause problems; in particular, various constants defined in
  146.     <signal.h> and <ioctl.h> will probably be wrong if you  are  not
  147.     using the MiNT library.
  148.  
  149.