Merge from vendor branch HEIMDAL:
[dragonfly.git] / contrib / ntpd / ntpd.8
1 .\" $OpenBSD: src/usr.sbin/ntpd/ntpd.8,v 1.13 2004/12/10 03:54:18 jaredy Exp $
2 .\"
3 .\" Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
4 .\"
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
8 .\"
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN
14 .\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
15 .\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 .\"
17 .Dd July 9, 2004
18 .Dt NTPD 8
19 .Os
20 .Sh NAME
21 .Nm ntpd
22 .Nd "Network Time Protocol daemon"
23 .Sh SYNOPSIS
24 .Nm ntpd
25 .Bk -words
26 .Op Fl dSs
27 .Op Fl f Ar file
28 .Ek
29 .Sh DESCRIPTION
30 The
31 .Nm
32 daemon synchronizes the local clock to one or more remote NTP servers,
33 and can also act as an NTP server itself,
34 redistributing the local time.
35 It implements the Simple Network Time Protocol version 4,
36 as described in RFC 2030,
37 and the Network Time Protocol version 3,
38 as described in RFC 1305.
39 .Pp
40 .Nm
41 uses the
42 .Xr adjtime 2
43 system call to correct the local system time without causing time jumps.
44 Adjustments larger than 128ms are logged using
45 .Xr syslog 3 .
46 The threshold value is chosen to avoid having local clock drift
47 thrash the log files.
48 Should
49 .Nm
50 be started with the
51 .Fl d
52 option, all calls to
53 .Xr adjtime 2
54 will be logged.
55 .Pp
56 .Nm
57 is usually started at boot time, and can be enabled by
58 setting the following in
59 .Pa /etc/rc.conf.local :
60 .Pp
61 .Dl ntpd_flags=\&"\&"
62 .Pp
63 See
64 .Xr rc 8
65 and
66 .Xr rc.conf 8
67 for more information on the boot process
68 and enabling daemons.
69 .Pp
70 When
71 .Nm
72 starts up, it reads settings from a configuration file,
73 typically
74 .Xr ntpd.conf 5 .
75 .Pp
76 The options are as follows:
77 .Bl -tag -width "-f fileXXX"
78 .It Fl d
79 Do not daemonize.
80 If this option is specified,
81 .Nm
82 will run in the foreground and log to
83 .Em stderr .
84 .It Fl f Ar file
85 Use
86 .Ar file
87 as the configuration file,
88 instead of the default
89 .Pa /etc/ntpd.conf .
90 .It Fl S
91 Do not set the time immediately at startup.
92 This is the default.
93 .It Fl s
94 Set the time immediately at startup if the local clock is off by more
95 than 180 seconds.
96 Allows for a large time correction,
97 eliminating the need to run
98 .Xr rdate 8
99 before starting
100 .Nm .
101 Currently, the
102 .Fl s
103 option is added unconditionally in
104 .Xr rc 8 .
105 Make sure to specify the
106 .Fl S
107 option
108 (add/edit
109 .Va ntpd_flags
110 in
111 .Xr rc.conf.local 8 )
112 if this behaviour is not desired.
113 .El
114 .Sh FILES
115 .Bl -tag -width "/etc/ntpd.confXXX" -compact
116 .It Pa /etc/ntpd.conf
117 default
118 .Nm
119 configuration file
120 .El
121 .Sh SEE ALSO
122 .Xr date 1 ,
123 .Xr adjtime 2 ,
124 .Xr ntpd.conf 5 ,
125 .Xr rc 8 ,
126 .Xr rc.conf 8 ,
127 .Xr rdate 8 ,
128 .Xr timed 8
129 .Rs
130 .%R RFC 1305
131 .%T "Network Time Protocol (Version 3)"
132 .%D March 1992
133 .Re
134 .Rs
135 .%R RFC 2030
136 .%T "Simple Network Time Protocol (SNTP) Version 4"
137 .%D October 1996
138 .Re
139 .Sh HISTORY
140 The
141 .Nm
142 program first appeared in
143 .Ox 3.6 .