Home | History | Annotate | Line # | Download | only in timed
      1  1.1      cgd #	@(#)CHANGES	5.1 (Berkeley) 5/11/93
      2  1.1      cgd 
      3  1.1      cgd This new version is almost identical to the timed and timedc code
      4  1.1      cgd that has been shipped for years by a workstation vendor.
      5  1.1      cgd 
      6  1.1      cgd Among the many changes:
      7  1.1      cgd 
      8  1.1      cgd improve `timedc msite` to accept a list of hostnames.
      9  1.1      cgd 
     10  1.1      cgd change slave-masters to answer the packets generated by `timedc msite`
     11  1.1      cgd     with the name of the real master, not their own.  This makes it
     12  1.1      cgd     possible to "chase the chain" of slave servers to the ultimate
     13  1.1      cgd     master.
     14  1.1      cgd 
     15  1.1      cgd much improve the log caused by `timedc trace on`:
     16  1.1      cgd     -made `timed -t` work.
     17  1.1      cgd     -suppression of repeated entries, which both slowed down the daemon
     18  1.1      cgd 	(sometimes catastrophically) and tended to make disks fill up
     19  1.1      cgd 	even more quickly.
     20  1.1      cgd     -better time stamps on log entries
     21  1.1      cgd     -more messages
     22  1.1      cgd     -dump information about slaves, master, and so on each time
     23  1.1      cgd 	a message asking the log be turned on is received, and
     24  1.1      cgd 	when the log is turned off.
     25  1.1      cgd     -fewer CPU cycles
     26  1.1      cgd 
     27  1.1      cgd use a hash table to keep track of slaves, instead of the stupid linear
     28  1.1      cgd     list.  This becomes handy with hundreds of slaves, instead of
     29  1.1      cgd     the original design limit of "a room with a few VAX's."
     30  1.1      cgd 
     31  1.1      cgd separate the main protocol timer from that used to look for other networks
     32  1.1      cgd     to master.
     33  1.1      cgd 
     34  1.1      cgd time stamp packets received by the daemon, so that time corrections
     35  1.1      cgd     are not made (even more) inaccurate by waiting in the internal,
     36  1.1      cgd     timed queue while the daemon is processing other messages.
     37  1.1      cgd 
     38  1.1      cgd made -n and -i work with subnets not named in /etc/networks
     39  1.1      cgd 
     40  1.1      cgd compute the median of the measured clocks, instead of the average
     41  1.1      cgd     of "good" times.
     42  1.1      cgd 
     43  1.1      cgd vastly improve the accuracy of the clock difference measure by 
     44  1.1      cgd     `timedc clockdiff`.
     45  1.1      cgd 
     46  1.1      cgd use adjtime() when possible, and directly set the clock only when
     47  1.1      cgd     necessary.
     48  1.1      cgd 
     49  1.1      cgd when the requested adjustment is small, perform only part of it, to
     50  1.1      cgd     damp oscillations and improve the long term accuracy of the
     51  1.1      cgd     adjustments.
     52  1.1      cgd 
     53  1.1      cgd fix uncounted core-dumps on machines that do not allow dereferencing 0
     54  1.1      cgd     in both the daemon and timedc.
     55  1.1      cgd 
     56  1.1      cgd fix "master loop detection".
     57  1.1      cgd 
     58  1.1      cgd fix several cases in which multi-homed masters could get into shouting 
     59  1.1      cgd     matches, consuming all available network bandwidth and CPU cycles
     60  1.1      cgd     (which ever runs out first), and convincing all bystanders to stop
     61  1.1      cgd     advancing their own clocks.
     62  1.1      cgd 
     63  1.1      cgd refuse to behave badly when other machines do.  Instead of arguing forever,
     64  1.1      cgd     go off and sulk when other machines refuse to play by the rules.
     65  1.1      cgd 
     66  1.1      cgd increase the maximum number of clients.
     67  1.1      cgd 
     68  1.1      cgd add "-F host,host2,..." to "freerun" or "trust" only some hosts.  This
     69  1.1      cgd     is handy both when only some machines should be trusted to let
     70  1.1      cgd     root use the `date` command to change time in the network.
     71  1.1      cgd 
     72  1.1      cgd     It is also handy when one machine has some other way of adjusting
     73  1.1      cgd     its clock, whether NTP or a direct radio or atomic connection.
     74  1.1      cgd     "-F localhost" causes `timed` to "trust" only itself.
     75  1.1      cgd 
     76  1.1      cgd     It is also handy to build a hierarchy of timed masters crossing
     77  1.1      cgd     networks.  The TSP protocol has no provision of "goodness of clock",
     78  1.4  msaitoh     no natural way to completely heal network partitions.  Judicious
     79  1.1      cgd     use of -F or -G can cause each gateway to trust only itself and
     80  1.1      cgd     machines closer to a central machine with a radio or atomic clock.
     81  1.1      cgd 
     82  1.1      cgd add #ifdef code that supports NIS "netgroups" of trusted hosts, which
     83  1.1      cgd     can be easier to administer than -F.
     84  1.1      cgd 
     85  1.1      cgd add #ifdef code to compute an aged total adjustment.  This can be used
     86  1.1      cgd     in systems that can make long term changes in their system clock
     87  1.1      cgd     frequency, e.g. "timetrim" in the Silicon Graphics kernel.
     88  1.1      cgd 
     89  1.1      cgd 
     90  1.1      cgd Problems observed by others that are unresolved include:
     91  1.1      cgd 
     92  1.1      cgd Practically any users can send to the master TSP messages and this
     93  1.1      cgd 	way corrupt the reliability of the system.  Authentication
     94  1.1      cgd 	of messages should be provided.  Unfortunately, that would
     95  1.1      cgd 	require changing the protocol with all of the implied
     96  1.3      wiz 	compatibility problems.  Fortunately, the new -F and -G args
     97  1.1      cgd 	can be used to cause the daemon to ignore time changes from
     98  1.1      cgd 	untrusted machines.
     99  1.1      cgd 
    100  1.1      cgd MAN.	The limit of 1013 on the number of slaves hosts should be doc'ed.
    101  1.1      cgd 
    102  1.1      cgd 	It should be dynamically allocated with no limit.  On a
    103  1.1      cgd 	large network, one host could possibly master over many
    104  1.1      cgd 	more than 30 hosts.   Given the timers in the code and
    105  1.1      cgd 	effectively in the protocol, and the time required by each
    106  1.1      cgd 	master to talk to each slave, it is not practical to have
    107  1.1      cgd 	more than 200-300 slaves.  The master cannot keep up because
    108  1.1      cgd 	the slave-chatting is single-threaded.  when the master
    109  1.1      cgd 	gets behind, slaves start demanding elections.  To
    110  1.1      cgd 	significantly increase the number of slaves would require
    111  1.1      cgd 	multi-treading things, and given that a network with more
    112  1.1      cgd 	than 300 directly addressable machines has worse problems
    113  1.1      cgd 	than keep the time of day right, not worth worrying about.
    114  1.1      cgd 
    115  1.1      cgd UGLY,CODE. timedc/cmds.c has a lots of repeated code in it.
    116  1.1      cgd 
    117  1.1      cgd ****    The first thing is that each command is set up as if it
    118  1.1      cgd 	were an individual program taking argc and argv.  A more
    119  1.1      cgd 	conventional calling style should be used.  I don't think
    120  1.1      cgd 	any of the routines take more than a couple arguments.
    121  1.1      cgd 
    122  1.1      cgd UGLY.	fxn definition syntax does't follow convention:
    123  1.1      cgd 	has type on same line.
    124  1.1      cgd 
    125  1.1      cgd ****	It needs to be fixed at least enough that tags
    126  1.1      cgd 	will work on it.  An entire cleanup might be nice later, but
    127  1.1      cgd 	is noncritical.
    128  1.1      cgd 
    129  1.1      cgd LOBBY(mildly),CODE:	Would be very convenient if date(1) took a
    130  1.1      cgd 	+-<number> argument to set the time relatively.  With
    131  1.1      cgd 	the advent of timed it is now reasonable to synchronize
    132  1.1      cgd 	with WWV, which is nearly impossible to do "by hand"
    133  1.1      cgd 	with just an absolute date, and scripts are too slow.
    134  1.1      cgd 	format could be +-nn...nn.ss, where the '.' is required
    135  1.1      cgd 	to remove ambiguity.
    136  1.1      cgd 
    137  1.1      cgd ****	If you want to do it go ahead.  It sounds useful.  As far as
    138  1.1      cgd 	syntax goes, the normal format for the date should work just
    139  1.2      wiz 	fine for this.  If the date is preceded by a plus or minus,
    140  1.1      cgd 	the change is relative, otherwise it is absolute.
    141  1.1      cgd 
    142  1.1      cgd 
    143  1.1      cgd Vernon Schryver.
    144  1.1      cgd vjs (a] sgi.com
    145