Home | History | Annotate | Line # | Download | only in monitoring
README revision 1.1.1.1.28.2
      1  1.1.1.1.28.2  msaitoh This directory contains support for monitoring the local clock of xntp daemons.
      2  1.1.1.1.28.2  msaitoh 
      3  1.1.1.1.28.2  msaitoh WARNING: The scripts and routines contained in this directory are beta
      4  1.1.1.1.28.2  msaitoh 	 release!  Do not depend on their correct operation. They are,
      5  1.1.1.1.28.2  msaitoh 	 however, in regular use at University of Erlangen-Nuernberg.
      6  1.1.1.1.28.2  msaitoh 	 No severe problems are known for this code.
      7  1.1.1.1.28.2  msaitoh 
      8  1.1.1.1.28.2  msaitoh !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      9  1.1.1.1.28.2  msaitoh PLEASE THINK TWICE BEFORE STARTING MONITORING REMOTE XNTP DEAMONS !!!!
     10  1.1.1.1.28.2  msaitoh MONITORING MAY INCREASE THE LOAD OF THE DEAMON MONITORED AND MAY
     11  1.1.1.1.28.2  msaitoh INCREASE THE NETWORK LOAD SIGNIFICANTLY
     12  1.1.1.1.28.2  msaitoh !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     13  1.1.1.1.28.2  msaitoh 
     14  1.1.1.1.28.2  msaitoh 
     15  1.1.1.1.28.2  msaitoh Files are:
     16  1.1.1.1.28.2  msaitoh 
     17  1.1.1.1.28.2  msaitoh README:
     18  1.1.1.1.28.2  msaitoh 	This file
     19  1.1.1.1.28.2  msaitoh 
     20  1.1.1.1.28.2  msaitoh ntptrap:
     21  1.1.1.1.28.2  msaitoh 	perl script to log ntp mode 6 trap messages.
     22  1.1.1.1.28.2  msaitoh 
     23  1.1.1.1.28.2  msaitoh 	It sends a set_trap request to each server given and dumps the
     24  1.1.1.1.28.2  msaitoh 	trap messages received. It handles refresh of set_trap.
     25  1.1.1.1.28.2  msaitoh 	Currently it handles only NTP V2, however the NTP V3 servers
     26  1.1.1.1.28.2  msaitoh 	also accept v2 requests. It will not interpret v3 system and
     27  1.1.1.1.28.2  msaitoh 	peer stati correctly.
     28  1.1.1.1.28.2  msaitoh 
     29  1.1.1.1.28.2  msaitoh 	usage:
     30  1.1.1.1.28.2  msaitoh 	  ntptrap [-n] [-p <port>] [-l <debug-output>] servers...
     31  1.1.1.1.28.2  msaitoh 	
     32  1.1.1.1.28.2  msaitoh 	-n:		do not send set_trap requests
     33  1.1.1.1.28.2  msaitoh 
     34  1.1.1.1.28.2  msaitoh 	port:		port to listen for responses
     35  1.1.1.1.28.2  msaitoh 			useful if you have a configured trap
     36  1.1.1.1.28.2  msaitoh 
     37  1.1.1.1.28.2  msaitoh 	debug-output:	file to write trace output to (for debugging)
     38  1.1.1.1.28.2  msaitoh 
     39  1.1.1.1.28.2  msaitoh 	This script convinced me that ntp trap messages are only of
     40  1.1.1.1.28.2  msaitoh 	little use.
     41  1.1.1.1.28.2  msaitoh 
     42  1.1.1.1.28.2  msaitoh ntploopstat:
     43  1.1.1.1.28.2  msaitoh 	perl script to gather loop info statistics from xntpd via mode 7
     44  1.1.1.1.28.2  msaitoh 	LOOP_INFO requests.
     45  1.1.1.1.28.2  msaitoh 
     46  1.1.1.1.28.2  msaitoh 	This script collects data to allow monitoring of remote xntp servers
     47  1.1.1.1.28.2  msaitoh 	where it is not possible to directly access the loopstats file
     48  1.1.1.1.28.2  msaitoh 	produced by xntpd itself. Of course, it can be used to sample
     49  1.1.1.1.28.2  msaitoh 	a local server if it is not configured to produce a loopstats file.
     50  1.1.1.1.28.2  msaitoh 
     51  1.1.1.1.28.2  msaitoh 	Please note, this program poses a high load on the server as
     52  1.1.1.1.28.2  msaitoh 	a communication takes place every delay seconds ! USE WITH CARE !
     53  1.1.1.1.28.2  msaitoh 
     54  1.1.1.1.28.2  msaitoh 	usage:
     55  1.1.1.1.28.2  msaitoh 	  ntploopstat [-d<delay>] [-t<timeout>] [-l <logfile>] [-v] [ntpserver]
     56  1.1.1.1.28.2  msaitoh 	
     57  1.1.1.1.28.2  msaitoh 	delay:		number of seconds to wait between samples
     58  1.1.1.1.28.2  msaitoh 			default: 60 seconds
     59  1.1.1.1.28.2  msaitoh 	timeout:	number of seconds to wait for reply
     60  1.1.1.1.28.2  msaitoh 			default 12 seconds
     61  1.1.1.1.28.2  msaitoh 	logfile:	file to log samples to
     62  1.1.1.1.28.2  msaitoh 			default: loopstats:<ntpserver>:
     63  1.1.1.1.28.2  msaitoh 			(note the trailing colon)
     64  1.1.1.1.28.2  msaitoh 			This name actually is a prefix.
     65  1.1.1.1.28.2  msaitoh 			The file name is dynamically derived by appending
     66  1.1.1.1.28.2  msaitoh 			the name of the month the sample belongs to.
     67  1.1.1.1.28.2  msaitoh 			Thus all samples of a month end up in the same file.
     68  1.1.1.1.28.2  msaitoh 
     69  1.1.1.1.28.2  msaitoh 	the format of the files generated is identical to the format used by
     70  1.1.1.1.28.2  msaitoh 	xntpd with the loopstats file:
     71  1.1.1.1.28.2  msaitoh 		MJD <seconds since midnight UTC> offset frequency compliance
     72  1.1.1.1.28.2  msaitoh 	
     73  1.1.1.1.28.2  msaitoh 	if a timeout occurs the next sample is tried after delay/2 seconds
     74  1.1.1.1.28.2  msaitoh 
     75  1.1.1.1.28.2  msaitoh 	The script will terminate after MAX_FAIL (currently 60)
     76  1.1.1.1.28.2  msaitoh 	consecutive errors.
     77  1.1.1.1.28.2  msaitoh 
     78  1.1.1.1.28.2  msaitoh 	Errors are counted for:
     79  1.1.1.1.28.2  msaitoh 		- error on send call
     80  1.1.1.1.28.2  msaitoh 		- error on select call
     81  1.1.1.1.28.2  msaitoh 		- error on recv call
     82  1.1.1.1.28.2  msaitoh 		- short packet received
     83  1.1.1.1.28.2  msaitoh 		- bad packet 
     84  1.1.1.1.28.2  msaitoh 		- error on open for logfile
     85  1.1.1.1.28.2  msaitoh 
     86  1.1.1.1.28.2  msaitoh ntploopwatch:
     87  1.1.1.1.28.2  msaitoh 	perl script to display loop filter statistics collected by ntploopstat
     88  1.1.1.1.28.2  msaitoh 	or dumped directly by xntpd.
     89  1.1.1.1.28.2  msaitoh 
     90  1.1.1.1.28.2  msaitoh 	Gnuplot is used to produce a graphical representation of the sample
     91  1.1.1.1.28.2  msaitoh 	values, that have been preprocessed and analysed by this script.
     92  1.1.1.1.28.2  msaitoh 
     93  1.1.1.1.28.2  msaitoh 	It can either be called to produce a printout of specific data set or
     94  1.1.1.1.28.2  msaitoh 	used to continously monitor the values. Monitoring is achieved by 
     95  1.1.1.1.28.2  msaitoh 	periodically reprocessing the logfiles, which are updated regularly
     96  1.1.1.1.28.2  msaitoh 	either by a running ntploopstat process or by the running xntpd.
     97  1.1.1.1.28.2  msaitoh 
     98  1.1.1.1.28.2  msaitoh 	usage:
     99  1.1.1.1.28.2  msaitoh 	  to watch statistics permanently:
    100  1.1.1.1.28.2  msaitoh 	     ntploopwatch [-v[<level>]] [-c <config-file>] [-d <working-dir>]
    101  1.1.1.1.28.2  msaitoh 
    102  1.1.1.1.28.2  msaitoh 	  to get a single print out specify also
    103  1.1.1.1.28.2  msaitoh 			  -P<printer> [-s<samples>]
    104  1.1.1.1.28.2  msaitoh 				      [-S <start-time>] [-E <end-time>]
    105  1.1.1.1.28.2  msaitoh 				      [-O <MaxOffs>] [-o <MinOffs>]
    106  1.1.1.1.28.2  msaitoh 	
    107  1.1.1.1.28.2  msaitoh 	level:		level of verbosity for debugging
    108  1.1.1.1.28.2  msaitoh 	config-file:	file to read configurable settings from
    109  1.1.1.1.28.2  msaitoh 			On each iteration it is checked and reread
    110  1.1.1.1.28.2  msaitoh 			if it has been changed
    111  1.1.1.1.28.2  msaitoh 			default: loopwatch.config
    112  1.1.1.1.28.2  msaitoh 	working-dir:	specify working directory for process, affects
    113  1.1.1.1.28.2  msaitoh 			interpretation of relative file names
    114  1.1.1.1.28.2  msaitoh 	
    115  1.1.1.1.28.2  msaitoh 	All other flags are only useful with printing plots, as otherwise
    116  1.1.1.1.28.2  msaitoh 	command line values would be replaced by settings from the config file.
    117  1.1.1.1.28.2  msaitoh 
    118  1.1.1.1.28.2  msaitoh 	printer:	specify printer to print plot
    119  1.1.1.1.28.2  msaitoh 			BSD print systems semantics apply; if printer
    120  1.1.1.1.28.2  msaitoh 			is omitted the name "ps" is used; plots are
    121  1.1.1.1.28.2  msaitoh 			prepared using PostScript, thus the printer
    122  1.1.1.1.28.2  msaitoh 			should best accept postscript input
    123  1.1.1.1.28.2  msaitoh 
    124  1.1.1.1.28.2  msaitoh 	For the following see also the comments in loopwatch.config.SAMPLE
    125  1.1.1.1.28.2  msaitoh 
    126  1.1.1.1.28.2  msaitoh 	samples:	use last # samples from input data
    127  1.1.1.1.28.2  msaitoh 	start-time:	ignore input samples before this date
    128  1.1.1.1.28.2  msaitoh 	end-time:	ignore input samples after this date
    129  1.1.1.1.28.2  msaitoh 			if both start-time and end-time are specified
    130  1.1.1.1.28.2  msaitoh 			a given samples value is ignored
    131  1.1.1.1.28.2  msaitoh 	MaxOffs:
    132  1.1.1.1.28.2  msaitoh 	MinOffs:	restrict value range 
    133  1.1.1.1.28.2  msaitoh 
    134  1.1.1.1.28.2  msaitoh loopwatch.config.SAMPLE:
    135  1.1.1.1.28.2  msaitoh 	sample config file for ntploopwatch
    136  1.1.1.1.28.2  msaitoh 	each configurable option is explained there
    137  1.1.1.1.28.2  msaitoh 
    138  1.1.1.1.28.2  msaitoh lr.pl:
    139  1.1.1.1.28.2  msaitoh 	linear regression package used by ntploopwatch to compute
    140  1.1.1.1.28.2  msaitoh 	linear approximations for frequency and offset values
    141  1.1.1.1.28.2  msaitoh 	within display range
    142  1.1.1.1.28.2  msaitoh 
    143  1.1.1.1.28.2  msaitoh timelocal.pl:
    144  1.1.1.1.28.2  msaitoh 
    145  1.1.1.1.28.2  msaitoh 	used during conversion of ISO_DATE_TIME values specified in
    146  1.1.1.1.28.2  msaitoh 	loopwatch config files to unix epoch values (seconds since
    147  1.1.1.1.28.2  msaitoh 	1970-01-01_00:00_00 UTC)
    148  1.1.1.1.28.2  msaitoh 
    149  1.1.1.1.28.2  msaitoh 	A version of this file is distributed with perl-4.x, however,
    150  1.1.1.1.28.2  msaitoh 	it has a bug related to dates crossing 1970, causing endless loops..
    151  1.1.1.1.28.2  msaitoh 	The version contained here has been fixed.
    152  1.1.1.1.28.2  msaitoh 
    153  1.1.1.1.28.2  msaitoh ntp.pl:
    154  1.1.1.1.28.2  msaitoh 	perl support for ntp v2 mode 6 message handling
    155  1.1.1.1.28.2  msaitoh 	WARNING: This code is beta level - it triggers a memory leak;
    156  1.1.1.1.28.2  msaitoh 		 as for now it is not quite clear, wether this is caused by a
    157  1.1.1.1.28.2  msaitoh 		 bug in perl or by bad usage of perl within this script.
    158  1.1.1.1.28.2  msaitoh 
    159