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