NAME
synclock - Synchronize system clocks
SYNOPSIS
synclock [+/-options] authority...
DESCRIPTION
This program queries the clocks on the authority host(s), and uses
the adjtime() system call to adjust the local clock to the mean of
the hosts' clocks. If one or more of the named hosts isn't
reachable, we ignore it and use the remaining hosts.
If this program is run on the local servers, their clocks can be
kept synchronized; other machines can then use the server(s) as a
time standard.
This program is a lot more efficient than Sun's tool, but it isn't
really good for better than the nearest second. This suffices for
editing and make.
OPTIONS
Options start with '+' (enable) or '-' (disable), followed by a letter,
and possibly a value. The case of the option letter is not significant,
though the case of letters in values is usually significant.
- -a
- Don't do the adjustment. Default: +a.
- +a
- Do the adjustment. Will fail if not super-user.
- -d<l><file>
- +d<l><file>
- Debug mode: <l> is 1-digit level;
<file> is output file.
Default is "+d1", fatal errors only, written to stderr.
- -f
- +f<n>
- Repeat forever. The -f and -r option suppress this; only one syncs
will be done, and then we exit. The +f and +r option mean to keep
running and repeat the operation every <n> seconds. Default: -f,
which will bring the clock into sync and exit, after which the
local clock may slowly drift..
- -i
- +i<n>
- Interval between repeats, in seconds. The "-i" option suppresses
repeats, and is equivalent to "-f". The default is "-i". If you
use +i, <n> should probably be several hours, unless your
clock is particularly bad.
- -r
- +r<n>
- Use the rtime() routine to query the authorities. If <n> is given,
it is the interval between queries. The default is "-r". This is
not used by default, because few systems seem to have this service
running. If it is common at your site, you might want to change
the default to use this rather than +t.
- -t
- +t<n>
-
Use the UDP time service to query the authorities.
<n> is the UDP port to use; the default is "+t37".
- -v<l><file>
- +v<l><file>
- Verbose mode; the same as the 'd' debug option.
The default behavior with only a list of authority hostnames is to
use the UDP time service just once, wait up to 5 seconds for
replies, and then use the mean time in the replies to adjust the
system clock. The result will be clocks that are synchronized well
enough (within a second) for the purpose of things like make(1), but
not nearly well enough for, say, long-baseline interferometry.
BUGS
Experimenting has shown that there are hosts on the network that
return a Unix timestamp (seconds since the start of 1970) rather
than the RFC's standard (seconds since the start of 1900). We have a
test for this, using the interval between 1900 and 1970 as the
threshold. This may break on some machines when 2040 rolls around.
There are some machines on the internet, mostly IBM mainframes, whose
time service believes that 1900 was a leap year. Such machines will
give a time that is off by one day. Don't use them. And send in a
bug report. This will probably be a problem after 2000/2/29, which
many machines will consider to be 2000/3/1, but this program shouldn't
be affected, since we use only their binary timestamps.
AUTHOR