OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / netkit / original / man8 / timed.8
1 .\" Copyright (c) 1980, 1991 Regents of the University of California.
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)timed.8     6.7 (Berkeley) 5/11/93
33 .\"
34 .Dd May 11, 1993
35 .Dt TIMED 8
36 .Os "Linux NetKit (0.17)"
37 .Sh NAME
38 .Nm timed
39 .Nd time server daemon
40 .Sh SYNOPSIS
41 .Nm timed
42 .Op Fl M
43 .Op Fl t
44 .Op Fl d
45 .Op Fl i Ar network
46 .Op Fl n Ar network
47 .Op Fl F Ar host1 host2 ...
48 .Sh DESCRIPTION
49 This
50 is a time server daemon and is normally invoked
51 at boot time from the
52 .Xr rc 8
53 file.  
54 It synchronizes the host's time with the time of other
55 machines in a local area network running 
56 .Nm timed 8 .
57 These time servers will slow down the clocks of some machines
58 and speed up the clocks of others to bring them to the average network time.
59 The average network time is computed from measurements of clock differences
60 using the
61 .Tn ICMP
62 timestamp request message.
63 .Pp
64 The service provided by
65 .Nm timed
66 is based  on a master-slave
67 scheme.
68 When
69 .Nm timed 8
70 is started on a machine, it asks the master for the network time
71 and sets the host's clock to that time.
72 After that, it accepts synchronization messages periodically sent by
73 the master and calls 
74 .Xr adjtime 2
75 to perform the needed corrections on the host's clock.
76 .Pp
77 It also communicates with
78 .Xr date 1
79 in order to set the date globally,
80 and with 
81 .Xr timedc 8 ,
82 a timed control program.
83 If the machine running the master crashes, then the slaves will elect
84 a new master from among slaves running with the 
85 .Fl M
86 flag.
87 A
88 .Nm timed
89 running without the
90 .Fl M
91 or
92 .Fl F
93 flags will remain a slave.
94 The 
95 .Fl t
96 flag enables
97 .Nm timed
98 to trace the messages it receives in the
99 file
100 .Pa /var/log/timed.log .
101 Tracing can be turned on or off by the program
102 .Xr timedc 8 .
103 The
104 .Fl d
105 flag is for debugging the daemon.
106 It causes the program to not put itself into the background.
107 Normally
108 .Nm timed
109 checks for a master time server on each network to which
110 it is connected, except as modified by the options described below.
111 It will request synchronization service from the first master server
112 located.
113 If permitted by the
114 .Fl M
115 flag, it will provide synchronization service on any attached networks
116 on which no current master server was detected.
117 Such a server propagates the time computed by the top-level master.
118 The 
119 .Fl n
120 flag, followed by the name of a network which the host is connected to
121 (see
122 .Xr networks 5 ) ,
123 overrides the default choice of the
124 network addresses made by the program.
125 Each time the
126 .Fl n
127 flag appears, that network name is added to a list of valid networks.
128 All other networks are ignored.
129 The 
130 .Fl i
131 flag, followed by the name of a network to which the host is connected
132 (see
133 .Xr networks 5 ) ,
134 overrides the default choice of the network addresses made by the program.
135 Each time the
136 .Fl i
137 flag appears, that network name is added to a list of networks to ignore.
138 All other networks are used by the time daemon.
139 The
140 .Fl n
141 and 
142 .Fl i
143 flags are meaningless if used together.
144 .Pp
145 .Nm Timed
146 checks for a master time server on each network to which
147 it is connected, except as modified by the
148 .Fl n
149 and
150 .Fl i
151 options described above.
152 If it finds masters on more than one network, it chooses one network
153 on which to be a "slave," and then periodically checks the other
154 networks to see if the masters there have disappeared.
155 .Pp
156 One way to synchronize a group of machines is to use an NTP daemon to 
157 synchronize the clock of one machine to a distant standard or a radio
158 receiver and 
159 .Fl F Ar hostname
160 to tell its timed daemon to trust only itself.
161 .Pp
162 Messages printed by the kernel on the system console occur with
163 interrupts disabled. 
164 This means that the clock stops while they are printing.
165 A machine with many disk or network hardware problems and consequent
166 messages cannot keep good time by itself.  Each message typically causes
167 the clock to lose a dozen milliseconds.  A time daemon can
168 correct the result.
169 .Pp
170 Messages in the system log about machines that failed to respond
171 usually indicate machines that crashed or were turned off.
172 Complaints about machines that failed to respond to initial time
173 settings are often associated with 
174 .Dq multi-homed
175 machines that looked for time masters on more than one network and eventually
176 chose to become slaves on other networks.
177 .Sh WARNINGS
178 If two or more time daemons, whether 
179 .Nm timed 
180 or
181 .Xr ntp ,
182 try to adjust the same clock, temporal chaos will result.
183 If both 
184 .Nm
185 and another time daemon are run on the same machine,
186 ensure that the 
187 .Fl F
188 flag is used, so that 
189 .Nm timed
190 never attempts to adjust the local clock.
191 .Pp 
192 The protocol is based on UDP/IP broadcasts.  All machines within
193 the range of a broadcast that are using the TSP protocol must cooperate.
194 There cannot be more than a single administrative domain using the
195 .Fl F
196 flag among all machines reached by a broadcast packet.
197 Failure to follow this rule is usually indicated by complaints concerning
198 .Dq untrusted
199 machines in the system log.
200 .Sh FILES
201 .Bl -tag -width /var/log/timed.masterlog -compact
202 .It Pa /var/log/timed.log
203 tracing file for timed
204 .It Pa /var/log/timed.masterlog
205 log file for master timed 
206 .El
207 .Sh SEE ALSO
208 .Xr date 1 ,
209 .Xr adjtime 2 ,
210 .Xr gettimeofday 2 ,
211 .Xr icmp 4 ,
212 .Xr timedc 8
213 .Rs
214 .%T "TSP: The Time Synchronization Protocol for UNIX 4.3BSD"
215 .%A R. Gusella
216 .%A S. Zatti
217 .Re
218 .Sh HISTORY
219 The
220 .Nm
221 daemon appeared in
222 .Bx 4.3 .