BSD 4_3_Net_2 release
[unix-history] / usr / src / usr.sbin / timed / timed / timed.8
.\" Copyright (c) 1980, 1991 Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)timed.8 6.6 (Berkeley) 4/27/91
.\"
.Dd April 27, 1991
.Dt TIMED 8
.Os BSD 4.3
.Sh NAME
.Nm timed
.Nd time server daemon
.Sh SYNOPSIS
.Nm timed
.Op Fl M
.Op Fl t
.Op Fl i Ar network
.Op Fl n Ar network
.Sh DESCRIPTION
This
is the time server daemon and is normally invoked
at boot time from the
.Xr rc 8
file.
It synchronizes the host's time with the time of other
machines in a local area network running
.Nm timed 8 .
These time servers will slow down the clocks of some machines
and speed up the clocks of others to bring them to the average network time.
The average network time is computed from measurements of clock differences
using the
.Tn ICMP
timestamp request message.
.Pp
The service provided by
.Nm timed
is based on a master-slave
scheme.
When
.Nm timed 8
is started on a machine, it asks the master for the network time
and sets the host's clock to that time.
After that, it accepts synchronization messages periodically sent by
the master and calls
.Xr adjtime 2
to perform the needed corrections on the host's clock.
.Pp
It also communicates with
.Xr date 1
in order to set the date globally,
and with
.Xr timedc 8 ,
a timed control program.
If the machine running the master crashes, then the slaves will elect
a new master from among slaves running with the
.Fl M
flag.
A
.Nm timed
running without the
.Fl M
flag will remain a slave.
The
.Fl t
flag enables
.Nm timed
to trace the messages it receives in the
file
.Pa /var/log/timed.log .
Tracing can be turned on or off by the program
.Xr timedc 8 .
Normally
.Nm timed
checks for a master time server on each network to which
it is connected, except as modified by the options described below.
It will request synchronization service from the first master server
located.
If permitted by the
.Fl M
flag, it will provide synchronization service on any attached networks
on which no current master server was detected.
Such a server propagates the time computed by the top-level master.
The
.Fl n
flag, followed by the name of a network which the host is connected to
(see
.Xr networks 5 ) ,
overrides the default choice of the
network addresses made by the program.
Each time the
.Fl n
flag appears, that network name is added to a list of valid networks.
All other networks are ignored.
The
.Fl i
flag, followed by the name of a network to which the host is connected
(see
.Xr networks 5 ) ,
overrides the default choice of the network addresses made by the program.
Each time the
.Fl i
flag appears, that network name is added to a list of networks to ignore.
All other networks are used by the time daemon.
The
.Fl n
and
.Fl i
flags are meaningless if used together.
.Sh FILES
.Bl -tag -width /var/log/timed.masterlog -compact
.It Pa /var/log/timed.log
tracing file for timed
.It Pa /var/log/timed.masterlog
log file for master timed
.El
.Sh SEE ALSO
.Xr date 1 ,
.Xr adjtime 2 ,
.Xr gettimeofday 2 ,
.Xr icmp 4 ,
.Xr timedc 8 ,
.Rs
.%T "TSP: The Time Synchronization Protocol for UNIX 4.3BSD"
.%A R. Gusella
.%A S. Zatti
.Re
.Sh HISTORY
The
.Nm
daemon appeared in
.Bx 4.3 .