Merge from vendor branch GDB:
[dragonfly.git] / contrib / ntpd / ntpd.8
1 .\" $OpenBSD: src/usr.sbin/ntpd/ntpd.8,v 1.10 2004/11/02 18:00:38 henning 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 .Pp
45 .Nm
46 is usually started at boot time, and can be enabled by
47 setting the following in
48 .Pa /etc/rc.conf.local :
49 .Pp
50 .Dl ntpd_flags=\&"\&"
51 .Pp
52 See
53 .Xr rc 8
54 and
55 .Xr rc.conf 8
56 for more information on the boot process
57 and enabling daemons.
58 .Pp
59 When
60 .Nm
61 starts up, it reads settings from a configuration file,
62 typically
63 .Xr ntpd.conf 5 .
64 .Pp
65 The options are as follows:
66 .Bl -tag -width "-f fileXXX"
67 .It Fl d
68 Do not daemonize.
69 If this option is specified,
70 .Nm
71 will run in the foreground and log to
72 .Em stderr .
73 .It Fl f Ar file
74 Use
75 .Ar file
76 as the configuration file,
77 instead of the default
78 .Pa /etc/ntpd.conf .
79 .It Fl S
80 Do not set the time immediately at startup.
81 This is the default.
82 .It Fl s
83 Set the time immediately at startup if the local clock is off by more
84 than 180 seconds.
85 Allows for a large time correction,
86 eliminating the need to run
87 .Xr rdate 8
88 before starting
89 .Nm .
90 Currently, the
91 .Fl s
92 option is added unconditionally in
93 .Xr rc 8 .
94 Make sure to specify the
95 .Fl S
96 option
97 (add/edit
98 .Va ntpd_flags
99 in
100 .Xr rc.conf.local 8 )
101 if this behaviour is not desired.
102 .El
103 .Sh FILES
104 .Bl -tag -width "/etc/ntpd.confXXX" -compact
105 .It Pa /etc/ntpd.conf
106 default
107 .Nm
108 configuration file
109 .El
110 .Sh SEE ALSO
111 .Xr date 1 ,
112 .Xr adjtime 2 ,
113 .Xr ntpd.conf 5 ,
114 .Xr rc 8 ,
115 .Xr rc.conf 8 ,
116 .Xr rdate 8 ,
117 .Xr timed 8
118 .Rs
119 .%R RFC 1305
120 .%T "Network Time Protocol (Version 3)"
121 .%D March 1992
122 .Re
123 .Rs
124 .%R RFC 2030
125 .%T "Simple Network Time Protocol (SNTP) Version 4"
126 .%D October 1996
127 .Re
128 .Sh HISTORY
129 The
130 .Nm
131 program first appeared in
132 .Ox 3.6 .