home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume40 / nocol / part26 < prev    next >
Encoding:
Text File  |  1993-11-24  |  52.0 KB  |  1,665 lines

  1. Newsgroups: comp.sources.misc
  2. From: vikas@jvnc.net (Vikas Aggarwal)
  3. Subject: v40i156:  nocol - Network Monitoring System, Part26/26
  4. Message-ID: <1993Nov24.164016.2291@sparky.sterling.com>
  5. X-Md4-Signature: 34e06d6a4960e79103d724562eb72cc8
  6. Sender: kent@sparky.sterling.com (Kent Landfield)
  7. Organization: Sterling Software
  8. Date: Wed, 24 Nov 1993 16:40:16 GMT
  9. Approved: kent@sparky.sterling.com
  10.  
  11. Submitted-by: vikas@jvnc.net (Vikas Aggarwal)
  12. Posting-number: Volume 40, Issue 156
  13. Archive-name: nocol/part26
  14. Environment: INET, UNIX
  15.  
  16. #! /bin/sh
  17. # This is a shell archive.  Remove anything before this line, then feed it
  18. # into a shell via "sh file" or similar.  To overwrite existing files,
  19. # type "sh file -c".
  20. # Contents:  nocol-3.0/src/COPYRIGHT nocol-3.0/src/HISTORY
  21. #   nocol-3.0/src/PORTING nocol-3.0/src/cmu-snmp/HISTORY
  22. #   nocol-3.0/src/cmu-snmp/HOST nocol-3.0/src/cmu-snmp/Makefile
  23. #   nocol-3.0/src/cmu-snmp/VERSION
  24. #   nocol-3.0/src/cmu-snmp/apps/Makefile
  25. #   nocol-3.0/src/cmu-snmp/apps/kernel.c
  26. #   nocol-3.0/src/cmu-snmp/exclude
  27. #   nocol-3.0/src/cmu-snmp/include/Makefile
  28. #   nocol-3.0/src/cmu-snmp/snmplib/Makefile nocol-3.0/src/doc/Makefile
  29. #   nocol-3.0/src/doc/netmon.1 nocol-3.0/src/eventselect/Makefile
  30. #   nocol-3.0/src/noclog/newtest.c nocol-3.0/src/noclog/noclogd-confg
  31. #   nocol-3.0/src/perlnocol/Makefile
  32. #   nocol-3.0/src/perlnocol/bgpmon-confg
  33. #   nocol-3.0/src/perlnocol/bpmon-confg
  34. #   nocol-3.0/src/perlnocol/mkarmon
  35. #   nocol-3.0/src/perlnocol/modemmon-confg
  36. #   nocol-3.0/src/perlnocol/novellmon-confg
  37. #   nocol-3.0/src/pingmon/README nocol-3.0/src/pingmon/ipnodes
  38. #   nocol-3.0/src/portmon/portmon-confg nocol-3.0/src/support/README
  39. #   nocol-3.0/src/support/mping/Makefile
  40. #   nocol-3.0/src/support/mping/README
  41. #   nocol-3.0/src/support/mping/msummary.out
  42. #   nocol-3.0/src/support/mping/smooth.pl
  43. #   nocol-3.0/src/support/mping/spqr.c
  44. #   nocol-3.0/src/support/mping/t1.pl
  45. #   nocol-3.0/src/support/multiping/Makefile
  46. #   nocol-3.0/src/support/multiping/README
  47. #   nocol-3.0/src/support/multiping/vars.h
  48. #   nocol-3.0/src/tpmon/tpmon-confg nocol-3.0/src/utility/Makefile
  49. #   nocol-3.0/src/utility/display_nocol_datafile.c
  50. #   nocol-3.0/src/utility/myinstall nocol-3.0/src/utility/notifier
  51. #   nocol-3.0/src/utility/show_nocol_struct_sizes.c
  52. #   nocol-3.0/src/version.h
  53. # Wrapped by kent@sparky on Tue Nov  9 22:22:31 1993
  54. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
  55. echo If this archive is complete, you will see the following message:
  56. echo '          "shar: End of archive 26 (of 26)."'
  57. if test -f 'nocol-3.0/src/COPYRIGHT' -a "${1}" != "-c" ; then 
  58.   echo shar: Will not clobber existing file \"'nocol-3.0/src/COPYRIGHT'\"
  59. else
  60.   echo shar: Extracting \"'nocol-3.0/src/COPYRIGHT'\" \(1143 characters\)
  61.   sed "s/^X//" >'nocol-3.0/src/COPYRIGHT' <<'END_OF_FILE'
  62. X  Copyright 1993 JvNCnet, Global Enterprise Services
  63. X
  64. X  Permission to use, copy, modify and distribute this software and its
  65. X  documentation for any purpose is hereby granted  without fee, provided
  66. X  that the above copyright notice appear in all copies and that both
  67. X  that copyright notice and this permission notice appear in supporting
  68. X  documentation, and that the name of JvNCnet or Global Enterprise
  69. X  Services not be used in advertising or publicity pertaining to
  70. X  distribution of the software without specific, written prior
  71. X  permission. Global Enterprise Services makes no representations about
  72. X  the suitability of this software for any purpose.  It is provided "as
  73. X  is" without express or implied warranty.
  74. X
  75. X  GLOBAL ENTERPRISE SERVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO
  76. X  THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  77. X  FITNESS. IN NO EVENT SHALL GLOBAL ENTERPRISE SERVICES BE LIABLE FOR
  78. X  ANY DAMAGES WHATSOEVER, INCLUDING DAMAGES RESULTING FROM LOSS OF USE,
  79. X  DATA OR PROFITS, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  80. X  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  81. X
  82. END_OF_FILE
  83.   if test 1143 -ne `wc -c <'nocol-3.0/src/COPYRIGHT'`; then
  84.     echo shar: \"'nocol-3.0/src/COPYRIGHT'\" unpacked with wrong size!
  85.   fi
  86.   # end of 'nocol-3.0/src/COPYRIGHT'
  87. fi
  88. if test -f 'nocol-3.0/src/HISTORY' -a "${1}" != "-c" ; then 
  89.   echo shar: Will not clobber existing file \"'nocol-3.0/src/HISTORY'\"
  90. else
  91.   echo shar: Extracting \"'nocol-3.0/src/HISTORY'\" \(407 characters\)
  92.   sed "s/^X//" >'nocol-3.0/src/HISTORY' <<'END_OF_FILE'
  93. X            HISTORY
  94. X            
  95. Xnocol v3.0    Nov 1, 1993
  96. X----------
  97. X
  98. XMajor new release with nocol library, cleaner code. Logging, PERL
  99. Xinterface, genmon, eventselect, portmon. Deleted tsmon from the
  100. Xdistribution.
  101. X
  102. Xnocol v2.0    Jun 18, 1992
  103. X---------
  104. X
  105. XFirst public release
  106. X
  107. XThe top level makefile was defining BIN instead of BINDIR. Fixed, and
  108. Xalso added MFLAGS and MSGSDIR
  109. X
  110. XFixed bug in the CMU code in cmu-snmp/snmplib/asn1.c
  111. X
  112. END_OF_FILE
  113.   if test 407 -ne `wc -c <'nocol-3.0/src/HISTORY'`; then
  114.     echo shar: \"'nocol-3.0/src/HISTORY'\" unpacked with wrong size!
  115.   fi
  116.   # end of 'nocol-3.0/src/HISTORY'
  117. fi
  118. if test -f 'nocol-3.0/src/PORTING' -a "${1}" != "-c" ; then 
  119.   echo shar: Will not clobber existing file \"'nocol-3.0/src/PORTING'\"
  120. else
  121.   echo shar: Extracting \"'nocol-3.0/src/PORTING'\" \(721 characters\)
  122.   sed "s/^X//" >'nocol-3.0/src/PORTING' <<'END_OF_FILE'
  123. XPORTING NOCOL TO MISC PLATFORMS
  124. X===============================
  125. X
  126. XThis file contains possible tips towards compiling NOCOL-v3 on
  127. Xmisc Unix systems.
  128. X
  129. XSolaris2.2
  130. X----------
  131. X1. NEEDOBJS = bstring.o random.o ftime.o
  132. X
  133. X2. SYSLIBS = -lresolv -lsocket -lnsl (for BSD socket routines)
  134. X
  135. X3. RANLIB = touch
  136. X
  137. X4. INSTALL = $(SRCDIR)/utility/myinstall
  138. X
  139. X
  140. XHP/UX
  141. X-----
  142. X1. NEEDOBJS = bstring.o random.o ftime.o
  143. X
  144. X2. SYSLIBS = <nothing>
  145. X
  146. X3. RANLIB = touch
  147. X
  148. X4. INSTALL = $(SRCDIR)/utility/myinstall
  149. X
  150. X5. '-ltermcap' library does not exist so delete it manually from
  151. X   netmon/Makefile.
  152. X
  153. X
  154. XUltrix 4.2
  155. X---------
  156. X1. Does not need any NEEDOBJS or SYSLIBS. Delete all from the list.
  157. X
  158. X    SYSLIBS = 
  159. X
  160. X
  161. X
  162. X        -Vikas Aggarwal
  163. X         JvNCnet, GES
  164. X         --------------
  165. END_OF_FILE
  166.   if test 721 -ne `wc -c <'nocol-3.0/src/PORTING'`; then
  167.     echo shar: \"'nocol-3.0/src/PORTING'\" unpacked with wrong size!
  168.   fi
  169.   # end of 'nocol-3.0/src/PORTING'
  170. fi
  171. if test -f 'nocol-3.0/src/cmu-snmp/HISTORY' -a "${1}" != "-c" ; then 
  172.   echo shar: Will not clobber existing file \"'nocol-3.0/src/cmu-snmp/HISTORY'\"
  173. else
  174.   echo shar: Extracting \"'nocol-3.0/src/cmu-snmp/HISTORY'\" \(499 characters\)
  175.   sed "s/^X//" >'nocol-3.0/src/cmu-snmp/HISTORY' <<'END_OF_FILE'
  176. XVersion .91:  Changed the ASN type for the types: Counter, Ipaddress, gauge,
  177. Xtimeticks, and opaque.  The SMI defines them as application specific types,
  178. Xnot ASN_INTEGER and ASN_OCTET_STRING.
  179. XVersion 1.0 Added snmpnetstat, snmptrap, snmptrapd.  Everything runs on a new
  180. XAPI that has an asynchronous interface.  Most old hard-coded limits are either
  181. Xnon-existent or much larger than necessary.  The mib module now gets it's data
  182. Xby parsing a text file in the same ASN.1 format as is given in RFC1066.
  183. END_OF_FILE
  184.   if test 499 -ne `wc -c <'nocol-3.0/src/cmu-snmp/HISTORY'`; then
  185.     echo shar: \"'nocol-3.0/src/cmu-snmp/HISTORY'\" unpacked with wrong size!
  186.   fi
  187.   # end of 'nocol-3.0/src/cmu-snmp/HISTORY'
  188. fi
  189. if test -f 'nocol-3.0/src/cmu-snmp/HOST' -a "${1}" != "-c" ; then 
  190.   echo shar: Will not clobber existing file \"'nocol-3.0/src/cmu-snmp/HOST'\"
  191. else
  192.   echo shar: Extracting \"'nocol-3.0/src/cmu-snmp/HOST'\" \(25 characters\)
  193.   sed "s/^X//" >'nocol-3.0/src/cmu-snmp/HOST' <<'END_OF_FILE'
  194. Xlancaster.andrew.cmu.edu
  195. END_OF_FILE
  196.   if test 25 -ne `wc -c <'nocol-3.0/src/cmu-snmp/HOST'`; then
  197.     echo shar: \"'nocol-3.0/src/cmu-snmp/HOST'\" unpacked with wrong size!
  198.   fi
  199.   # end of 'nocol-3.0/src/cmu-snmp/HOST'
  200. fi
  201. if test -f 'nocol-3.0/src/cmu-snmp/Makefile' -a "${1}" != "-c" ; then 
  202.   echo shar: Will not clobber existing file \"'nocol-3.0/src/cmu-snmp/Makefile'\"
  203. else
  204.   echo shar: Extracting \"'nocol-3.0/src/cmu-snmp/Makefile'\" \(971 characters\)
  205.   sed "s/^X//" >'nocol-3.0/src/cmu-snmp/Makefile' <<'END_OF_FILE'
  206. X
  207. XTARG = bin/snmpget bin/snmpgetnext bin/snmpstatus bin/snmpwalk bin/snmptest bin/snmptrap bin/snmptrapd bin/snmpnetstat bin/snmpmon bin/snmpd
  208. X
  209. Xall:    makeall
  210. X
  211. Xinstall:  apps/snmpget apps/snmpgetnext apps/snmpstatus apps/snmpwalk apps/snmptest apps/snmptrap apps/snmptrapd apps/snmpnetstat/snmpnetstat apps/snmpd
  212. X    cp apps/snmpget bin/snmpget
  213. X    cp apps/snmpgetnext bin/snmpgetnext
  214. X    cp apps/snmpstatus bin/snmpstatus
  215. X    cp apps/snmpwalk bin/snmpwalk
  216. X    cp apps/snmptest bin/snmptest
  217. X    cp apps/snmptrap bin/snmptrap
  218. X    cp apps/snmptrapd bin/snmptrapd
  219. X    cp apps/snmpnetstat/snmpnetstat bin/snmpnetstat
  220. X    cp apps/snmpd bin/snmpd
  221. X
  222. Xapps/snmpget apps/snmpgetnext apps/snmpstatus apps/snmpwalk apps/snmptest apps/snmptrap apps/snmptrapd apps/snmpnetstat/snmpnetstat apps/snmpmon apps/snmpd: makeall
  223. X
  224. Xmakeall:
  225. X    cd snmplib; make all install
  226. X    cd apps; make
  227. X    cd apps/snmpnetstat; make
  228. X
  229. Xclean:
  230. X    cd snmplib; make clean
  231. X    cd apps; make clean
  232. X    cd apps/snmpnetstat; make clean
  233. X    cd include; make clean
  234. X
  235. X
  236. END_OF_FILE
  237.   if test 971 -ne `wc -c <'nocol-3.0/src/cmu-snmp/Makefile'`; then
  238.     echo shar: \"'nocol-3.0/src/cmu-snmp/Makefile'\" unpacked with wrong size!
  239.   fi
  240.   # end of 'nocol-3.0/src/cmu-snmp/Makefile'
  241. fi
  242. if test -f 'nocol-3.0/src/cmu-snmp/VERSION' -a "${1}" != "-c" ; then 
  243.   echo shar: Will not clobber existing file \"'nocol-3.0/src/cmu-snmp/VERSION'\"
  244. else
  245.   echo shar: Extracting \"'nocol-3.0/src/cmu-snmp/VERSION'\" \(5 characters\)
  246.   sed "s/^X//" >'nocol-3.0/src/cmu-snmp/VERSION' <<'END_OF_FILE'
  247. X1.1b
  248. END_OF_FILE
  249.   if test 5 -ne `wc -c <'nocol-3.0/src/cmu-snmp/VERSION'`; then
  250.     echo shar: \"'nocol-3.0/src/cmu-snmp/VERSION'\" unpacked with wrong size!
  251.   fi
  252.   # end of 'nocol-3.0/src/cmu-snmp/VERSION'
  253. fi
  254. if test -f 'nocol-3.0/src/cmu-snmp/apps/Makefile' -a "${1}" != "-c" ; then 
  255.   echo shar: Will not clobber existing file \"'nocol-3.0/src/cmu-snmp/apps/Makefile'\"
  256. else
  257.   echo shar: Extracting \"'nocol-3.0/src/cmu-snmp/apps/Makefile'\" \(918 characters\)
  258.   sed "s/^X//" >'nocol-3.0/src/cmu-snmp/apps/Makefile' <<'END_OF_FILE'
  259. X#
  260. X# Makefile for snmpget, snmpgetnext, snmpwalk, snmpstatus, snmptest snmptrap snmptrapd snmpd
  261. X#
  262. XTARG=    snmpget snmpgetnext snmpwalk snmpstatus snmptest snmptrap snmptrapd snmpd
  263. XLIBS=    ../lib/libsnmp.a
  264. XCFLAGS=-g -I../include
  265. X
  266. Xall: $(TARG)
  267. X
  268. Xsnmpget:    snmpget.o ${LIBS}
  269. X    ${CC} -o $@ snmpget.o ${LIBS}
  270. X
  271. Xsnmpgetnext:    snmpgetnext.o ${LIBS}
  272. X    ${CC} -o $@ snmpgetnext.o ${LIBS}
  273. X
  274. Xsnmpwalk:    snmpwalk.o ${LIBS}
  275. X    ${CC} -o $@ snmpwalk.o ${LIBS}
  276. X
  277. Xsnmpstatus:    snmpstatus.o ${LIBS}
  278. X    ${CC} -o $@ snmpstatus.o ${LIBS}
  279. X
  280. Xsnmptest:    snmptest.o ${LIBS}
  281. X    ${CC} -o $@ snmptest.o ${LIBS}
  282. X
  283. Xsnmptrap:    snmptrap.o ${LIBS}
  284. X    ${CC} -o $@ snmptrap.o ${LIBS}
  285. X
  286. Xsnmptrapd:    snmptrapd.o ${LIBS}
  287. X    ${CC} -o $@ snmptrapd.o ${LIBS}
  288. X
  289. Xsnmpd:    snmpd.o kernel.o ${LIBS} snmp_agent.o snmp_vars.o snmp_var_route.o
  290. X    ${CC} -o $@ snmpd.o kernel.o snmp_agent.o snmp_vars.o snmp_var_route.o ${LIBS}
  291. X
  292. Xclean:
  293. X    rm -f *.o ${TARG}
  294. X
  295. Xinstall:
  296. X    cp ${TARG} ../bin
  297. END_OF_FILE
  298.   if test 918 -ne `wc -c <'nocol-3.0/src/cmu-snmp/apps/Makefile'`; then
  299.     echo shar: \"'nocol-3.0/src/cmu-snmp/apps/Makefile'\" unpacked with wrong size!
  300.   fi
  301.   # end of 'nocol-3.0/src/cmu-snmp/apps/Makefile'
  302. fi
  303. if test -f 'nocol-3.0/src/cmu-snmp/apps/kernel.c' -a "${1}" != "-c" ; then 
  304.   echo shar: Will not clobber existing file \"'nocol-3.0/src/cmu-snmp/apps/kernel.c'\"
  305. else
  306.   echo shar: Extracting \"'nocol-3.0/src/cmu-snmp/apps/kernel.c'\" \(672 characters\)
  307.   sed "s/^X//" >'nocol-3.0/src/cmu-snmp/apps/kernel.c' <<'END_OF_FILE'
  308. X
  309. X#include <sys/types.h>
  310. X#include <stdio.h>
  311. X
  312. Xstatic int kmem;
  313. Xint swap, mem;
  314. X
  315. Xinit_kmem(file)
  316. X    char *file;
  317. X{
  318. X    kmem = open(file, 0);
  319. X    if (kmem < 0){
  320. X    fprintf(stderr, "cannot open ");
  321. X    perror(file);
  322. X    exit(1);
  323. X    }
  324. X#ifdef ibm032
  325. X    mem = open("/dev/mem");    
  326. X    if (mem < 0){
  327. X    fprintf(stderr, "cannot open ");
  328. X    perror(file);
  329. X    exit(1);
  330. X    }
  331. X    swap = open("/dev/drum");
  332. X    if (swap < 0){
  333. X    fprintf(stderr, "cannot open ");
  334. X    perror(file);
  335. X    exit(1);
  336. X    }
  337. X#endif
  338. X}
  339. X
  340. X/*
  341. X * Seek into the kernel for a value.
  342. X */
  343. Xoff_t
  344. Xklseek(base)
  345. X    off_t base;
  346. X{
  347. X    return (lseek(kmem, base, 0));
  348. X}
  349. X
  350. Xklread(buf, buflen)
  351. X    char *buf;
  352. X    int buflen;
  353. X{
  354. X    read(kmem, buf, buflen);
  355. X}
  356. X
  357. END_OF_FILE
  358.   if test 672 -ne `wc -c <'nocol-3.0/src/cmu-snmp/apps/kernel.c'`; then
  359.     echo shar: \"'nocol-3.0/src/cmu-snmp/apps/kernel.c'\" unpacked with wrong size!
  360.   fi
  361.   # end of 'nocol-3.0/src/cmu-snmp/apps/kernel.c'
  362. fi
  363. if test -f 'nocol-3.0/src/cmu-snmp/exclude' -a "${1}" != "-c" ; then 
  364.   echo shar: Will not clobber existing file \"'nocol-3.0/src/cmu-snmp/exclude'\"
  365. else
  366.   echo shar: Extracting \"'nocol-3.0/src/cmu-snmp/exclude'\" \(234 characters\)
  367.   sed "s/^X//" >'nocol-3.0/src/cmu-snmp/exclude' <<'END_OF_FILE'
  368. Xapps/RCS
  369. Xapps/snmpget
  370. Xapps/snmpgetnext
  371. Xapps/snmpnetstat
  372. Xapps/snmpnetstat.c
  373. Xapps/snmpns.c
  374. Xapps/snmpstatus
  375. Xapps/snmptest
  376. Xapps/snmpwalk
  377. Xman/RCS
  378. Xsnmplib/OLDRCS
  379. Xsnmplib/RCS
  380. Xsnmplib/snmp_if.c
  381. Xsnmplib/snmp_if.h
  382. Xkip
  383. Xexclude
  384. Xapps/Makefile.new
  385. END_OF_FILE
  386.   if test 234 -ne `wc -c <'nocol-3.0/src/cmu-snmp/exclude'`; then
  387.     echo shar: \"'nocol-3.0/src/cmu-snmp/exclude'\" unpacked with wrong size!
  388.   fi
  389.   # end of 'nocol-3.0/src/cmu-snmp/exclude'
  390. fi
  391. if test -f 'nocol-3.0/src/cmu-snmp/include/Makefile' -a "${1}" != "-c" ; then 
  392.   echo shar: Will not clobber existing file \"'nocol-3.0/src/cmu-snmp/include/Makefile'\"
  393. else
  394.   echo shar: Extracting \"'nocol-3.0/src/cmu-snmp/include/Makefile'\" \(942 characters\)
  395.   sed "s/^X//" >'nocol-3.0/src/cmu-snmp/include/Makefile' <<'END_OF_FILE'
  396. X#
  397. X# Makefile for snmplib
  398. X#
  399. XTARG=    libsnmp.a
  400. XCSRCS=    snmp_client.c snmp.c snmp_auth.c asn1.c mib.c parse.c snmp_api.c
  401. XOBJS=    snmp_client.o snmp.o snmp_auth.o asn1.o mib.o parse.o snmp_api.o
  402. XCFLAGS=-g
  403. X
  404. Xall: $(TARG)
  405. X
  406. Xlibsnmp.a:    ${OBJS}
  407. X    ar r libsnmp.a ${OBJS}
  408. X    ranlib libsnmp.a
  409. X
  410. Xinstall:    ../lib/libsnmp.a
  411. X
  412. X../lib/libsnmp.a:    libsnmp.a
  413. X    cp libsnmp.a ../lib
  414. X    ranlib ../lib/libsnmp.a
  415. X
  416. X
  417. Xlint:
  418. X    lint -nhx $(CSRCS)
  419. X
  420. Xclean:
  421. X    rm -f ${OBJS} ${TARG}
  422. X    rm -f ../lib/${TARG}
  423. X
  424. Xasn1.o: ./asn1.h
  425. Xmib.o: ./asn1.h
  426. Xmib.o: ./snmp_impl.h
  427. Xmib.o: ./snmp_api.h
  428. Xmib.o: ./parse.h
  429. Xparse.o: ./parse.h
  430. Xsnmp.o: ./asn1.h
  431. Xsnmp.o: ./snmp.h
  432. Xsnmp.o: ./snmp_impl.h
  433. Xsnmp.o: ./mib.h
  434. Xsnmp_api.o: ./asn1.h
  435. Xsnmp_api.o: ./snmp.h
  436. Xsnmp_api.o: ./snmp_impl.h
  437. Xsnmp_api.o: ./snmp_api.h
  438. Xsnmp_auth.o: ./asn1.h
  439. Xsnmp_auth.o: ./snmp.h
  440. Xsnmp_auth.o: ./snmp_impl.h
  441. Xsnmp_client.o: ./asn1.h
  442. Xsnmp_client.o: ./snmp.h
  443. Xsnmp_client.o: ./snmp_impl.h
  444. Xsnmp_client.o: ./snmp_api.h
  445. Xsnmp_client.o: ./snmp_client.h
  446. X
  447. END_OF_FILE
  448.   if test 942 -ne `wc -c <'nocol-3.0/src/cmu-snmp/include/Makefile'`; then
  449.     echo shar: \"'nocol-3.0/src/cmu-snmp/include/Makefile'\" unpacked with wrong size!
  450.   fi
  451.   # end of 'nocol-3.0/src/cmu-snmp/include/Makefile'
  452. fi
  453. if test -f 'nocol-3.0/src/cmu-snmp/snmplib/Makefile' -a "${1}" != "-c" ; then 
  454.   echo shar: Will not clobber existing file \"'nocol-3.0/src/cmu-snmp/snmplib/Makefile'\"
  455. else
  456.   echo shar: Extracting \"'nocol-3.0/src/cmu-snmp/snmplib/Makefile'\" \(964 characters\)
  457.   sed "s/^X//" >'nocol-3.0/src/cmu-snmp/snmplib/Makefile' <<'END_OF_FILE'
  458. X#
  459. X# Makefile for snmplib
  460. X#
  461. XTARG=    libsnmp.a
  462. XCSRCS=    snmp_client.c snmp.c snmp_auth.c asn1.c mib.c parse.c snmp_api.c
  463. XOBJS=    snmp_client.o snmp.o snmp_auth.o asn1.o mib.o parse.o snmp_api.o
  464. XCFLAGS= -g
  465. XRANLIB=    ranlib
  466. X
  467. Xall: $(TARG)
  468. X
  469. Xlibsnmp.a:    ${OBJS}
  470. X    ar r libsnmp.a ${OBJS}
  471. X    $(RANLIB) libsnmp.a
  472. X
  473. Xinstall:    ../lib/libsnmp.a
  474. X
  475. X../lib/libsnmp.a:    libsnmp.a
  476. X    cp libsnmp.a ../lib
  477. X    $(RANLIB) ../lib/libsnmp.a
  478. X
  479. X
  480. Xlint:
  481. X    lint -nhx $(CSRCS)
  482. X
  483. Xclean:
  484. X    rm -f ${OBJS} ${TARG}
  485. X    rm -f ../lib/${TARG}
  486. X
  487. Xasn1.o: ./asn1.h
  488. Xmib.o: ./asn1.h
  489. Xmib.o: ./snmp_impl.h
  490. Xmib.o: ./snmp_api.h
  491. Xmib.o: ./parse.h
  492. Xparse.o: ./parse.h
  493. Xsnmp.o: ./asn1.h
  494. Xsnmp.o: ./snmp.h
  495. Xsnmp.o: ./snmp_impl.h
  496. Xsnmp.o: ./mib.h
  497. Xsnmp_api.o: ./asn1.h
  498. Xsnmp_api.o: ./snmp.h
  499. Xsnmp_api.o: ./snmp_impl.h
  500. Xsnmp_api.o: ./snmp_api.h
  501. Xsnmp_auth.o: ./asn1.h
  502. Xsnmp_auth.o: ./snmp.h
  503. Xsnmp_auth.o: ./snmp_impl.h
  504. Xsnmp_client.o: ./asn1.h
  505. Xsnmp_client.o: ./snmp.h
  506. Xsnmp_client.o: ./snmp_impl.h
  507. Xsnmp_client.o: ./snmp_api.h
  508. Xsnmp_client.o: ./snmp_client.h
  509. X
  510. END_OF_FILE
  511.   if test 964 -ne `wc -c <'nocol-3.0/src/cmu-snmp/snmplib/Makefile'`; then
  512.     echo shar: \"'nocol-3.0/src/cmu-snmp/snmplib/Makefile'\" unpacked with wrong size!
  513.   fi
  514.   # end of 'nocol-3.0/src/cmu-snmp/snmplib/Makefile'
  515. fi
  516. if test -f 'nocol-3.0/src/doc/Makefile' -a "${1}" != "-c" ; then 
  517.   echo shar: Will not clobber existing file \"'nocol-3.0/src/doc/Makefile'\"
  518. else
  519.   echo shar: Extracting \"'nocol-3.0/src/doc/Makefile'\" \(1138 characters\)
  520.   sed "s/^X//" >'nocol-3.0/src/doc/Makefile' <<'END_OF_FILE'
  521. X# $Header: /home/aggarwal/lsrc/nocol/src/doc/RCS/Makefile,v 1.1 1993/10/30 03:09:12 aggarwal Exp $
  522. X#
  523. X# Make for installing the man pages
  524. X# This installs all the man pages with the same extension
  525. X
  526. XMANDIR=    /usr/man/mann
  527. XMANEXT= n
  528. XMANPAGES1 = nocol.1
  529. XMANPAGES3 = perlnocol.3 nocol-prog.3
  530. XMANPAGES8 =     eventselect.8 genmon.8 multiping.8 \
  531. X        noclogd.8 nocol-overview.8 nocol-utility.8 nsmon.8 \
  532. X        pingmon.8 portmon.8 tpmon.8 trapmon.8
  533. X
  534. Xall:
  535. X    @echo    "Building all in 'doc'"
  536. X
  537. Xinstall:
  538. X    @echo "Installing in 'doc'"
  539. X    @- [ -d $(MANDIR) ] || mkdir $(MANDIR)
  540. X#    @-for d in $(MANDIR)/man1 $(MANDIR)/man3 $(MANDIR)/man8; do \
  541. X#        [! -d $$d ]  && mkdir $$d ;\
  542. X#     done
  543. X    @-for m in $(MANPAGES1); do \
  544. X         $(INSTALL) -c -m 644 $$m $(MANDIR)/`basename $$m 1`$(MANEXT) ;\
  545. X     done
  546. X    @-for m in $(MANPAGES3); do \
  547. X         $(INSTALL) -c -m 644 $$m $(MANDIR)/`basename $$m 3`$(MANEXT) ;\
  548. X     done
  549. X    @-for m in $(MANPAGES8); do \
  550. X         $(INSTALL) -c -m 644 $$m $(MANDIR)/`basename $$m 8`$(MANEXT) ;\
  551. X     done
  552. X
  553. Xclean:
  554. X    @echo "Building clean in 'doc'"
  555. X
  556. Xrcs:
  557. X    @echo "Extracting RCS revisions in 'doc'"
  558. X    @-for i in $(MANPAGES1) $(MANPAGES3) $(MANPAGES8); do \
  559. X        $(CO) -q $$i ; \
  560. X     done
  561. END_OF_FILE
  562.   if test 1138 -ne `wc -c <'nocol-3.0/src/doc/Makefile'`; then
  563.     echo shar: \"'nocol-3.0/src/doc/Makefile'\" unpacked with wrong size!
  564.   fi
  565.   # end of 'nocol-3.0/src/doc/Makefile'
  566. fi
  567. if test -f 'nocol-3.0/src/doc/netmon.1' -a "${1}" != "-c" ; then 
  568.   echo shar: Will not clobber existing file \"'nocol-3.0/src/doc/netmon.1'\"
  569. else
  570.   echo shar: Extracting \"'nocol-3.0/src/doc/netmon.1'\" \(12 characters\)
  571.   sed "s/^X//" >'nocol-3.0/src/doc/netmon.1' <<'END_OF_FILE'
  572. X.so nocol.1
  573. END_OF_FILE
  574.   if test 12 -ne `wc -c <'nocol-3.0/src/doc/netmon.1'`; then
  575.     echo shar: \"'nocol-3.0/src/doc/netmon.1'\" unpacked with wrong size!
  576.   fi
  577.   # end of 'nocol-3.0/src/doc/netmon.1'
  578. fi
  579. if test -f 'nocol-3.0/src/eventselect/Makefile' -a "${1}" != "-c" ; then 
  580.   echo shar: Will not clobber existing file \"'nocol-3.0/src/eventselect/Makefile'\"
  581. else
  582.   echo shar: Extracting \"'nocol-3.0/src/eventselect/Makefile'\" \(1267 characters\)
  583.   sed "s/^X//" >'nocol-3.0/src/eventselect/Makefile' <<'END_OF_FILE'
  584. X# $Id: Makefile,v 1.2 1993/10/30 03:12:04 aggarwal Exp $
  585. X#
  586. X#
  587. X# 
  588. X## SET THIS
  589. X# Directories needed by the Makefile
  590. XTOP =         /usr/nocol
  591. XSRCDIR =    $(TOP)/src
  592. X
  593. XBINDIR =     $(TOP)/bin
  594. XETCDIR =     $(TOP)/etc
  595. XINCLUDEDIR =     $(SRCDIR)/include
  596. XLIBDIR =    $(SRCDIR)/lib 
  597. X
  598. XINSTALL =    install
  599. X
  600. X## SET THIS
  601. X# Set the various defines for compile time defines:
  602. X#
  603. XSYSDEFS =
  604. X
  605. X####
  606. X#### Can leave the rest alone #######
  607. X####
  608. X
  609. X##
  610. X# The various directories that are needed in the program. Should NOT
  611. X# have trailing '/'.
  612. XDIRDEFS =    -DETCDIR=\"$(ETCDIR)\"
  613. X
  614. X# Compilation definitions
  615. XCC =         cc
  616. XCDEFS =        $(DIRDEFS) $(SYSDEFS)
  617. XLIBS =         -lnocol $(SYSLIBS)
  618. XCFLAGS =     -g -I$(INCLUDEDIR) -I../include -L$(LIBDIR) -L../lib
  619. X
  620. XTARG =        eventselect
  621. XOBJECTS =     proc_datafile.o eventselect.o
  622. X
  623. X$(TARG):    $(OBJECTS) Makefile
  624. X    $(CC) $(CFLAGS) $(OBJECTS) $(LIBS) -o $@
  625. X
  626. X.c.o:
  627. X    $(CC) $(CFLAGS) -c  $(CDEFS) $<
  628. X
  629. X## The dependencies in case 'mkdep' not used
  630. X#
  631. X$(OBJECTS): $(INCLUDEDIR)/nocol.h
  632. X
  633. Xinstall: $(TARG)
  634. X    @[ -d $(TOP) ] || mkdir  $(TOP)
  635. X    @[ -d $(ETCDIR) ] || mkdir $(ETCDIR)
  636. X    @[ -d $(BINDIR) ] || mkdir $(BINDIR)
  637. X    $(INSTALL) -c -m 751 $(TARG) $(BINDIR)/
  638. X
  639. Xclean:
  640. X    /bin/rm -f $(OBJECTS) $(TARG) *.o core a.out
  641. X
  642. Xrcs:
  643. X    @echo "Doing 'rcs' in $(TARG)"
  644. X    @-for i in $(OBJS); do \
  645. X        $(CO) -q `basename $$i .o`.c ;\
  646. X      done
  647. X
  648. END_OF_FILE
  649.   if test 1267 -ne `wc -c <'nocol-3.0/src/eventselect/Makefile'`; then
  650.     echo shar: \"'nocol-3.0/src/eventselect/Makefile'\" unpacked with wrong size!
  651.   fi
  652.   # end of 'nocol-3.0/src/eventselect/Makefile'
  653. fi
  654. if test -f 'nocol-3.0/src/noclog/newtest.c' -a "${1}" != "-c" ; then 
  655.   echo shar: Will not clobber existing file \"'nocol-3.0/src/noclog/newtest.c'\"
  656. else
  657.   echo shar: Extracting \"'nocol-3.0/src/noclog/newtest.c'\" \(1155 characters\)
  658.   sed "s/^X//" >'nocol-3.0/src/noclog/newtest.c' <<'END_OF_FILE'
  659. X/* $Header: /home/aggarwal/lsrc/nocol/src/noclog/RCS/newtest.c,v 1.3 1993/10/30 03:45:20 aggarwal Exp $ */
  660. X
  661. X/*
  662. X * $Log: newtest.c,v $
  663. X * Revision 1.3  1993/10/30  03:45:20  aggarwal
  664. X * Added perror()
  665. X *
  666. X * Revision 1.2  1993/09/18  23:06:03  aggarwal
  667. X * Added some logging at E_CRITICAL
  668. X *
  669. X * Revision 1.1  1993/03/29  21:25:21  wagner
  670. X * Initial revision
  671. X *
  672. X */
  673. X
  674. X#include <stdio.h>
  675. X#include "nocol.h"
  676. X
  677. Xint main(argc, argv)
  678. X    int argc;
  679. X    char **argv;
  680. X{
  681. X    int    n, written;
  682. X    EVENT    v;
  683. X
  684. X    strcpy(v.sender, "NewTester");
  685. X    v.mon = 11;
  686. X    v.day = 29;
  687. X    v.hour = 16;
  688. X    v.min = 0;
  689. X    v.severity = E_ERROR;
  690. X    v.loglevel = E_ERROR;
  691. X    v.nocop = 0;
  692. X    strcpy(v.site.name, "There");
  693. X    strcpy(v.site.addr, "You.there.net");
  694. X    strcpy(v.var.name, "Len");
  695. X    v.var.value = 3;
  696. X    v.var.threshold = 0;
  697. X    strcpy(v.var.units, "meters");
  698. X
  699. X    if (argc > 1)
  700. X        n = atoi(argv[1]);
  701. X    else
  702. X        n = 100;
  703. X    openeventlog();
  704. X    for (written=0; written < n; written++)
  705. X    {
  706. X        v.var.value = written ;
  707. X        if (eventlog(&v) < 0)
  708. X        {
  709. X            perror("eventlog") ;
  710. X            break;
  711. X        }
  712. X    }
  713. X    fprintf(stderr, "DEBUG: %d/%d records written.\n", written, n);
  714. X
  715. X    v.loglevel = E_CRITICAL ;
  716. X    eventlog(&v);
  717. X    closeeventlog();
  718. X    return(0);
  719. X}
  720. END_OF_FILE
  721.   if test 1155 -ne `wc -c <'nocol-3.0/src/noclog/newtest.c'`; then
  722.     echo shar: \"'nocol-3.0/src/noclog/newtest.c'\" unpacked with wrong size!
  723.   fi
  724.   # end of 'nocol-3.0/src/noclog/newtest.c'
  725. fi
  726. if test -f 'nocol-3.0/src/noclog/noclogd-confg' -a "${1}" != "-c" ; then 
  727.   echo shar: Will not clobber existing file \"'nocol-3.0/src/noclog/noclogd-confg'\"
  728. else
  729.   echo shar: Extracting \"'nocol-3.0/src/noclog/noclogd-confg'\" \(635 characters\)
  730.   sed "s/^X//" >'nocol-3.0/src/noclog/noclogd-confg' <<'END_OF_FILE'
  731. X## $Id: noclogd-confg,v 1.3 1993/10/11 15:18:33 aggarwal Exp $
  732. X##
  733. X## Config file for nocol logging daemon (noclogd)
  734. X##
  735. X# The following hosts are permitted to log entries to this daemon:
  736. X# (NOTE: no hostnames, only IP addresses)
  737. Xpermithosts    127.0.0.1  128.121.50.2 128.121.50.7
  738. Xpermithosts    128.121.50.141 128.121.50.143
  739. X##
  740. X## Give full pathnames in filenames since the daemon changes dir.
  741. X##
  742. X## SENDER    LEVEL        LOGFILE or PIPEFILE
  743. X##
  744. X*        critical    /nocol/logs/critical
  745. X*        error        /nocol/logs/error
  746. X*        warning        /nocol/logs/warning
  747. X*        info        /nocol/logs/info
  748. X##
  749. Xtrapmon        info        /nocol/logs/traps.info
  750. X#
  751. Xpingmon        critical    |/nocol/etc/beep_oncall
  752. END_OF_FILE
  753.   if test 635 -ne `wc -c <'nocol-3.0/src/noclog/noclogd-confg'`; then
  754.     echo shar: \"'nocol-3.0/src/noclog/noclogd-confg'\" unpacked with wrong size!
  755.   fi
  756.   # end of 'nocol-3.0/src/noclog/noclogd-confg'
  757. fi
  758. if test -f 'nocol-3.0/src/perlnocol/Makefile' -a "${1}" != "-c" ; then 
  759.   echo shar: Will not clobber existing file \"'nocol-3.0/src/perlnocol/Makefile'\"
  760. else
  761.   echo shar: Extracting \"'nocol-3.0/src/perlnocol/Makefile'\" \(437 characters\)
  762.   sed "s/^X//" >'nocol-3.0/src/perlnocol/Makefile' <<'END_OF_FILE'
  763. X# $Id: Makefile,v 1.1 1993/10/30 03:56:45 aggarwal Exp $
  764. X#
  765. X
  766. XPROGS = armon bgpmon bpmon snmp-modemmon modemmon novellmon nrmon \
  767. X    nocollib.pl rcisco
  768. X
  769. Xall:
  770. X    @echo "PERLNOCOL modules"
  771. X    @echo "  Edit the following monitors manually and set variables:"
  772. X    @echo "        ${PROGS}"
  773. X
  774. Xinstall:
  775. X    @echo  "Install the PERLNOCOL modules (in `pwd`) manually "
  776. X    @echo  "See $(SRCDIR)/perlnocol/README for details"
  777. X
  778. Xclean:
  779. X    @/bin/rm -f *.pid a.out core
  780. X
  781. END_OF_FILE
  782.   if test 437 -ne `wc -c <'nocol-3.0/src/perlnocol/Makefile'`; then
  783.     echo shar: \"'nocol-3.0/src/perlnocol/Makefile'\" unpacked with wrong size!
  784.   fi
  785.   # end of 'nocol-3.0/src/perlnocol/Makefile'
  786. fi
  787. if test -f 'nocol-3.0/src/perlnocol/bgpmon-confg' -a "${1}" != "-c" ; then 
  788.   echo shar: Will not clobber existing file \"'nocol-3.0/src/perlnocol/bgpmon-confg'\"
  789. else
  790.   echo shar: Extracting \"'nocol-3.0/src/perlnocol/bgpmon-confg'\" \(195 characters\)
  791.   sed "s/^X//" >'nocol-3.0/src/perlnocol/bgpmon-confg' <<'END_OF_FILE'
  792. X## Config for BGP monitor
  793. X#
  794. X#
  795. X#
  796. X## Name        Address/DNS name
  797. X##
  798. Xnomad         nomad-gateway
  799. Xfenchurch    fenchurch-gateway
  800. Xtrillian    trillian-gateway
  801. Xgoldengate    goldengate-gateway
  802. Xunclesam    unclesam-gateway
  803. X#
  804. END_OF_FILE
  805.   if test 195 -ne `wc -c <'nocol-3.0/src/perlnocol/bgpmon-confg'`; then
  806.     echo shar: \"'nocol-3.0/src/perlnocol/bgpmon-confg'\" unpacked with wrong size!
  807.   fi
  808.   chmod +x 'nocol-3.0/src/perlnocol/bgpmon-confg'
  809.   # end of 'nocol-3.0/src/perlnocol/bgpmon-confg'
  810. fi
  811. if test -f 'nocol-3.0/src/perlnocol/bpmon-confg' -a "${1}" != "-c" ; then 
  812.   echo shar: Will not clobber existing file \"'nocol-3.0/src/perlnocol/bpmon-confg'\"
  813. else
  814.   echo shar: Extracting \"'nocol-3.0/src/perlnocol/bpmon-confg'\" \(176 characters\)
  815.   sed "s/^X//" >'nocol-3.0/src/perlnocol/bpmon-confg' <<'END_OF_FILE'
  816. X# bpmon configuration
  817. X# You must configure the ethernet address of the machine
  818. X# nocol is running on:
  819. X#
  820. Xhaddr=080020001123
  821. X#
  822. X# hostname    ipaddress
  823. X#
  824. Xmyhost.abc.edu    130.44.44.44
  825. END_OF_FILE
  826.   if test 176 -ne `wc -c <'nocol-3.0/src/perlnocol/bpmon-confg'`; then
  827.     echo shar: \"'nocol-3.0/src/perlnocol/bpmon-confg'\" unpacked with wrong size!
  828.   fi
  829.   # end of 'nocol-3.0/src/perlnocol/bpmon-confg'
  830. fi
  831. if test -f 'nocol-3.0/src/perlnocol/mkarmon' -a "${1}" != "-c" ; then 
  832.   echo shar: Will not clobber existing file \"'nocol-3.0/src/perlnocol/mkarmon'\"
  833. else
  834.   echo shar: Extracting \"'nocol-3.0/src/perlnocol/mkarmon'\" \(921 characters\)
  835.   sed "s/^X//" >'nocol-3.0/src/perlnocol/mkarmon' <<'END_OF_FILE'
  836. X#! /usr/local/bin/perl
  837. X# $Header: /home/aggarwal/lsrc/nocol/src/perlnocol/RCS/mkarmon,v 1.1 1993/10/15 18:33:36 aggarwal Exp $
  838. X#
  839. X# Author:  John Wobus, jmwobus@mailbox.syr.edu
  840. X#
  841. X# mkarmon - take output of Cisco "show apple route" command and
  842. X# create lines suitable for armon configuration file (for NOCOL).
  843. X#
  844. X# Sample execution command:
  845. X#    rcisco  myrouter mypasswd 'show apple route'  | mkarmon
  846. X#
  847. X# Example lines:
  848. X#    C Net 50-50 directly connected, Ethernet0, zone GES:Sub50
  849. X#    R Net 52 [1/G] via 50.128, 1 sec, Ethernet0, zone GES:Sub50
  850. X#
  851. Xsub doline {
  852. X    if($ready =~ /^[RC] Net (\d+(-\d+)?).*((Ethernet|Serial)\d+)\D.*(zone |Zone: ")(\w\S*(\s+\S+)*)"?\s*(Additional zones: (.*) ?)?$/)
  853. X    {
  854. X    $nets=$1;
  855. X    $interface = $3;
  856. X    $zone=$6;
  857. X    $xzones=$8;
  858. X    $interface =~ s/Ethernet/e/ ;  $interface =~ s/Serial/s/ ;
  859. X    $item="$nets\t$interface\t$zone";
  860. X
  861. X    print STDOUT "$item\n";
  862. X    }
  863. X}
  864. X
  865. X
  866. Xwhile(<>){chop;$ready=$_;&doline;}
  867. END_OF_FILE
  868.   if test 921 -ne `wc -c <'nocol-3.0/src/perlnocol/mkarmon'`; then
  869.     echo shar: \"'nocol-3.0/src/perlnocol/mkarmon'\" unpacked with wrong size!
  870.   fi
  871.   chmod +x 'nocol-3.0/src/perlnocol/mkarmon'
  872.   # end of 'nocol-3.0/src/perlnocol/mkarmon'
  873. fi
  874. if test -f 'nocol-3.0/src/perlnocol/modemmon-confg' -a "${1}" != "-c" ; then 
  875.   echo shar: Will not clobber existing file \"'nocol-3.0/src/perlnocol/modemmon-confg'\"
  876. else
  877.   echo shar: Extracting \"'nocol-3.0/src/perlnocol/modemmon-confg'\" \(316 characters\)
  878.   sed "s/^X//" >'nocol-3.0/src/perlnocol/modemmon-confg' <<'END_OF_FILE'
  879. X## Config for modemmon (modem line usage monitor)
  880. X#
  881. X# If the number of lines in use equal or exceed the values here, the
  882. X# severity will be escalated to the level the value indicates.
  883. X#
  884. X#
  885. X## Name Address  Warning-#lines   Error-#lines   Critical-#lines
  886. X##
  887. Xmozart 161.58.1.5     7     9     10
  888. Xringo  192.67.236.1     10     12     15
  889. END_OF_FILE
  890.   if test 316 -ne `wc -c <'nocol-3.0/src/perlnocol/modemmon-confg'`; then
  891.     echo shar: \"'nocol-3.0/src/perlnocol/modemmon-confg'\" unpacked with wrong size!
  892.   fi
  893.   # end of 'nocol-3.0/src/perlnocol/modemmon-confg'
  894. fi
  895. if test -f 'nocol-3.0/src/perlnocol/novellmon-confg' -a "${1}" != "-c" ; then 
  896.   echo shar: Will not clobber existing file \"'nocol-3.0/src/perlnocol/novellmon-confg'\"
  897. else
  898.   echo shar: Extracting \"'nocol-3.0/src/perlnocol/novellmon-confg'\" \(139 characters\)
  899.   sed "s/^X//" >'nocol-3.0/src/perlnocol/novellmon-confg' <<'END_OF_FILE'
  900. X# novellmon configuration
  901. X#
  902. X#
  903. X#  A Cisco router from which to steal the info:
  904. X#
  905. Xrouter=mycisco
  906. X#
  907. X# Server    Type
  908. X#
  909. XABC    4
  910. XDEF    4
  911. XABC    47
  912. XXYZ    47
  913. END_OF_FILE
  914.   if test 139 -ne `wc -c <'nocol-3.0/src/perlnocol/novellmon-confg'`; then
  915.     echo shar: \"'nocol-3.0/src/perlnocol/novellmon-confg'\" unpacked with wrong size!
  916.   fi
  917.   # end of 'nocol-3.0/src/perlnocol/novellmon-confg'
  918. fi
  919. if test -f 'nocol-3.0/src/pingmon/README' -a "${1}" != "-c" ; then 
  920.   echo shar: Will not clobber existing file \"'nocol-3.0/src/pingmon/README'\"
  921. else
  922.   echo shar: Extracting \"'nocol-3.0/src/pingmon/README'\" \(223 characters\)
  923.   sed "s/^X//" >'nocol-3.0/src/pingmon/README' <<'END_OF_FILE'
  924. XIn case you have a weird 'ping' that does not give output similar to the
  925. Xone described below, a public domain version of the program is in 'support'.
  926. X
  927. XFor IP, you might want to use 'multiping' instead (in the support dir).
  928. END_OF_FILE
  929.   if test 223 -ne `wc -c <'nocol-3.0/src/pingmon/README'`; then
  930.     echo shar: \"'nocol-3.0/src/pingmon/README'\" unpacked with wrong size!
  931.   fi
  932.   # end of 'nocol-3.0/src/pingmon/README'
  933. fi
  934. if test -f 'nocol-3.0/src/pingmon/ipnodes' -a "${1}" != "-c" ; then 
  935.   echo shar: Will not clobber existing file \"'nocol-3.0/src/pingmon/ipnodes'\"
  936. else
  937.   echo shar: Extracting \"'nocol-3.0/src/pingmon/ipnodes'\" \(737 characters\)
  938.   sed "s/^X//" >'nocol-3.0/src/pingmon/ipnodes' <<'END_OF_FILE'
  939. X## Config file for ippingmon.
  940. X##
  941. X# Can also mark a site as TEST
  942. X# POLLINTERVAL is number of seconds between each poll cycle.
  943. X##
  944. X
  945. XPOLLINTERVAL  300
  946. X
  947. X# JVNC hosts
  948. Xnisc     128.121.50.7
  949. Xtigger   128.121.50.145  test
  950. Xr2d2     128.121.50.2
  951. Xmickey     128.121.50.143
  952. Xminnie     128.121.50.141
  953. X#
  954. X# Backbone routers
  955. Xzaphod-icedtea    130.94.12.249
  956. Xairport1_eth     130.94.7.1
  957. Xairport1-zaphod 130.94.6.250
  958. Xairport1-ocean1 130.94.29.250
  959. Xairport2_eth     130.94.7.2
  960. Xairport2-cheese 130.94.35.250
  961. Xairport3_eth     130.94.7.3
  962. Xcheesesteak1     130.94.34.250
  963. Xcheesesteak1     130.94.35.249
  964. Xcircus_eth     130.94.22.1
  965. Xcircus-icedtea     130.94.13.250
  966. Xcircus-preppy     130.94.21.249
  967. Xcircus-storrs    130.94.22.249
  968. Xstorrs_eth    130.94.19.1
  969. Xstorrs-circus     130.94.22.250
  970. Xiced_tea_eth     130.94.13.1
  971. END_OF_FILE
  972.   if test 737 -ne `wc -c <'nocol-3.0/src/pingmon/ipnodes'`; then
  973.     echo shar: \"'nocol-3.0/src/pingmon/ipnodes'\" unpacked with wrong size!
  974.   fi
  975.   # end of 'nocol-3.0/src/pingmon/ipnodes'
  976. fi
  977. if test -f 'nocol-3.0/src/portmon/portmon-confg' -a "${1}" != "-c" ; then 
  978.   echo shar: Will not clobber existing file \"'nocol-3.0/src/portmon/portmon-confg'\"
  979. else
  980.   echo shar: Extracting \"'nocol-3.0/src/portmon/portmon-confg'\" \(817 characters\)
  981.   sed "s/^X//" >'nocol-3.0/src/portmon/portmon-confg' <<'END_OF_FILE'
  982. X# Config file for portmon nocol monitor
  983. X#
  984. X# Order is important... the first substring match will return and NOT
  985. X# test the remaining strings. Put the high severity tests first.
  986. X#
  987. X# Format:
  988. X#    POLLINTERVAL  600
  989. X#    HOST <name> <addr>  <variable>  <port#> <failseverity> [send-string]
  990. X#    [maxseverity    response]
  991. X#    [maxseverity    response]
  992. X#    HOST ....
  993. X#
  994. X##
  995. XPOLLINTERVAL  600
  996. X#
  997. XHOST  tigger     128.121.50.145  NEWSport  119  Critical  
  998. Xinfo    posting ok
  999. X#
  1000. XHOST  nisc      128.121.50.7    NEWSport  119  Error
  1001. Xinfo    posting ok
  1002. X
  1003. X# for innd. Checking for 'no space'  'expire running' 'bad article file'
  1004. XHOST  c3po    192.41.171.5    NEWSport  119    Critical
  1005. Xcritical    space
  1006. Xinfo        expire
  1007. Xcritical    Bad file number writing history file -- throttling
  1008. Xinfo        posting ok
  1009. Xinfo        no posting
  1010. X#
  1011. XHOST  nisc    128.121.50.7    SMTPport  25    Critical  helo
  1012. Xinfo    250
  1013. X#
  1014. END_OF_FILE
  1015.   if test 817 -ne `wc -c <'nocol-3.0/src/portmon/portmon-confg'`; then
  1016.     echo shar: \"'nocol-3.0/src/portmon/portmon-confg'\" unpacked with wrong size!
  1017.   fi
  1018.   # end of 'nocol-3.0/src/portmon/portmon-confg'
  1019. fi
  1020. if test -f 'nocol-3.0/src/support/README' -a "${1}" != "-c" ; then 
  1021.   echo shar: Will not clobber existing file \"'nocol-3.0/src/support/README'\"
  1022. else
  1023.   echo shar: Extracting \"'nocol-3.0/src/support/README'\" \(52 characters\)
  1024.   sed "s/^X//" >'nocol-3.0/src/support/README' <<'END_OF_FILE'
  1025. XUSE MULTIPING. mping is here for completeness only.
  1026. END_OF_FILE
  1027.   if test 52 -ne `wc -c <'nocol-3.0/src/support/README'`; then
  1028.     echo shar: \"'nocol-3.0/src/support/README'\" unpacked with wrong size!
  1029.   fi
  1030.   # end of 'nocol-3.0/src/support/README'
  1031. fi
  1032. if test -f 'nocol-3.0/src/support/mping/Makefile' -a "${1}" != "-c" ; then 
  1033.   echo shar: Will not clobber existing file \"'nocol-3.0/src/support/mping/Makefile'\"
  1034. else
  1035.   echo shar: Extracting \"'nocol-3.0/src/support/mping/Makefile'\" \(346 characters\)
  1036.   sed "s/^X//" >'nocol-3.0/src/support/mping/Makefile' <<'END_OF_FILE'
  1037. XLIBDIR    =
  1038. XLIBS    =
  1039. XCFLAGS    =-g
  1040. X
  1041. XALSO    = README Makefile spqr.doc
  1042. XSRCS    = $(ALSO) Makefile mping.c msummary msummary.dat spqr.c 
  1043. X
  1044. XALL:    mping spqr
  1045. X
  1046. Xmping:    mping.o
  1047. X    cc $(CFLAGS) $(LDFLAGS) mping.o ; mv a.out $@
  1048. X
  1049. Xspqr:    spqr.o
  1050. X    cc $(CFLAGS) $(LDFLAGS) spqr.o ; mv a.out $@
  1051. X
  1052. Xspqr.tar:    $(SRCS)
  1053. X    tar cf $@ $(SRCS)
  1054. X
  1055. Xclean:
  1056. X    /bin/rm -f *.o core a.out mping spqr
  1057. END_OF_FILE
  1058.   if test 346 -ne `wc -c <'nocol-3.0/src/support/mping/Makefile'`; then
  1059.     echo shar: \"'nocol-3.0/src/support/mping/Makefile'\" unpacked with wrong size!
  1060.   fi
  1061.   # end of 'nocol-3.0/src/support/mping/Makefile'
  1062. fi
  1063. if test -f 'nocol-3.0/src/support/mping/README' -a "${1}" != "-c" ; then 
  1064.   echo shar: Will not clobber existing file \"'nocol-3.0/src/support/mping/README'\"
  1065. else
  1066.   echo shar: Extracting \"'nocol-3.0/src/support/mping/README'\" \(1117 characters\)
  1067.   sed "s/^X//" >'nocol-3.0/src/support/mping/README' <<'END_OF_FILE'
  1068. XSetting up SPQR on your favorite UNIX system
  1069. X--------------------------------------------
  1070. X
  1071. XFirst, you have to get a reasonably modern version of perl up.  SPQR
  1072. Xwas developed using Perl 4.0, but I don't think it depends on any
  1073. Xfeatures not present in 3.0.  Perl can be obtained using anonymous
  1074. XFTP from:
  1075. X
  1076. X    Host:        jpl-devvax.jpl.nasa.gov
  1077. X    Directory:    ~ftp/pub
  1078. X
  1079. XNext you have to build the binary "mping".  This was developed on
  1080. Xa Sun SparcStation and hasn't been tested on other environments.
  1081. X"mping" either needs to be SUID root, or run from a process with
  1082. Xroot priviliges.
  1083. X
  1084. XThen you have to create a configuration file, using the included
  1085. X"msummary.dat" as a template.  Having created a configuration
  1086. Xfile, you can test mping by:
  1087. X
  1088. X    mping [ -v ] < msummary.dat
  1089. X
  1090. XOnce this works, edit the "msummary" Perl script if necessary to
  1091. Xpoint to the location of your perl binary.  Then crank up
  1092. X"msummary"!!!.
  1093. X
  1094. X
  1095. XThis will create the file "msummary.out" and update it once every
  1096. X60 seconds.  A very simple program to view this file can be
  1097. Xbuilt from the "spqr.c" source.  It is intended to run as a
  1098. Xlogon shell for a special user.
  1099. END_OF_FILE
  1100.   if test 1117 -ne `wc -c <'nocol-3.0/src/support/mping/README'`; then
  1101.     echo shar: \"'nocol-3.0/src/support/mping/README'\" unpacked with wrong size!
  1102.   fi
  1103.   # end of 'nocol-3.0/src/support/mping/README'
  1104. fi
  1105. if test -f 'nocol-3.0/src/support/mping/msummary.out' -a "${1}" != "-c" ; then 
  1106.   echo shar: Will not clobber existing file \"'nocol-3.0/src/support/mping/msummary.out'\"
  1107. else
  1108.   echo shar: Extracting \"'nocol-3.0/src/support/mping/msummary.out'\" \(277 characters\)
  1109.   sed "s/^X//" >'nocol-3.0/src/support/mping/msummary.out' <<'END_OF_FILE'
  1110. X 9:59:50    Iter:     1 Cycle:   0   current    avg. 5   avg. 15   avg. 60
  1111. XSystem Name        IP Address      bad   RTT bad   RTT bad   RTT bad   RTT RPT
  1112. X------------------ --------------- --- ----- --- ----- --- ----- --- ----- ---
  1113. X0 entries skipped for all-0 error averages
  1114. X
  1115. END_OF_FILE
  1116.   if test 277 -ne `wc -c <'nocol-3.0/src/support/mping/msummary.out'`; then
  1117.     echo shar: \"'nocol-3.0/src/support/mping/msummary.out'\" unpacked with wrong size!
  1118.   fi
  1119.   # end of 'nocol-3.0/src/support/mping/msummary.out'
  1120. fi
  1121. if test -f 'nocol-3.0/src/support/mping/smooth.pl' -a "${1}" != "-c" ; then 
  1122.   echo shar: Will not clobber existing file \"'nocol-3.0/src/support/mping/smooth.pl'\"
  1123. else
  1124.   echo shar: Extracting \"'nocol-3.0/src/support/mping/smooth.pl'\" \(1106 characters\)
  1125.   sed "s/^X//" >'nocol-3.0/src/support/mping/smooth.pl' <<'END_OF_FILE'
  1126. X#! /usr/local/bin/perl
  1127. X
  1128. X
  1129. X
  1130. X#
  1131. X# These values were empiricially arrived at.  They differ markedly
  1132. X# from those used in the UNIX kernal to smooth load averages.  Those
  1133. X# values result in averages over much longer intervals than the comments
  1134. X# indicate.
  1135. X#
  1136. X# 0.00499999999999999 is the value such that when multiplied by the
  1137. X# maximum valid data value (100) produces a result less than 0.5.
  1138. X# The three values are the 5th, 15th, and 60th roots respectively.
  1139. X#
  1140. X@exp = (
  1141. X    0.3465724216,    #  5 intervals  [0.0049999999999**(1/5)]
  1142. X    0.7024218302,    # 15 intervals  [0.0049999999999**(1/15)]
  1143. X    0.9154813473,    # 60 intervals  [0.0049999999999**(1/60)]
  1144. X    
  1145. X);
  1146. X@invexp = (
  1147. X    1.0 - $exp[0],
  1148. X    1.0 - $exp[1],
  1149. X    1.0 - $exp[2],
  1150. X);
  1151. X
  1152. X#
  1153. X# Smooth a value over three intervals, depending on the value
  1154. X# of the @exp array above.  Change the averages in-place and
  1155. X# return an array of rounded values.
  1156. X#
  1157. Xsub smooth {
  1158. X    local (@tmp);
  1159. X    local ($val) = $_[3];
  1160. X    local ($i);
  1161. X
  1162. X    foreach $i (0 .. 2) {
  1163. X        $_[$i] = ($_[$i]*$exp[$i] + $invexp[$i]*$val) ;
  1164. X    }
  1165. X
  1166. X    # round to nearest whole value
  1167. X    @tmp = @_[0..2];
  1168. X    foreach (@tmp) { $_ += 0.5; }
  1169. X
  1170. X    return @tmp;
  1171. X}
  1172. END_OF_FILE
  1173.   if test 1106 -ne `wc -c <'nocol-3.0/src/support/mping/smooth.pl'`; then
  1174.     echo shar: \"'nocol-3.0/src/support/mping/smooth.pl'\" unpacked with wrong size!
  1175.   fi
  1176.   # end of 'nocol-3.0/src/support/mping/smooth.pl'
  1177. fi
  1178. if test -f 'nocol-3.0/src/support/mping/spqr.c' -a "${1}" != "-c" ; then 
  1179.   echo shar: Will not clobber existing file \"'nocol-3.0/src/support/mping/spqr.c'\"
  1180. else
  1181.   echo shar: Extracting \"'nocol-3.0/src/support/mping/spqr.c'\" \(786 characters\)
  1182.   sed "s/^X//" >'nocol-3.0/src/support/mping/spqr.c' <<'END_OF_FILE'
  1183. X/* view an output file
  1184. X */
  1185. X#include <stdio.h>
  1186. X#include <sys/types.h>
  1187. X#include <sys/stat.h>
  1188. X
  1189. Xtime_t getModTime();
  1190. Xchar*    viewFile    = "msummary.out";
  1191. X
  1192. Xmain (argc, argv)
  1193. Xint    argc;
  1194. Xchar**    argv;
  1195. X{
  1196. X    int f;
  1197. X    time_t lastDump = 0, modTime;
  1198. X
  1199. X    if ((f = open (viewFile, 0)) < 0) {
  1200. X        perror (viewFile);
  1201. X        exit (1);
  1202. X    }
  1203. X
  1204. X    for (;;) {
  1205. X        modTime = getModTime (f);
  1206. X        if (modTime > lastDump) {
  1207. X            lastDump = modTime;
  1208. X            dumpFile (f, 1);
  1209. X        }
  1210. X        sleep (10);
  1211. X    }
  1212. X}
  1213. X
  1214. Xtime_t
  1215. XgetModTime(f)
  1216. Xint    f;
  1217. X{
  1218. X    struct stat sbuf;
  1219. X
  1220. X    return fstat (f, &sbuf) < 0
  1221. X        ? (perror("fstat"), exit (1))
  1222. X        : sbuf.st_mtime;
  1223. X}
  1224. X
  1225. XdumpFile (fin, fout)
  1226. Xint    fin, fout;
  1227. X{
  1228. X    char buf[BUFSIZ];
  1229. X    int n;
  1230. X
  1231. X    lseek (fin, 0L, 0);
  1232. X    while ((n = read (fin, buf, sizeof buf)) > 0) {
  1233. X        if (write (fout, buf, n) != n) {
  1234. X            perror ("write");
  1235. X            exit (1);
  1236. X        }
  1237. X    }
  1238. X}
  1239. END_OF_FILE
  1240.   if test 786 -ne `wc -c <'nocol-3.0/src/support/mping/spqr.c'`; then
  1241.     echo shar: \"'nocol-3.0/src/support/mping/spqr.c'\" unpacked with wrong size!
  1242.   fi
  1243.   # end of 'nocol-3.0/src/support/mping/spqr.c'
  1244. fi
  1245. if test -f 'nocol-3.0/src/support/mping/t1.pl' -a "${1}" != "-c" ; then 
  1246.   echo shar: Will not clobber existing file \"'nocol-3.0/src/support/mping/t1.pl'\"
  1247. else
  1248.   echo shar: Extracting \"'nocol-3.0/src/support/mping/t1.pl'\" \(308 characters\)
  1249.   sed "s/^X//" >'nocol-3.0/src/support/mping/t1.pl' <<'END_OF_FILE'
  1250. X$fmt = "d12";
  1251. X
  1252. X@ary = (1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233);
  1253. X$dat1 = 1.0;
  1254. X$dat2 = 2.2;
  1255. X$dat3 = 3.3;
  1256. X$v = pack ($fmt, $dat1, $dat2, $dat3, @ary);
  1257. X@tv = unpack ($fmt, $v);
  1258. X
  1259. Xprint "check of tv = (@tv)\n";
  1260. X
  1261. X$db{"foo"} = $v;
  1262. X
  1263. X$v1 = $db{"foo"};
  1264. X
  1265. X@tv1 = unpack ($fmt, $v1);
  1266. Xprint "check of tv1 = (@tv1)\n";
  1267. END_OF_FILE
  1268.   if test 308 -ne `wc -c <'nocol-3.0/src/support/mping/t1.pl'`; then
  1269.     echo shar: \"'nocol-3.0/src/support/mping/t1.pl'\" unpacked with wrong size!
  1270.   fi
  1271.   # end of 'nocol-3.0/src/support/mping/t1.pl'
  1272. fi
  1273. if test -f 'nocol-3.0/src/support/multiping/Makefile' -a "${1}" != "-c" ; then 
  1274.   echo shar: Will not clobber existing file \"'nocol-3.0/src/support/multiping/Makefile'\"
  1275. else
  1276.   echo shar: Extracting \"'nocol-3.0/src/support/multiping/Makefile'\" \(413 characters\)
  1277.   sed "s/^X//" >'nocol-3.0/src/support/multiping/Makefile' <<'END_OF_FILE'
  1278. X# $Header: /home/aggarwal/lsrc/nocol/src/support/multiping/RCS/Makefile,v 1.2 1993/10/31 05:04:06 aggarwal Exp $
  1279. X#
  1280. XCFLAGS = -g
  1281. X
  1282. Xall: multiping
  1283. X
  1284. Xclean:
  1285. X    rm -f a.out core *.o multiping
  1286. X
  1287. Xmultiping: multiping.o pingmisc.o
  1288. X    $(CC) $(CFLAGS) -o multiping multiping.o pingmisc.o
  1289. X
  1290. Xinstall:    multiping
  1291. X    chown root multiping ; chmod 4711 multiping
  1292. X
  1293. Xmultiping.o: multiping.c multiping.h vars.h
  1294. Xpingmisc.o:  multiping.h vars.h
  1295. END_OF_FILE
  1296.   if test 413 -ne `wc -c <'nocol-3.0/src/support/multiping/Makefile'`; then
  1297.     echo shar: \"'nocol-3.0/src/support/multiping/Makefile'\" unpacked with wrong size!
  1298.   fi
  1299.   # end of 'nocol-3.0/src/support/multiping/Makefile'
  1300. fi
  1301. if test -f 'nocol-3.0/src/support/multiping/README' -a "${1}" != "-c" ; then 
  1302.   echo shar: Will not clobber existing file \"'nocol-3.0/src/support/multiping/README'\"
  1303. else
  1304.   echo shar: Extracting \"'nocol-3.0/src/support/multiping/README'\" \(101 characters\)
  1305.   sed "s/^X//" >'nocol-3.0/src/support/multiping/README' <<'END_OF_FILE'
  1306. XThis version of ping can ping multiple sites at the same time
  1307. X(upto 128). Use -t for tabular output.
  1308. END_OF_FILE
  1309.   if test 101 -ne `wc -c <'nocol-3.0/src/support/multiping/README'`; then
  1310.     echo shar: \"'nocol-3.0/src/support/multiping/README'\" unpacked with wrong size!
  1311.   fi
  1312.   # end of 'nocol-3.0/src/support/multiping/README'
  1313. fi
  1314. if test -f 'nocol-3.0/src/support/multiping/vars.h' -a "${1}" != "-c" ; then 
  1315.   echo shar: Will not clobber existing file \"'nocol-3.0/src/support/multiping/vars.h'\"
  1316. else
  1317.   echo shar: Extracting \"'nocol-3.0/src/support/multiping/vars.h'\" \(272 characters\)
  1318.   sed "s/^X//" >'nocol-3.0/src/support/multiping/vars.h' <<'END_OF_FILE'
  1319. X/*
  1320. X * vars.h -- global variables for multiping
  1321. X */
  1322. X
  1323. X#ifdef GLOBALS
  1324. X#define EXTERN
  1325. X#else
  1326. X#define EXTERN extern
  1327. X#endif
  1328. X
  1329. XEXTERN int numsites;     /* # of sites being polled */
  1330. XEXTERN int datalen;        /* data length */
  1331. XEXTERN destrec *dest[MAXREMOTE]; /* remote sites to ping */
  1332. END_OF_FILE
  1333.   if test 272 -ne `wc -c <'nocol-3.0/src/support/multiping/vars.h'`; then
  1334.     echo shar: \"'nocol-3.0/src/support/multiping/vars.h'\" unpacked with wrong size!
  1335.   fi
  1336.   # end of 'nocol-3.0/src/support/multiping/vars.h'
  1337. fi
  1338. if test -f 'nocol-3.0/src/tpmon/tpmon-confg' -a "${1}" != "-c" ; then 
  1339.   echo shar: Will not clobber existing file \"'nocol-3.0/src/tpmon/tpmon-confg'\"
  1340. else
  1341.   echo shar: Extracting \"'nocol-3.0/src/tpmon/tpmon-confg'\" \(661 characters\)
  1342.   sed "s/^X//" >'nocol-3.0/src/tpmon/tpmon-confg' <<'END_OF_FILE'
  1343. X# $Id: tpmon-confg,v 1.2 1992/06/12 21:13:38 aggarwal Exp $
  1344. X#
  1345. X# Config file for 'tpmon' - throughput monitor
  1346. X#
  1347. X# The program connects to the discard port (port 9) of the listed machines
  1348. X# and transfers data for 30 seconds to measure the thruput. It then sleeps
  1349. X# for POLLINTERVAL seconds.
  1350. X# Sleep for 2 hours between polls
  1351. X
  1352. XPOLLINTERVAL    7200
  1353. X
  1354. X
  1355. X# If the thruput (in bits per second) falls below the threshold, it raises
  1356. X# the severity to WARNING level. you can use the 'tptest' program to see
  1357. X# the typical thruput to a site.
  1358. X#
  1359. X# <hostname>    <ip address>    <threshold in Kbps>    [TEST]
  1360. X#
  1361. X
  1362. Xnisc        128.121.50.7    2000
  1363. Xbonehead    128.121.50.140    2000
  1364. Xrutgers        128.6.7.38     100
  1365. END_OF_FILE
  1366.   if test 661 -ne `wc -c <'nocol-3.0/src/tpmon/tpmon-confg'`; then
  1367.     echo shar: \"'nocol-3.0/src/tpmon/tpmon-confg'\" unpacked with wrong size!
  1368.   fi
  1369.   # end of 'nocol-3.0/src/tpmon/tpmon-confg'
  1370. fi
  1371. if test -f 'nocol-3.0/src/utility/Makefile' -a "${1}" != "-c" ; then 
  1372.   echo shar: Will not clobber existing file \"'nocol-3.0/src/utility/Makefile'\"
  1373. else
  1374.   echo shar: Extracting \"'nocol-3.0/src/utility/Makefile'\" \(820 characters\)
  1375.   sed "s/^X//" >'nocol-3.0/src/utility/Makefile' <<'END_OF_FILE'
  1376. X# $Id: Makefile,v 1.2 1993/10/30 03:31:59 aggarwal Exp $
  1377. X
  1378. X## To compile all the 'misc' utility programs for nocol
  1379. X#
  1380. XTOP =           /usr/nocol
  1381. XSRCDIR =    $(TOP)/src
  1382. X
  1383. XBINDIR =        $(TOP)/bin
  1384. XETCDIR =        $(TOP)/etc
  1385. XINCLUDEDIR =    $(SRCDIR)/include
  1386. XLIBDIR =    $(SRCDIR)/lib
  1387. X
  1388. XINSTALL =    install
  1389. X
  1390. XPROGS = display_nocol_datafile
  1391. XOBJS = display_nocol_datafile.o
  1392. XINCLUDES = nocol.h
  1393. X
  1394. XCC =    cc
  1395. XCFLAGS=    -g -I$(INCLUDEDIR) -L$(LIBDIR)  -I../include -L../lib
  1396. XCDEFS=    -DTEST
  1397. XLIBS =  -lnocol $(SYSLIBS)
  1398. X
  1399. Xall:    $(PROGS)
  1400. X
  1401. X$(PROGS): $(OBJS)
  1402. X    $(CC) $(CFLAGS)  $@.o $(LIBS) -o $@
  1403. X
  1404. X.c.o:
  1405. X    $(CC) -c $(CFLAGS) $(CDEFS) $<
  1406. X
  1407. Xinstall: $(PROGS)
  1408. X    $(INSTALL) -c  -m 751 $(PROGS) $(BINDIR)/
  1409. X    - for f in keepalive_monitors notifier ; do \
  1410. X       [ -f $(BINDIR)/$$f ] || $(INSTALL) -c -m 751 $$f $(BINDIR)/ ; \
  1411. X    done
  1412. X
  1413. Xclean:
  1414. X    /bin/rm -f $(PROGS) core *.o
  1415. END_OF_FILE
  1416.   if test 820 -ne `wc -c <'nocol-3.0/src/utility/Makefile'`; then
  1417.     echo shar: \"'nocol-3.0/src/utility/Makefile'\" unpacked with wrong size!
  1418.   fi
  1419.   # end of 'nocol-3.0/src/utility/Makefile'
  1420. fi
  1421. if test -f 'nocol-3.0/src/utility/display_nocol_datafile.c' -a "${1}" != "-c" ; then 
  1422.   echo shar: Will not clobber existing file \"'nocol-3.0/src/utility/display_nocol_datafile.c'\"
  1423. else
  1424.   echo shar: Extracting \"'nocol-3.0/src/utility/display_nocol_datafile.c'\" \(893 characters\)
  1425.   sed "s/^X//" >'nocol-3.0/src/utility/display_nocol_datafile.c' <<'END_OF_FILE'
  1426. X/*+ 
  1427. X** $Header: /home/aggarwal/lsrc/nocol/src/utility/RCS/display_nocol_datafile.c,v 1.4 1993/10/19 17:06:37 aggarwal Exp $
  1428. X**/
  1429. X
  1430. X/*+ 
  1431. X** This module displays the NOCOL EVENT structure.
  1432. X**/
  1433. X
  1434. X#include "nocol.h"
  1435. X
  1436. X#include     <stdio.h>
  1437. X#include     <sys/file.h>
  1438. X
  1439. Xmain(ac, av)
  1440. X     char **av ;
  1441. X     int ac ;
  1442. X{
  1443. X    while (--ac)
  1444. X      display_nocol_datafile(*++av) ;
  1445. X}
  1446. X
  1447. X
  1448. Xdisplay_nocol_datafile(file)
  1449. X     char *file;
  1450. X{
  1451. X  EVENT v;
  1452. X  int bufsize, fd;
  1453. X  
  1454. X  if ( (fd = open (file, O_RDONLY)) < 0)
  1455. X  {
  1456. X      fprintf (stderr, "Error in opening file %s\n", file);
  1457. X      perror((char *) NULL);
  1458. X      return (1);
  1459. X  }
  1460. X  fprintf (stdout, ":::::  %s  ::::\n\n", file);
  1461. X  
  1462. X  while ((bufsize=read (fd, (char *)&v, sizeof(v))) == sizeof(v))
  1463. X    printf("%s\n", (char *)event_to_logstr(&v));
  1464. X  
  1465. X  if (bufsize != 0)            /* Error        */
  1466. X    fprintf (stderr, "Invalid data in %s\n", file);
  1467. X  
  1468. X}    /* end: display_nocol_datafile */
  1469. END_OF_FILE
  1470.   if test 893 -ne `wc -c <'nocol-3.0/src/utility/display_nocol_datafile.c'`; then
  1471.     echo shar: \"'nocol-3.0/src/utility/display_nocol_datafile.c'\" unpacked with wrong size!
  1472.   fi
  1473.   # end of 'nocol-3.0/src/utility/display_nocol_datafile.c'
  1474. fi
  1475. if test -f 'nocol-3.0/src/utility/myinstall' -a "${1}" != "-c" ; then 
  1476.   echo shar: Will not clobber existing file \"'nocol-3.0/src/utility/myinstall'\"
  1477. else
  1478.   echo shar: Extracting \"'nocol-3.0/src/utility/myinstall'\" \(792 characters\)
  1479.   sed "s/^X//" >'nocol-3.0/src/utility/myinstall' <<'END_OF_FILE'
  1480. X#!/bin/sh
  1481. X
  1482. X## Alternate for the old 'install' program which could understand the
  1483. X#  good old syntax-  'install -c -m <mode> file file file dest
  1484. X# Dunno why these OS folks had to change things so drastically!!
  1485. X#
  1486. X#    -vikas@jvnc.net  Oct 1993
  1487. X#
  1488. X
  1489. XMODE=755
  1490. X
  1491. X# I run the check for '-m' twice in case its been specified after -c option
  1492. X#
  1493. Xif [ "$1" = "-m" ]; then
  1494. X    MODE=$2
  1495. X    shift ; shift
  1496. Xfi
  1497. Xif [ "$1" = "-c" ]; then
  1498. X    shift ;        # ignore
  1499. Xfi
  1500. Xif [ "$1" = "-m" ]; then
  1501. X    MODE=$2
  1502. X    shift ; shift
  1503. Xfi
  1504. X
  1505. X###
  1506. X###
  1507. Xif [ $# -eq 0 ]; then
  1508. X    echo "Nothing to install"
  1509. X    exit 1
  1510. Xfi
  1511. X
  1512. Xwhile [ $# -gt 1 ]
  1513. Xdo
  1514. X    FILES="$FILES $1"
  1515. X    shift
  1516. Xdone
  1517. X
  1518. XDEST=$1
  1519. X
  1520. Xecho "myinstall:  Installing $FILES  to  $DEST"
  1521. X
  1522. Xcp  $FILES   $DEST
  1523. Xif [ -d "$DEST" ]; then
  1524. X    ( cd "$DEST" ; chmod $MODE $FILES )
  1525. Xelif [ -f "$DEST" ]; then
  1526. X    chmod $MODE  $DEST
  1527. Xfi
  1528. END_OF_FILE
  1529.   if test 792 -ne `wc -c <'nocol-3.0/src/utility/myinstall'`; then
  1530.     echo shar: \"'nocol-3.0/src/utility/myinstall'\" unpacked with wrong size!
  1531.   fi
  1532.   chmod +x 'nocol-3.0/src/utility/myinstall'
  1533.   # end of 'nocol-3.0/src/utility/myinstall'
  1534. fi
  1535. if test -f 'nocol-3.0/src/utility/notifier' -a "${1}" != "-c" ; then 
  1536.   echo shar: Will not clobber existing file \"'nocol-3.0/src/utility/notifier'\"
  1537. else
  1538.   echo shar: Extracting \"'nocol-3.0/src/utility/notifier'\" \(894 characters\)
  1539.   sed "s/^X//" >'nocol-3.0/src/utility/notifier' <<'END_OF_FILE'
  1540. X#!/bin/csh -f
  1541. X#
  1542. X# $Header: /home/aggarwal/lsrc/nocol/src/utility/RCS/notifier,v 1.1 1993/10/15 13:41:48 aggarwal Exp $
  1543. X#
  1544. X# program to notify when site is down (in pingmon) for extended period
  1545. X# of time in NOCOL.
  1546. X#
  1547. X#    -vikas@jvnc.net, Oct 1993
  1548. X#
  1549. Xset TEMP = "/tmp/notifier.$$"
  1550. Xset PROG = /nocol/bin/eventselect
  1551. X
  1552. Xset DATA = "/nocol/data/ippingmon-output"
  1553. Xset TO2 = "vikas@jvnc.net waters@jvnc.net"
  1554. Xset TO3 = "vikas@jvnc.net waters@jvnc.net marcus@jvnc.net"
  1555. X
  1556. Xif ( ! -x ${PROG} ) exit 1
  1557. X
  1558. X${PROG} -v critical -f +10800 -t +7200 ${DATA} > ${TEMP}
  1559. X
  1560. Xif ( -z ${TEMP} ) then
  1561. X  /bin/rm -f ${TEMP}
  1562. Xelse
  1563. X  cat ${TEMP} | /usr/ucb/mail -s "Sites down for 2-3 hours" ${TO2}
  1564. X  /bin/rm -f ${TEMP}
  1565. Xendif
  1566. X
  1567. X##
  1568. X##
  1569. X${PROG} -v critical -f +14400 -t +10800 ${DATA} > ${TEMP}
  1570. X
  1571. Xif ( -z ${TEMP} ) then
  1572. X  /bin/rm -f ${TEMP} 
  1573. Xelse
  1574. X  cat ${TEMP} | /usr/ucb/mail -s "Sites down for 3-4 hours" ${TO3}
  1575. X  /bin/rm -f ${TEMP}
  1576. Xendif
  1577. X
  1578. END_OF_FILE
  1579.   if test 894 -ne `wc -c <'nocol-3.0/src/utility/notifier'`; then
  1580.     echo shar: \"'nocol-3.0/src/utility/notifier'\" unpacked with wrong size!
  1581.   fi
  1582.   chmod +x 'nocol-3.0/src/utility/notifier'
  1583.   # end of 'nocol-3.0/src/utility/notifier'
  1584. fi
  1585. if test -f 'nocol-3.0/src/utility/show_nocol_struct_sizes.c' -a "${1}" != "-c" ; then 
  1586.   echo shar: Will not clobber existing file \"'nocol-3.0/src/utility/show_nocol_struct_sizes.c'\"
  1587. else
  1588.   echo shar: Extracting \"'nocol-3.0/src/utility/show_nocol_struct_sizes.c'\" \(341 characters\)
  1589.   sed "s/^X//" >'nocol-3.0/src/utility/show_nocol_struct_sizes.c' <<'END_OF_FILE'
  1590. X#include "../include/nocol.h"
  1591. X
  1592. Xmain()
  1593. X{
  1594. X    EVENT v;
  1595. X
  1596. X    printf("sender: %d, site= %d, var= %d, mon= %d %d %d %d, severity= %d %d, nocop= %d, total= %d\n",
  1597. X       sizeof v.sender, sizeof v.site, sizeof v.var, 
  1598. X       sizeof v.mon, sizeof v.day, sizeof v.hour, sizeof v.min,
  1599. X       sizeof v.severity, sizeof v.loglevel, sizeof v.nocop, sizeof v) ;
  1600. X}
  1601. END_OF_FILE
  1602.   if test 341 -ne `wc -c <'nocol-3.0/src/utility/show_nocol_struct_sizes.c'`; then
  1603.     echo shar: \"'nocol-3.0/src/utility/show_nocol_struct_sizes.c'\" unpacked with wrong size!
  1604.   fi
  1605.   # end of 'nocol-3.0/src/utility/show_nocol_struct_sizes.c'
  1606. fi
  1607. if test -f 'nocol-3.0/src/version.h' -a "${1}" != "-c" ; then 
  1608.   echo shar: Will not clobber existing file \"'nocol-3.0/src/version.h'\"
  1609. else
  1610.   echo shar: Extracting \"'nocol-3.0/src/version.h'\" \(1293 characters\)
  1611.   sed "s/^X//" >'nocol-3.0/src/version.h' <<'END_OF_FILE'
  1612. X/*
  1613. X * $Id: version.h,v 3.0 1993/10/30 00:07:44 aggarwal Exp $
  1614. X */
  1615. X
  1616. X/*
  1617. X  Copyright 1993 JvNCnet, Global Enterprise Services
  1618. X
  1619. X  Permission to use, copy, modify and distribute this software and its
  1620. X  documentation for any purpose is hereby granted  without fee, provided
  1621. X  that the above copyright notice appear in all copies and that both
  1622. X  that copyright notice and this permission notice appear in supporting
  1623. X  documentation, and that the name of JvNCnet or Global Enterprise
  1624. X  Services not be used in advertising or publicity pertaining to
  1625. X  distribution of the software without specific, written prior
  1626. X  permission. Global Enterprise Services makes no representations about
  1627. X  the suitability of this software for any purpose.  It is provided "as
  1628. X  is" without express or implied warranty.
  1629. X
  1630. X  GLOBAL ENTERPRISE SERVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO
  1631. X  THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  1632. X  FITNESS. IN NO EVENT SHALL GLOBAL ENTERPRISE SERVICES BE LIABLE FOR
  1633. X  ANY DAMAGES WHATSOEVER, INCLUDING DAMAGES RESULTING FROM LOSS OF USE,
  1634. X  DATA OR PROFITS, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  1635. X  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  1636. X*/
  1637. X
  1638. X#ifndef _NOCOLVERSION_
  1639. X  static char version[] = "$Revision: 3.0 $" ;
  1640. X#endif
  1641. END_OF_FILE
  1642.   if test 1293 -ne `wc -c <'nocol-3.0/src/version.h'`; then
  1643.     echo shar: \"'nocol-3.0/src/version.h'\" unpacked with wrong size!
  1644.   fi
  1645.   # end of 'nocol-3.0/src/version.h'
  1646. fi
  1647. echo shar: End of archive 26 \(of 26\).
  1648. cp /dev/null ark26isdone
  1649. MISSING=""
  1650. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 ; do
  1651.     if test ! -f ark${I}isdone ; then
  1652.     MISSING="${MISSING} ${I}"
  1653.     fi
  1654. done
  1655. if test "${MISSING}" = "" ; then
  1656.     echo You have unpacked all 26 archives.
  1657.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1658. else
  1659.     echo You still must unpack the following archives:
  1660.     echo "        " ${MISSING}
  1661. fi
  1662. exit 0
  1663. exit 0 # Just in case...
  1664.