home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume26 / cputt / README < prev    next >
Text File  |  1992-04-18  |  4KB  |  89 lines

  1.           Cputt - CPU Top Ten monitor for SUNOS 4.1.1
  2.           ===========================================
  3.  
  4. DISCLAIMER:
  5.  
  6.      This software has no warranty whatsoever, explicit or implicit.
  7.      The author and his employer shall not be held responsible for any
  8.      damage, direct or indirect, resulting from the use of this
  9.      software.  That being said, feel free to use it, its a useful
  10.      little utility.
  11.  
  12. PURPOSE:
  13.  
  14.      Cputt is a cpu monitoring utility which gives you a continuous
  15.      update of the top ten cpu-using processes on your system.
  16.  
  17. IMPLEMENTATION:
  18.  
  19.      Cputt takes two snapshots of the kernel process table, sleeping
  20.      for a user supplied number of seconds in between the two
  21.      snapshots.  It calculates cpu usage for each process over that
  22.      interval and prints out the results.  Execution continues for a
  23.      user supplied number of iterations.
  24.  
  25. USAGE:
  26.  
  27.      Cputt should be invoked with two arguments as follows:
  28.  
  29.           cputt <length of interval> <number of iterations>
  30.  
  31.      Cputt prints a sorted list of cpu intensive processes as follows:
  32.  
  33.           PID  USER  CPU  MEM  COMMANDS  <active processes> <ptable size>
  34.  
  35. INSTALLATION:
  36.  
  37.      Cputt should compile on any system running SUNOS 4.1.1.  Check
  38.      the #define values in cputt.h before compiling.  The only one
  39.      you need to change is MAXUSERS which should be two times the
  40.      number of /etc/passwd entries on your machine.  Just type
  41.      'make' to compile, 'make install' to install.  You must be root
  42.      to install Cputt.  The default destination is /usr/etc.
  43.  
  44. SUGGESTION:
  45.  
  46.      Cputt becomes more and more processor intensive as the length of the
  47.      interval between process table lookups decreases.  Thus a first
  48.      arguement of less than 5 is probably not real useful.  I usually
  49.      invoke it with one of the following:
  50.  
  51.      cputt 5  100  - for short term monitoring of cpu usage
  52.      cputt 10 1000 - for long term monitoring of cpu usage
  53.  
  54. ACKNOWLEDGEMENTS:
  55.  
  56.      The idea for Cputt came from Larry Schuler, a friend and co-worker.
  57.      The implementation for Cputt was largely dependent on J. Robert Ward's
  58.      'sps' utility.  I used Robert's source code to learn how to make the 
  59.      appropriate system calls for interrogating the kernel process table.
  60.      The rest of the alogorithm and implementation are my own.
  61.  
  62. IMPROVEMENTS:
  63.  
  64.      I've used all the shortcuts I know to make Cputt as trim as possible.
  65.      Floating point arithmetic is kept to a bare minimum.  Internal data
  66.      structures are allocated dynamically based on the changing status of
  67.      the process table.  Command arguements for each process are kept in
  68.      core instead of being re-evaluated at each iteration.  The sort table
  69.      contains only active processes and no extraneous information.  The
  70.      kernel reads account for the bulk of Cputt's processing overhead and
  71.      I'm unaware of anyway to alleviate this cost.  If anyone has any well
  72.      considered suggestions about how I can improve the implemenation and
  73.      performance of Cputt, I would like to hear them.
  74.  
  75. COPYRIGHT:
  76.  
  77.      Feel free to distribute Cputt to any interested parties.  Please
  78.      provide a copy of this README with any distribution.
  79.  
  80. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  81.               Greg Vesper Code 520.9
  82.            Goddard Space Flight Center
  83.             vesper@kong.gsfc.nasa.gov
  84.                Greenbelt, Maryland
  85.  
  86. "As He died to make men holy, let us live to make men free.
  87.  While God is marching on.."
  88. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  89.