summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ntp/doc/ntpd.8
blob: 91e35a125789ea6084753b4a8b2fc6f308578d68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
.\"
.\" $FreeBSD$
.\"
.Dd January 10, 2000
.Dt NTPD 8
.Os
.Sh NAME
.Nm ntpd
.Nd Network Time Protocol (NTP) daemon
.Sh SYNOPSIS
.Nm ntpd
.Op Fl aAbdm
.Op Fl c Ar conffile
.Op Fl f Ar driftfile
.Op Fl k Ar keyfile
.Op Fl l Ar logfile
.Op Fl p Ar pidfile
.Op Fl r Ar broadcastdelay
.Op Fl s Ar statsdir
.Op Fl t Ar trustedkey
.Op Fl v Ar variable
.Op Fl V Ar variable
.Sh DESCRIPTION
.Nm
is an operating system daemon
which sets and maintains the system time-of-day
in synchronism with Internet standard time servers.
.Nm
is a complete implementation of the Network Time Protocol (NTP)
version 4,
but also retains compatibility with version 3,
as defined by RFC 1305,
and version 1 and 2,
as defined by RFC 1059 and RFC 1119,
respectively.
.Nm
does most computations in 64-bit floating point arithmetic
and does relatively clumsy 64-bit fixed point operations
only when necessary to preserve the ultimate precision,
about 232 picoseconds.
While the ultimate precision is not achievable
with ordinary workstations and networks of today,
it may be required with future nanosecond CPU clocks and gigabit LANs.
.Pp
The daemon can operate in any of several modes,
including symmetric active/passive,
client/server broadcast/multicast and manycast.
A broadcast/multicast or manycast client can discover remote servers,
compute server-client propagation delay correction factors
and configure itself automatically.
This makes it possible to deploy a fleet of workstations
without specifying configuration details
specific to the local environment.
.Pp
Ordinarily,
.Nm
reads the
.Pa ntp.conf
configuration file at startup time
in order to determine the synchronization sources and operating modes.
It is also possible to specify a working, although limited,
configuration entirely on the command line,
obviating the need for a configuration file.
This may be particularly appropriate
when the local host is to be configured
as a broadcast/multicast client or manycast client,
with all peers being determined
by listening to broadcasts at run time.
.Pp
If NetInfo support is built into
.Nm Ns ,
then
.Nm
will attempt to read its configuration from the NetInfo
if the default configuration file cannot be read
and no file is specified by the
.Fl c
option.
.Pp
Various
internal
.Nm
variables can be displayed and configuration options altered
while the daemon is running
through use of the
.Xr ntpq 8
and
.Xr ntpdc 8
programs.
.Pp
When
.Nm
starts it looks at the value of
.Xr umask 2
and if it is zero,
.Nm
will set it to 022.
.Pp
The following command line options are available:
.Bl -tag -width indent
.It Fl a
Enable authentication mode (default).
.It Fl A
Disable authentication mode.
.It Fl b
Synchronize using NTP broadcast messages.
.It Fl c Ar conffile
Specify the name and path of the configuration file.
.It Fl d
Specify debugging mode.
This flag may occur multiple times,
with each occurrence indicating greater detail of display.
.It Fl D Ar level
Specify debugging level directly.
.It Fl f Ar driftfile
Specify the name and path of the drift file.
.It Fl g
Normally, the daemon exits
if the offset exceeds a 1000 s sanity limit.
This option overrides this limit
and allows the time to be set to any value without restriction.
.It Fl k Ar keyfile
Specify the name and path of the file
containing the NTP authentication keys.
.It Fl l Ar logfile
Specify the name and path of the log file.
The default is the system log facility.
.It Fl m
Synchronize using NTP multicast messages
on the IP multicast group address 224.0.1.1
(requires multicast kernel).
.It Fl p Ar pidfile
Specify the name and path to record the daemon's process ID.
.It Fl P
Override the priority limit set by the operating system.
Not recommended for sissies.
.It Fl r Ar broadcastdelay
Specify the default propagation delay
between the broadcast/multicast server and this computer.
This is necessary
only if the delay cannot be computed automatically by the protocol.
.It Fl s Ar statsdir
Specify the directory path for files created by the statistics
facility.
.It Fl t Ar key
Add a key number to the trusted key list.
.It Fl v Ar variable
.It Fl V Ar variable
Add a system variable listed by default.
.It Fl x
Ordinarily, if the time is to be adjusted more than 128 ms,
it is stepped, not gradually slewed.
This option forces the time to be slewed in all cases.
Note: since the slew rate is limited to 0.5 ms/s,
each second of adjustment requires an amortization interval of 2000 s.
Thus, an adjustment of many seconds can take hours or days to amortize.
.El
.Ss The Configuration File
The
.Nm
configuration file is read at initial startup by the
.Xr ntpd 8
daemon in order to specify the synchronization sources,
modes and other related information.
Usually, it is installed in the
.Pa /etc
directory,
but could be installed elsewhere
(see the daemon's
.Fl c
command line option).
.Pp
The file format is similar to other Unix configuration files.
Comments begin with a
.Qq #
character and extend to the end of the line;
blank lines are ignored.
Configuration commands consist of an initial keyword
followed by a list of arguments,
some of which may be optional, separated by whitespace.
Commands may not be continued over multiple lines.
Arguments may be host names,
host addresses written in numeric, dotted-quad form,
integers, floating point numbers (when specifying times in seconds)
and text strings.
.Pp
See the following pages for configuration and control options.
While there is a rich set of options available,
the only required option is one or more
.Ic server ,
.Ic peer ,
.Ic broadcast
or
.Ic manycastclient
commands
described in
.Xr ntp_conf 8 .
.Pp
.Bl -tag -width ntp_clockX8X -compact
.It Xr ntp_conf 8
Configuration Options
.It Xr ntp_auth 8
Authentication Options
.It Xr ntp_mon 8
Monitoring Options
.It Xr ntp_acc 8
Access Control Options
.It Xr ntp_clock 8
Reference Clock Options
.It Xr ntp_misc 8
Miscellaneous Options
.Pp
.El
The
.Qo
Notes on Configuring NTP and Setting up a NTP Subnet
.Qc
page
(available as part of the HTML documentation
provided in
.Pa /usr/share/doc/ntp )
contains an extended discussion of these options.
.Sh FILES
.Bl -tag -width /etc/ntp.drift -compact
.It Pa /etc/ntp.conf
the default name of the configuration file
.It Pa /etc/ntp.drift
the default name of the drift file
.It Pa /etc/ntp.keys
the default name of the key file
.El
.Sh SEE ALSO
.Xr ntp_acc 8 ,
.Xr ntp_auth 8 ,
.Xr ntp_clock 8 ,
.Xr ntp_conf 8 ,
.Xr ntp_misc 8 ,
.Xr ntp_mon 8 ,
.Xr ntpdate 8 ,
.Xr ntpdc 8 ,
.Xr ntpq 8
.Pp
In addition to the manual pages provided,
comprehensive documentation is available on the world wide web
at
.Li http://www.ntp.org/ .
A snapshot of this documentation is available in HTML format in
.Pa /usr/share/doc/ntp .
.Rs
.%A David L. Mills
.%T Network Time Protocol (Version 1)
.%O RFC1059
.Re
.Rs
.%A David L. Mills
.%T Network Time Protocol (Version 2)
.%O RFC1119
.Re
.Rs
.%A David L. Mills
.%T Network Time Protocol (Version 3)
.%O RFC1305
.Re
.Sh HISTORY
Written by
.An Dennis Ferguson
at the University of Toronto.
Text amended by
.An David Mills
at the University of Delaware.
.Sh BUGS
.Nm
has gotten rather fat.
While not huge, it has gotten larger than might
be desireable for an elevated-priority daemon running on a workstation,
particularly since many of the fancy features which consume the space
were designed more with a busy primary server, rather than a high
stratum workstation, in mind.
OpenPOWER on IntegriCloud