home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / security / Watcher / Support / net.scripts / text0000.txt < prev   
Encoding:
Text File  |  1991-05-30  |  9.7 KB  |  244 lines

  1.  
  2.  
  3. Thanks to everyone who responded. The following includes the pertinent
  4. portions of the messages I received as well as some interesting watcher
  5. control files. The latest version of watcher is available via anonymous
  6. ftp on airiel.unm.edu and will also be on the SUG CD-ROM coming out in June.
  7.  
  8. Brian Fitzgerald <fitz@mml0.meche.rpi.edu>
  9. jeffrey@dvinci.usask.ca (Keith Jeffrey)
  10. Lennart Karlsson <lka@lulea.telesoft.se>
  11. mikel@mozart.amd.com (Michael W. Wellman)
  12. rob@psy.vu.nl (Rob van Leeuwen)
  13. Pete Hartman <pwh@bradley.bradley.edu>
  14. bobbi@shell.com
  15. fisherjm@kongur.eecs.ucdavis.edu (John M. Fisher)
  16. ed@lvw6.lvw.loral.com (Ed Allen)
  17.  
  18. ======================================================================
  19.  
  20. I use watcher on both SUN and HP machines.
  21.  
  22. It runs every 15 minutes and reports up/down status changes,
  23. disk usage, and load as reported by 'ruptime'.
  24.  
  25. The most frequent complaint I get from 'watcher' has to do with
  26. system loads.  I can keep fairly current on who is loading a
  27. machine with what program.  Then I can often help with a more
  28. efficient way of doing the same thing.
  29.  
  30. I have had occasions when I showed up because a machine went 'down',
  31. only to hear "I was just going to call you..."
  32.  
  33. I like 'watcher'.  I also like a recent posting to alt.sources, 'whom',
  34. because it allows me to see whence a 'rlogin' comes.
  35. =======================================================================
  36.  
  37. I have been using watcher at our site for about 3 months now. I only run it
  38. on our main file server at one hour intervals day and night.
  39. The product is reasonable in that it is fairly customisable but the information
  40. that it gives you is not all that wonderful. I basically use it to tell me
  41. when certain file systems are filling up. 
  42. The other features of assessing cpu usage and such is probably more trouble
  43. than it is worth for our situation (in a university or some such this would
  44. be a different matter).
  45.  
  46. =========================================================================
  47. I started using watcher on a provisional basis about two weeks ago.
  48. I set it up on a pair of Sparcstation 1's, one serving the other,
  49. where the disk space was very low and we often have students leaving
  50. background jobs lying around either eating up all the CPU time
  51. or being connected to an X session and preventing others from starting
  52. OpenWindows because of them.
  53.  
  54. I set it up largely like the examples in the documentation, with the
  55. exception of a script to check for background processes that belong
  56. to regular users.
  57.  
  58. I would say that so far it has been useful, but hasn't been a major
  59. boon.  Then again, the systems are fairly stable so I don't have a
  60. large number of problems to check to begin with.
  61. =========================================================================
  62. From: ed@lvw6.lvw.loral.com (Ed Allen)
  63.  
  64. #:
  65. (rsh lvw11 df | /usr/ucb/tail +2 | egrep -v "sd0[ge]") { df }
  66.     6 device%k 5 spaceused%d:
  67. #:
  68.         spaceused 15%;
  69.         spaceused 0 85.
  70.  
  71.  
  72. (rsh lvw11 df -i -t 4.2 | /usr/ucb/tail +2) { 'df -i' }
  73.     5 device%k 4 inodesused%d:
  74. #:
  75.         inodesused 15%;
  76.         inodesused 0 70.
  77.  
  78. (ruptime ) { ruptime }
  79.     2 status%s 1 machine%k 7 loadav%d:
  80.         loadav 0 3;
  81.         status.
  82.  
  83. From: prls!gordon@mips.mips.com (G Vickers)
  84.  
  85. ===========================================================================
  86.  
  87.        I have been using Watcher for several years (October 1987 )
  88.       now.  The things I have it monitor are pretty typical, but
  89.      when one also runs 'sysline', one has a powerful pair of aids.
  90.  
  91.       Sysline updates my Status Line (25th line) each minute with the time,
  92.    cpu load factor, load change, number of users, and indicates weather or
  93.    not I have mail waiting.  Most importantly, Sysline prints the first
  94.    part of any newly arrived mail to the status line, this includes the
  95.    "Subject:" line.
  96.  
  97.       When mail from Watcher is recieved, Sysline will print something
  98.    similar to : From deamon Subject: Problem report for prls.
  99.            or : From deamon Subject: No problems on prls.
  100.  
  101.       Watcher warns when log files become to large, filesystem sizes change
  102.    to quickly, processes that have used "too much" cpu time (hung processes),
  103.    and when certain log files grow too fast (syserr, sulog, etc).
  104.  
  105.       The Watcher program, other automated utilities, and Sysline have
  106.    dramatically reduced the amount of time I must spend watching our
  107.    volitile system and those that we NFS with.  Having much of the routine
  108.    system checks automated has resulted in my now spending less than one
  109.    hour a day manually monitoring the system and this is mostly to check and
  110.    read error files that my automations may create.
  111.  
  112.       Watcher has significantly reduced the amount of time I must spend 
  113.    watching the system.  Initially, the extra time I gained was spent in
  114.    writing programs to automate those task that beyond the intent of Watcher.
  115.  
  116.       I would be pleased to learn of other uses for Watcher.  It is a wonderful
  117.    program and I am suprised not to have seen newer versions released.  The
  118.    version I am running is from Oct 1987, released by the University of New
  119.    Mexico.  I have used it on VAXen with Ultrix versions 1.2 through 3.1 .
  120.  
  121. =============================================================================
  122.  
  123.  
  124. I use "watcher" to keep tabs on a variety of things on the network at
  125. the Engineering College at the University of Saskatchewan.  I am pleased
  126. to acknowledge a program this useful.  
  127.  
  128. I come from a VAX/VMS, FORTRAN background, but find myself responsible
  129. for the operation of a Sun fileserver and a loose network of 20
  130. workstations.  Some are full clients, some are servers to other
  131. workstations or to microcomputers.  They are spread out over
  132. a large building and also in other buildings.  Watcher has been
  133. extremely valuable for identifying problems with the servers, workstations
  134. and network for the past 16 months.
  135.  
  136. I run watcher on 6 machines--the ones I need to watch most closely. 
  137. They each check on other machines--typically ones they export filesystems
  138. to.  Most run watcher 4 times a day (eg., 7,12,15,2), a compromise between
  139. prompt notification and too much mail.  I altered syswatch to take an
  140. argument (passed by cron) so that I can use different Watcherfiles for 
  141. daytime, nighttime, weekends (some people turn off their workstations).
  142.  
  143. Most of the things I "watch" for are usual:
  144.  
  145.     checks for diskspace, inodes,. etc
  146.     rup for clients
  147.     check for processes using too much time
  148.     check for excessive numbers of daemons
  149.     idle sessions, console session (our console is not secure)
  150.     new lines in system messages files
  151.     large jump in any users' disk space used
  152.  
  153. We have many AppleTalk/PhoneNet segments bridged to the Ethernet with
  154. Kinetics FastPath boxes.  Two Suns run CAP software for communicating
  155. with and serving Macintosh computers and spooling to laser printers.
  156. By keying on specific AppleShare servers or printers I use watcher to
  157. verify proper operation of the AppleTalk network segment.
  158.  
  159. I use the following sequence to check that important Daemons are
  160. running--especially useful after a reboot.
  161.  
  162. #
  163. # To make Daemon file edit the output from:
  164. #       ps -axw | colrm 1 13 | awk '{print $2}' | sort | uniq > Daemons
  165. #
  166. #  Are all daemons running?
  167. #
  168. (ps -axw | tee /tmp/psaxfile | fgrep -f Daemons | colrm 1 13 |  awk '{print $2}'
  169.  | sort | uniq | comm -13 - Daemons)
  170.  { 'check daemons' }
  171.         1 daemonname%s:
  172.                 daemonname "daemon_missing".
  173.  
  174.  
  175.  
  176. While C code or a perl script would be more powerful, some of us haven't
  177. been programmers for a while.  Watcher is enough that I can quickly add
  178. functions that crop up.  There are lots of things to check on!
  179.  
  180. The biggest problem for me has been not with watcher but with the
  181. flexible output formats of the Unix utilities used as input to
  182. watcher.  Either the number of fields in an output line changes
  183. (large numbers cause fields to run together) or the columns shift
  184. to accommodate, or both.  
  185. ========================================================================
  186.  
  187. -------------watchscript----------------------------------------
  188. #! /bin/sh
  189. #
  190. #
  191.         diff oldadm /usr/adm/messages > /tmp/first$$
  192.         awk 'BEGIN {FS = ":"} {print $4, $5, $6, $7, $8}' /tmp/first$$
  193. > /tmp/ms
  194. g$$
  195.         rm /tmp/first$$
  196. #
  197.         if test -s /tmp/msg$$
  198.         then
  199. #
  200.             grep "panic" /tmp/msg$$ | sort | uniq -c >> /tmp/out$$
  201.             grep " trap " /tmp/msg$$ | sort | uniq -c >> /tmp/out$$
  202.             grep "ie0: giant packet" /tmp/msg$$ | sort | uniq -c >> /tmp/out$$
  203.             grep "rfintr: correction required" /tmp/msg$$ | sort | uniq
  204. -c >> /t
  205. mp/out$$
  206.             grep "ie0: WARNING: if_snd full" /tmp/msg$$ | sort | uniq
  207. -c >> /tmp
  208. /out$$
  209.             grep "soft ecc addr" /tmp/msg$$ | sort | uniq -c >> /tmp/out$$
  210.             grep "file system full" /tmp/msg$$ | sort | uniq -c >> /tmp/out$$
  211.             grep "read failed" /tmp/msg$$ | sort | uniq -c >> /tmp/out$$
  212.             grep "write failed (" /tmp/msg$$ | sort | uniq -c >> /tmp/out$$
  213.             grep "Hard error" /tmp/msg$$ | sort | uniq -c >> /tmp/out$$
  214. #
  215.             if test -s /tmp/out$$
  216.             then
  217. #
  218.                 ls -l oldadm | awk '{print "*****Watcher was last run
  219. at " , $5,
  220.  $6, $7}'
  221.                 cat /tmp/out$$
  222.                 rm /tmp/out$$
  223.              fi
  224.         rm /tmp/msg$$
  225.         fi
  226.         rm /tmp/out$$
  227.         rm /tmp/msg$$
  228.         cp /usr/adm/messages oldadm
  229. -----------------------------------------------------------------------
  230.  
  231. and then the input file to watcher for the parameters:
  232.  
  233. -------------------Watcherfile-----------------------------------------
  234. (watchscript) {'/usr/adm/messages'}
  235.         1 msga%s:
  236.                 msga "xxx".
  237. (df -t 4.2 | /usr/ucb/tail +2 | grep "^/dev" | grep -v swap | grep -v
  238. tmp) { 'df
  239.  no tmp' }
  240.         1-9 filesystem%k 40-44 avail%d 49-50 spaceused%d 1-9 device%k:
  241.                 spaceused 0 98.
  242. -----------------------------------------------------------------------
  243.  
  244.