File: ntpd.8

package info (click to toggle)
openntpd 20080406p-10
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,152 kB
  • ctags: 1,051
  • sloc: ansic: 5,174; sh: 2,983; yacc: 507; awk: 323; makefile: 206
file content (140 lines) | stat: -rw-r--r-- 3,284 bytes parent folder | download
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
.\" $OpenBSD: ntpd.8,v 1.21 2007/10/15 06:59:32 otto Exp $
.\"
.\" Copyright (c) 2003, 2004, 2006 Henning Brauer <henning@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN
.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: November 10 2007 $
.Dt NTPD 8
.Os
.Sh NAME
.Nm ntpd
.Nd "Network Time Protocol daemon"
.Sh SYNOPSIS
.Nm ntpd
.Bk -words
.Op Fl dnSsv
.Op Fl f Ar file
.Op Fl p Ar file
.Ek
.Sh DESCRIPTION
The
.Nm
daemon synchronizes the local clock to one or more remote NTP servers
or local timedelta sensors.
.Nm
can also act as an NTP server itself,
redistributing the local time.
It implements the Simple Network Time Protocol version 4,
as described in RFC 2030,
and the Network Time Protocol version 3,
as described in RFC 1305.
.Pp
.Nm
uses the
.Xr adjtime 2
system call to correct the local system time without causing time jumps.
Adjustments larger than 128ms are logged using
.Xr syslog 3
with LOG_INFO priority.
The threshold value is chosen to avoid having local clock drift
thrash the log files.
Should
.Nm
be started with the
.Fl d
option, all calls to
.Xr adjtime 2
will be logged.
.Pp
When
.Nm
starts up, it reads settings from a configuration file,
typically
.Xr ntpd.conf 5 .
.Pp
The options are as follows:
.Bl -tag -width "-p fileXXX"
.It Fl d
Do not daemonize.
If this option is specified,
.Nm
will run in the foreground and log to
.Em stderr .
.It Fl p Ar file
Write pid to
.Ar file
.It Fl f Ar file
Use
.Ar file
as the configuration file,
instead of the default
.Pa /etc/ntpd.conf .
.It Fl n
Configtest mode.
Only check the configuration file for validity.
.It Fl S
Do not set the time immediately at startup.
This is the default.
.It Fl s
Set the time immediately at startup if the local clock is off by more
than 180 seconds.
Allows for a large time correction,
eliminating the need to run
.Xr rdate 8
before starting
.Nm .
.It Fl v
This option allows
.Nm
to send DEBUG priority messages to syslog.
.El
.Pp
When
.Nm
receives a
.Dv SIGUSR1
signal, it will write its peer and sensor status to syslog.
.Sh FILES
.Bl -tag -width "/var/lib/openntpd/ntpd.driftXXX" -compact
.It Pa /etc/ntpd.conf
default
.Nm
configuration file
.It Pa /var/lib/openntpd/ntpd.drift
drift file, written by
.Nm
periodically and used at startup to get the initial clock drift
.El
.Sh SEE ALSO
.Xr date 1 ,
.Xr adjfreq 2 ,
.Xr adjtime 2 ,
.Xr ntpd.conf 5 ,
.Xr rdate 8 ,
.Xr timed 8
.Rs
.%R RFC 1305
.%T "Network Time Protocol (Version 3)"
.%D March 1992
.Re
.Rs
.%R RFC 2030
.%T "Simple Network Time Protocol (SNTP) Version 4"
.%D October 1996
.Re
.Sh HISTORY
The
.Nm
program first appeared in
.Ox 3.6 .