Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.ARPA Path: utzoo!linus!philabs!prls!amdimage!amdcad!decwrl!ucbvax!daemon From: tcp-ip@ucbvax.ARPA Newsgroups: fa.tcp-ip Subject: Voting on time Message-ID: <10029@ucbvax.ARPA> Date: Tue, 20-Aug-85 18:40:57 EDT Article-I.D.: ucbvax.10029 Posted: Tue Aug 20 18:40:57 1985 Date-Received: Fri, 23-Aug-85 20:27:34 EDT Sender: daemon@ucbvax.ARPA Organization: University of California at Berkeley Lines: 32 From: Richard JohnsonWhen DCN1's time got screwed up a while back, I decided to never completely trust any system again. Thus I changed my program which gets the time upon system startup to use a rather involved system of verification. This program uses a udp broadcast on the local net to get time from all local systems. It also sends special udp requests to any systems listed on the command line. After getting all the replies it averages all the localnet times, throughs out the time farthest from the average if it's too far away (a parameter), and continues to do this until it either gets a bunch of times within a specified range or has one time left. After all of this, if it has a "usable" average (taken from more than one number all within the max. range), then it begins looking through the times received from the "special requests". The first one of these it finds which is within another settable range of the local average, it takes as an authority. Basically the idea is to avoid asking the operator to set the time as much as possible. As a last resort we call a special program "settime" which allows the operator to type in the date a time in almost any format he feels like. We always use "/bin/date" to actually set the time so that accounting information is updated correctly (this was a fast hack and I didn't feel like rewriting /bin/date). This program is available with anonymous ftp (password guest) from uci-icsa.arpa. Warning: It has never been run through lint and thus probably has lots of things in it people will not like. If anyone makes improvements, I would like to hear about them. ------------------------------------------------------------------------ Richard Johnson raj@uci.arpa (ARPA) UCI ICS Research Systems Manager ucbvax!ucivax!raj (UUCP)