## $Header: /nocol/src/RCS/INSTALL,v 1.1 1992/06/19 00:50:46 aggarwal Exp $

INSTALLATION INSTRUCTIONS FOR 'NOCOL'
=====================================

Most/all of the configuration is done in the top level 'Makefile' (under
nocol/src. All customizable parameters are well documented. Edit this file
before typing 'make'.

To build only a subset of the monitoring programs, use the following syntax:

   make TOP=/usr/nocol SRCS="netmon pingmon tpmon trapmon"

If building for IP, the 'multiping' program is in src/support/. Compile and
install this as root in the BIN directory (remember that this has to be
suid root). Then set the value of IPPING in the Makefile and also set the
-DMULTIPING in the Makefile. This will ping 30 sites simultaneously and thus
is good for testing a large number of sites.

In the installation process, note that the 'trapmon' program has to be
installed 'suid' since it needs to access a priveleged port.

Sample config files are also provided in the corresponding source directories
for each monitor.


Makefile
--------
1. Decide on a toplevel directory under which the software will be installed.
   Define TOP to this toplevel directory.

   Note that the program creates the following directories under this
   toplevel directory:

	    data		output from all the monitors
	    bin			for installation of all the binaries
	    etc			location of all the config files
   It is advised that the location of these sudirectories be left as they
   are. However, if you must make changes, then the various subdirectory
   names can also be set individually in the Makefile.

2. Set the value of SRCDIR to the location of the 'src' directory. By default
   the Makefile sets the value from TOP.

3. On NeXT systems, uncomment the line 'NEEDOBJS' since they need the
   'putenv.o' module.

4. The 'pingmon' directory can generate the OSI version as well as the IP
   version of the 'pingmon' monitor. If you want the OSI 'osipingmon' monitor
   also, then set MAKEOSI to YES.

5. Set SYSDEFS to MULTIPING if you are using the multiple ping program for IP
   'ippingmon'. Remember to set the value of IPPING to the location of this
   ping program (multiping) also if you are defining this. The multiping
   program is located under 'src/support'. Compile and install it separately.
   Make sure that it is installed 'suid' root.

6. For the nameserver monitor 'nsmon', set the domain to be queried for. The
   list of hosts that are to be queried are set in the config file. Typically
   this should be set to your default domain (from /etc/resolv.conf) and the
   config file should point to the main nameservers for your domain.

7. Set the value of IPPING and OSIPING to the exact location of the 'ping'
   programs for IP and OSI (typically under /etc or /usr/etc). If the output
   from the ping commands is like the following, then you are in luck, else
   you will need to make minor modifications in the 'src/pingmon/poll_sites.c' 
   module (the area to modify is well commented so it should be easy).

	  r2d2-vikas> /usr/etc/ping -s nisc.jvnc.net 1000  5 | tail -2
	  5 packets transmitted, 5 packets received, 0% packet loss
	  round-trip (ms)  min/avg/max = 4/4/5

   If using 'multiping', the '-t' option (for tabular output) is used instead
   so no modifications are needed.

8. Set the definition of SRCS to the programs that you want to compile.
   Check the values of CC (for the compiler type) and CFLAGS.

9. You are all set. Type in

       % make 
       % make install

   It is advised to save the output of the make command to a temporary output
   file so that it can be perused later for any errors.

10. Create the config files in the TOP/etc directory. The sample
    'keepalive_monitors' program should be modified and run from your crontab
    periodically (at JvNCnet, we distribute the monitors on two systems and
    the nocol disk is NFS shared, so the load is evenly spread out).

11. Start up the various monitors. Use 'nocol -l 4' to see if any data is
    being collected under the DATA directory.


TROUBLESHOOTING
---------------

1. Some warnings are to be expected, but there should be no major errors.

2. If the errors are about include files or variable types, look for the file
   that is being included under the  /usr/include sub-directories. The
   various systems love to move include files back and forth between the
   include and the include/sys directories (especially 'time.h').

3. For the nameserver monitor, old versions of the resolver library might
   complain. Older include files defined the '_res' variable differently, so
   try changing all occurences of '_res.nsaddr_list[0]' to '_res.nsaddr' in
   the src/nsmon/nsmon.c module. Make sure that the 'libresolv' library
   exists.

4. For trapmon, the CMU SNMP library is used. Make sure that it was properly
   built under 'src/cmu-snmp/lib'


Best of luck. Comments to 'nocol-info@jvnc.net' and bugs to
'nocol-bugs@jvnc.net'.

README file has more information. For documentation on overview, look under
doc/nocol.8. For design of the system, look under doc/nocol.3
-------

