1 /* -*- Mode
: Text
-*- */
3 autogen definitions options
;
5 #include autogen
-version.def
10 eaddr
= "http://bugs.ntp.org, bugs@ntp.org";
12 text
= `cat COPYRIGHT`
;
17 prog
-title
= "standard SNTP program";
21 config
-header
= "config.h";
39 descrip
= "Force IPv4 DNS name resolution";
41 Force DNS resolution of following host names on the command line
42 to the IPv4 namespace.
50 descrip
= "Force IPv6 DNS name resolution";
52 Force DNS resolution of following host names on the command line
53 to the IPv6 namespace.
60 descrip
= "Use an unprivileged port";
62 Use an unprivilegded UDP port for our queries.
69 flags
-cant
= extraverbose
, megaverbose
;
70 descrip
= "Slightly verbose";
72 Diagnostic messages for non
-fatal errors and a limited amount of
73 tracing should be written to standard error. Fatal ones always
74 produce a diagnostic. This option should be set when there is a
75 suspected problem with the server
, network or the source.
82 flags
-cant
= normalverbose
, megaverbose
;
83 descrip
= "Extra verbose";
85 Produce more and less comprehensible output
, mainly for investigating
86 problems with apparently inconsistent timestamps. This option should
87 be set when the program fails with a message indicating that is the
95 flags
-cant
= normalverbose
, extraverbose
;
96 descrip
= "Mega verbose";
98 Very verbose debugging output that will interfere with the timing
99 when writing to the
terminal (because of line buffered output from C
).
100 Note that the times produced by this are the corrections needed
, and
101 not the error in the local clock. This option should be set only when
102 debugging the source.
109 flags
-cant
= adjtime
;
110 descrip
= "Set (step) the time with settimeofday()";
118 flags
-cant
= settimeofday
;
119 descrip
= "Set (slew) the time with adjtime()";
124 detail
= <<- _END_DETAIL
126 can be used as a SNTP client to query a NTP or SNTP server and either display
127 the time or set the local system
's time (given suitable privilege). It can be
128 run as an interactive command or in a
131 NTP is the Network Time Protocol (RFC 1305) and SNTP is the
132 Simple Network Time Protocol (RFC 2030, which supersedes RFC 1769).
135 prog-man-descrip = <<- _END_PROG_MAN_DESCRIP
137 can be used as a SNTP client to query a NTP or SNTP server and either display
138 the time or set the local system's
time (given suitable privilege
). It can be
139 run as an interactive command or in a
142 NTP is the Network Time
Protocol (RFC
1305) and SNTP is the
143 Simple Network Time
Protocol (RFC
2030, which supersedes RFC
1769).
147 recognizes the following options
:
150 indicates that diagnostic messages for non
-fatal errors and a limited amount of
151 tracing should be written to standard error. Fatal ones always produce a
152 diagnostic. This option should be set when there is a suspected problem with
153 the server
, network or the source.
156 requests more and less comprehensible output
, mainly for investigating problems
157 with apparently inconsistent timestamps. This option should be set when the
158 program fails with a message indicating that is the trouble.
161 requests very verbose debugging output
, and will interfere with the timing
162 when writing to the
terminal (because of line buffered output from C
). Note
163 that the times produced by this are the corrections needed
, and not the error
164 in the local clock. This option should be set only when debugging the source.
167 indicates that it should query a daemon save file being maintained by it.
168 This needs no privilege and will change neither the save file nor the clock.
170 The default is that it should behave as a client
, and the following options
174 indicates that the system clock should be reset by
176 Naturally
, this will work only if the user has enough privilege.
179 indicates that the system clock should be reset by
181 Naturally
, this will work only if the user has enough privilege.
183 The default is to write the estimated correct local date and
time (i.e. not
184 UTC
) to the standard output in a format like
185 .BR
"'1996 Oct 15 20:17:25.123 + 4.567 +/- 0.089 secs'" ,
187 .B
"'+ 4.567 +/- 0.089 secs'"
188 indicates the estimated error in the time on the local system.
191 sets the name of the lock file to ensure that there is only
194 running at once. The default is installation
-dependent
, but will usually be
198 sets the maximum ignorable variation between the clocks to
200 Acceptable values are from
0.001 to
1, and the default is
0.1 if a NTP host is
201 is specified and
0.5 otherwise.
204 sets the maximum value of various delays that are deemed acceptable to
206 Acceptable values are from
1 to
60, and the default is
5. It should sometimes
207 be increased if there are problems with the network
, NTP server or system
208 clock
, but take care.
211 sets the maximum clock change that will be made automatically to
213 Acceptable values are from
1 to
3600 or
215 and the default is
30. If the program is being run interactively in ordinary
216 client mode
, and the system clock is to be changed
, larger corrections will
217 prompt the user for confirmation. Specifying
219 will disable this and the correction will be made regardless.
222 sets the maximum number of NTP packets required to
224 Acceptable values are from
1 to
25 if a NTP host is specified and from
5 to
25
225 otherwise
, and the default is
5. If the maximum isn
't enough, the system needs
226 a better consistency algorithm than this program uses.
229 sets a rough limit on the total running time to
231 seconds. Acceptable values are from 1 to 3600, and the default is 15 if a NTP
232 host is specified and 300 otherwise.
235 force IPv4 DNS resolution.
238 force IPv6 DNS resolution.
241 are the DNS names or IP numbers of hosts to use for the challenge and response
242 protocol; if no names are given, the program waits for broadcasts. Polling a
243 server is vastly more reliable than listening to broadcasts. Note that a
244 single component numeric address is not allowed, to avoid ambiguities. If
245 more than one name is give, they will be used in a round-robin fashion.
252 which must be less than
254 (or, if a NTP host is not specified
255 .BR delay / count "),"
258 must be less than half of
266 Note that none of the above values are closely linked to the limits described
267 in the NTP protocol (RFC 1305).
269 The simplest use of this program is as an unprivileged command to check the
270 current time and error in the local clock. For example:
272 .B sntp ntpserver.somewhere
274 With suitable privilege, it can be run as a command or in a
276 job to reset the local clock from a reliable server, like the
280 commands. For example:
282 .B sntp -a ntpserver.somewhere
284 More information on how to use this utility is given in the
286 file in the distribution. In particular, this
288 page does not describe how to set it up as a server, which needs special care
289 to avoid propagating misinformation.
291 When used as a client in non-daemon mode, the program returns a zero exit
292 status for success, and a non-zero one otherwise. When used as a daemon
293 (either client or server), it does not return except after a serious error.
295 The program implements the SNTP protocol, and does not provide all NTP
296 facilities. In particular, it contains no checks against any form of spoofing.
297 If this is a serious concern, some network security mechanism (like a firewall
302 There are some errors, ambiguities and inconsistencies in the RFCs, and this
303 code may not interwork with all other NTP implementations. Any unreasonable
304 restrictions should be reported as bugs to whoever is responsible. It may
305 be difficult to find out who that is.
307 The program will stop as soon as it feels that things have got out of control.
308 In client daemon mode, it will usually fail during an extended period of
309 network or server inaccessibility or excessively slow performance, or when the
310 local clock is reset by another process. It will then need restarting
311 manually. Experienced system administrators can write a shell script, a
315 to do this automatically.
317 The error cannot be estimated reliably with broadcast packets or for the drift
318 in daemon mode (even with client-server packets), and the guess made by the
319 program may be wrong (possibly even very wrong). If this is a problem, then
322 option to a larger value may help. Or it may not.
325 was developed by N.M. Maclaren of the University of Cambridge Computing
327 _END_PROG_MAN_DESCRIP;