[ntpsec commit] Poperly factor the sntp documentation.
Eric S. Raymond
esr at ntpsec.org
Mon Oct 5 00:29:07 UTC 2015
Module: ntpsec
Branch: master
Commit: e40fc7ec8f67207a5ff7cb7d58f927c7a3ea7084
Changeset: http://git.ntpsec.org/ntpsec/commit/?id=e40fc7ec8f67207a5ff7cb7d58f927c7a3ea7084
Author: Eric S. Raymond <esr at thyrsus.com>
Date: Sun Oct 4 20:28:15 2015 -0400
Poperly factor the sntp documentation.
---
devel-docs/TODO | 4 +-
docs/sntp-body.txt | 223 +++++++++++++++++++++++++++++++++++++++++++++++++++++
docs/sntp.txt | 149 +----------------------------------
sntp/sntp.txt | 220 +---------------------------------------------------
4 files changed, 230 insertions(+), 366 deletions(-)
diff --git a/devel-docs/TODO b/devel-docs/TODO
index 625b700..f743ab7 100644
--- a/devel-docs/TODO
+++ b/devel-docs/TODO
@@ -28,6 +28,9 @@ None right now. (Sep-22 2015)
=== Code ===
+* Clock stepping should use ANSI clock_settime() when possible, for
+ the additional precision.
+
* We should audit scripts/ and utils/ to see which of those programs
can be thrown out (some, like util/kern.c, don't even build). Some
(such as ntptrace) need to be translated into Python and supported.
@@ -91,7 +94,6 @@ is not yet tested anywhere but in ntpd itself.
| docs/ntp_conf.txt | ntpd/ntp.conf.txt
| docs/ntpdsim.txt | docs/ntpdsim_new.txt
| docs/ntpwait.txt | scripts/ntp-wait/ntp-wait.txt
-| docs/sntp.txt | sntp/sntp.txt
| docs/tickadj.txt | -
| - | ntpd/ntp.keys.txt
| - | scripts/calc_tickadj/calc_tickadj.txt
diff --git a/docs/sntp-body.txt b/docs/sntp-body.txt
new file mode 100644
index 0000000..82b3691
--- /dev/null
+++ b/docs/sntp-body.txt
@@ -0,0 +1,223 @@
+// This is the body of the manual page for ntpd.
+// It's included in two places: once for the docs/ HTML
+// tree, and once to make an individual man page.
+
+== SYNOPSIS ==
+
+*sntp*
+ [--help | -?] [-4 | -6] [-a keynum] [-b bcaddress] [-B bctimeout]
+ [-c] [-d] [-D debug-level] [-g delay] [-K kodfile] [-k keyfile]
+ [-l logfile] [-M steplimit] [-o ntpver] [-r] [-S] [-s]
+ [-u uctimeout] [--wait] [--version] [address...]`
+
+== DESCRIPTION ==
+
+`sntp` can be used as an SNTP client to query a NTP or SNTP server and
+either display the time or set the local system's time (given suitable
+privilege). It can be run as an interactive command or from a _cron_
+job. NTP (the Network Time Protocol) and SNTP (the Simple Network Time
+Protocol) are defined and described by RFC 5905.
+
+The default is to write the estimated correct local date and time (i.e.
+not UTC) to the standard output in a format like:
+
+-----------------------------------------------------
+1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs
+-----------------------------------------------------
+
+where the `(+0800)` means that to get to UTC from the reported local
+time one must add 8 hours and 0 minutes, the `4.567` indicates the
+local clock is 4.567 seconds behind the correct time (so 4.567 seconds
+must be added to the local clock to get it to be correct). Note that
+the number of decimals printed for this value will change based on the
+reported precision of the server.`+/- 0.089` is the reported
+_synchronization_ _distance_ (in seconds), which represents the
+maximum error due to all causes. If the server does not report valid
+data needed to calculate the synchronization distance, this will be
+reported as `+/- ?`.
+
+If the _host_ is different from the _IP_, both will be
+displayed. Otherwise, only the _IP_ is displayed. Finally, the
+_stratum_ of the host is reported and the leap indicator is decoded
+and displayed.
+
+= OPTIONS
+
+//`-?, --help`::
+// displays usage information. The short form typically requires shell
+// quoting, such as `-\?`, otherwise `?` is consumed by the shell.
+
+`-4`, `--ipv4`::
+ Force IPv4 DNS name resolution. This option must not appear in
+ combination with any of the following options: ipv6.
++
+Force DNS resolution of the following host names on the command line
+to the IPv4 namespace.
+
+`-6`, `--ipv6`::
+ Force IPv6 DNS name resolution. This option must not appear in
+ combination with any of the following options: ipv4.
++
+Force DNS resolution of the following host names on the command line
+to the IPv6 namespace.
+
+`-a` auth-keynumber, `--authentication`=_auth-keynumber_::
+ Enable authentication with the key _auth-keynumber_. This option takes
+ an integer number as its argument.
+ +
+Enable authentication using the key specified in this option's
+argument. The argument of this option is the _keyid_, a number
+specified in the _keyfile_ as this key's identifier. See the _keyfile_
+option (`-k`) for more details.
+
+`-b` broadcast-address, `--broadcast`=_broadcast-address_::
+ Listen to the address specified for broadcast time sync. This option
+ may appear an unlimited number of times.
++
+If specified `sntp` will listen to the specified address for NTP
+broadcasts. The default maximum wait time can (and probably should) be
+modified with `-t`.
+
+`-c` host-name, `--concurrent`=_host-name_::
+ Concurrently query all IPs returned for host-name. This option may
+ appear an unlimited number of times.
++
+Requests from an NTP "client" to a "server" should never be sent more
+rapidly than one every 2 seconds. By default, any IPs returned as part
+of a DNS lookup are assumed to be for a single instance of _ntpd_, and
+therefore `sntp` will send queries to these IPs one after another,
+with a 2-second gap in between each query.
++
+The `-c` or `--concurrent` flag says that any IPs returned for the DNS
+lookup of the supplied host-name are on different machines, so we can
+send concurrent queries. This is appropriate when using a server pool.
+
+`-d`, `--debug-level`::
+ Increase debug verbosity level. This option may appear an unlimited
+ number of times.
+
+`-D` number, `--set-debug-level`=_number_::
+ Set the debug verbosity level. This option may appear an unlimited
+ number of times. This option takes an integer number as its argument.
+
+`-g` milliseconds, `--gap`=_milliseconds_::
+ The gap (in milliseconds) between time requests. This option takes an
+ integer number as its argument. The default _milliseconds_ for this
+ option is 50.
++
+Since we're only going to use the first valid response we get and
+there is benefit to specifying a good number of servers to query,
+separate the queries we send out by the specified number of
+milliseconds. A larger _delay_ reduces the query load on the time
+sources, iat the cost of ncreasing the time to receive a valid
+response if the first source attempted is slow or unreachable.
+
+`-K` file-name, `--kod`=_file-name_::
+ KoD history filename. The default _file-name_ for this option is:
+ `/var/db/ntp-kod`.
++
+Specifies the filename to be used for the persistent history of KoD
+responses received from servers. If the file does not exist, a warning
+message will be displayed. The file will not be created.
+
+`-k` file-name, `--keyfile`=_file-name_::
+ Look in this file for the key specified with `-a`.
++
+This option specifies the keyfile. `sntp` will search for the key
+specified with `-a` keyno in this file. See _ntp.keys(5)_ for more
+information.
+
+`-l` file-name, `--logfile`=_file-name_::
+ Log to specified logfile.
++
+This option causes the client to write log messages to the specified
+_logfile_.
+
+`-M` number, `--steplimit`=_number_::
+ Adjustments less than _steplimit_ msec will be slewed. This option
+ takes an integer number as its argument. The value of _number_ is
+ constrained to being greater than or equal to 0,
++
+If the time adjustment is less than _steplimit_ milliseconds, slew the
+amount using _adjtime(2)_. Otherwise, step the correction using
+_clock_settime()_ or _settimeofday(2)_. The default value is 0, which
+means all adjustments will be stepped. This is a feature, as different
+situations demand different values.
+
+`-o` number, `--ntpversion`=_number_::
+ Send _int_ as our NTP protocol version. This option takes an integer
+ number as its argument. Defaults to 4. Seldom useful.
+
+`-r`, `--usereservedport`::
+ By default, `sntp` uses a UDP source port number selected by the
+ operating system. When this option is used, the reserved NTP port 123
+ is used, which most often requires `sntp` be invoked as the superuser
+ (commonly "root"). This can help identify connectivity failures due to
+ port-based firewalling which affect `ntpd`, which always uses source
+ port 123.
+
+`-S`, `--step`::
+ By default, `sntp` displays the clock offset but does not attempt to
+ correct it. This option enables offset correction by stepping, that
+ is, directly setting the clock to the corrected time. This typically
+ requires `sntp` be invoked as the superuser ("root").
+
+`-s`, `--slew`::
+ By default, `sntp` displays the clock offset but does not attempt to
+ correct it. This option enables offset correction by slewing using
+ adjtime(), which changes the rate of the clock for a period long
+ enough to accomplish the required offset (phase) correction. This
+ typically requires `sntp` be invoked as the superuser ("root").
+
+`-t` seconds, `--timeout`=_seconds_::
+ The number of seconds to wait for responses. This option takes an
+ integer number as its argument. The default _seconds_ for this option
+ is: 5.
++
+When waiting for a reply, `sntp` will wait the number of seconds
+specified before giving up. The default should be more than enough for
+a unicast response. If `sntp` is only waiting for a broadcast response
+a longer timeout is likely needed.
+
+`--wait`, `--no-wait`::
+ Wait for pending replies (if not setting the time). The _no-wait_ form
+ will disable the option. This option is enabled by default.
++
+If we are not setting the time, wait for all pending responses.
+
+`--version`::
+ Output version of program and exit.
+
+== USAGE ==
+
+`sntp ntpserver.somewhere`::
+ is the simplest use of this program and can be run as an unprivileged
+ command to check the current time and error in the local clock.
+`sntp -Ss -M 128 ntpserver.somewhere`::
+ With suitable privilege, run as a command or from a _cron_(8) job,
+ `sntp -Ss -M 128 ntpserver.somewhere` will request the time from the
+ server, and if that server reports that it is synchronized then if the
+ offset adjustment is less than 128 milliseconds the correction will be
+ slewed, and if the correction is more than 128 milliseconds the
+ correction will be stepped.
+`sntp -S ntpserver.somewhere`::
+ With suitable privilege, run as a command or from a _cron_(8) job,
+ `sntp -S ntpserver.somewhere` will set (step) the local clock from a
+ synchronized specified server, like the `ntpdate` utility from older
+ NTP implementations.
+
+== EXIT STATUS ==
+
+One of the following exit values will be returned:
+
+0 (EXIT_SUCCESS)::
+ Successful program execution.
+1 (EXIT_FAILURE)::
+ The operation failed or the command syntax was not valid.
+
+== AUTHORS ==
+
+Johannes Maximilian Kuehn, Harlan Stenn, Dave Hart.
+
+// end
+
diff --git a/docs/sntp.txt b/docs/sntp.txt
index 73887ac..af300b9 100644
--- a/docs/sntp.txt
+++ b/docs/sntp.txt
@@ -7,158 +7,11 @@
S is for snakeoil.
-Last update: 1-Apr-2015 11:05 UTC
|==============================
'''''
-== Synopsis ==
-
-`sntp [{--help -?}][{-4 -6}][-a keynum][-b bcaddress][-B bctimeout][-c][-d][-D debug-level][-g delay][-K kodfile][-k keyfile][-l logfile][-M steplimit][-o ntpver][-r][-S][-s][-u uctimeout][--wait][--version][address(es)]`
-
-== Description ==
-
-This program is a Simple Network Time Protocol (SNTP) client that can be
-used to query a Network Time Protocol (NTP) server and display the time
-offset of the system clock relative to the server clock. Run as root it
-can correct the system clock to this offset as well. It can be run as an
-interactive command or from a script by a `cron` job. The program
-implements the SNTP client protocol defined in RFC 5905, including the
-full on-wire protocol but does not provide the sanity checks, access
-controls, security functions and mitigation algorithms as in the full
-NTP version 4 specification, also defined in RFC 5905.
-
-By default, `sntp` writes the local date and time (i.e., not UTC) to the
-standard output in the format
-
-`2011-08-04 00:40:36.642222 (+0000) +0.006611 +/- 0.041061 psp-os1 149.20.68.26 s3 no-leap`
-
-where the `+0.006611 +/- 0.041061` indicates the time offset and error
-bound of the system clock relative to the server clock, in seconds. The
-hostname and/or the IP is displayed, as is the stratum of the server.
-Finally, the leap indicator status is displayed.
-
-If -b _bcaddress_ is not specified, the program sends a single message
-to each address and waits up to _uctimeout_ (default 5) seconds for a
-unicast server response. Otherwise, it sends no message and waits up to
-_bctimeout_ (default 68) seconds for a broadcast NTP message.
-
-== Options ==
-
-`sntp` recognizes the following options:
-
-`-?, --help`::
- displays usage information. The short form typically requires shell
- quoting, such as `-\?`, otherwise `?` is consumed by the shell.
-`-4, --ipv4`::
- When resolving hostnames to IP addresses, use IPv4 addresses only.
-`-6, --ipv6`::
- When resolving hostnames to IP addresses, use IPv6 addresses only.
-`-a` 'keynum', `--authentication` 'keynum'::
- Enable authentication with the key ID _keynum_. _keynum_ is a number
- specified in the keyfile along with an authentication secret (password
- or digest). See the `-k, --keyfile` option for more details.
-`-b 'bcaddress', `--broadcast bcaddress`::
- Listen for NTP packets sent to the broadcast or multicast address
- _bcaddress_, which can be a DNS name or IP address. The default
- maximum time to listen for broadcasts/multicasts, 68 seconds, can be
- modified with the `-B, --bctimeout` option.
-`-B` 'bctimeout', `--bctimeout` 'bctimeout'::
- Wait _bctimeout_ seconds for broadcast or multicast NTP message before
- terminating. The default is 68 seconds, chosen because ntpd typically
- transmits broadcasts/multicasts every 64 seconds. Note that the short
- option is `-B`, an uppercase letter B.
-`-c, --concurrent`::
- Concurrently query all addresses returned for hostname. Requests from
- an NTP client to a single server should never be sent more often than
- once every two seconds. By default, all addresses resolved from a
- single hostname are assumed to be for a single instance of ntpd, and
- therefore sntp will send queries to these addresses one after another,
- waiting two seconds between queries. This option indicates multiple
- addresses returned for a hostname are on different machines, so sntp
- can send concurrent queries. This is appropriate when using
- *.pool.ntp.org, for example.
-`-d, --debug-level`::
- Increase debug verbosity level by one. May be specified multiple
- times. See also the `-D, --set-debug-level` option.
-`-D` 'debug-level', `--set-debug-level` 'debug-level'::
- Set the debug verbosity level to _debug-level_. The default level is
- zero. Note that the short option is `-D`, an uppercase letter D. See
- also the `-d, --debug-level` option.
-`-g` 'delay', `--gap delay`::
- Specify the _delay_ in milliseconds between outgoing queries,
- defaulting to 50. `sntp` sends queries to all provided
- hostnames/addresses in short succession, and by default terminates
- once the first valid response is received. With multiple time sources
- provided, all but one will not be used. To limit the number of queries
- whose responses will not be used, each query is separated from the
- preceding one by _delay_ milliseconds, to allow time for responses to
- earlier queries to be received. A larger _delay_ reduces the query
- load on the time sources, increasing the time to receive a valid
- response if the first source attempted is slow or unreachable.
-`-K` 'kodfile', `--kod` 'kodfile'::
- Specifies the filename _kodfile_ to be used for the persistent history
- of KoD (Kiss Of Death, or rate-limiting) responses received from
- servers. The default is `/var/db/ntp-kod`. If the file does not exist,
- a warning message will be displayed. The file will not be created.
- Note that the short option is `-K`, an uppercase letter K.
-`-k` 'keyfile', `--keyfile` 'keyfile'::
- Specifies the filename _keyfile_ used with the `-a`/`--authentication`
- option. The format of the file is described on the
- link:keygen.html[`ntp-keygen` page].
-`-l` 'logfile', `--filelog` 'logfile'::
- Specifies the filename in which to append a copy of status messages,
- which also appear on the terminal.
-`-M` 'steplimit', `--steplimit` 'steplimit'::
- If both `-S`/`--step` and `-s`/`--slew` options are provided, an
- offset of less than _steplimit_ milliseconds will be corrected by
- slewing the clock using adjtime(), while an offset of _steplimit_ or
- more will be corrected by setting the clock to the corrected time.
- Note that the short option is `-M`, an uppercase letter M.
-`-o` 'ntpver', `--ntpversion` 'ntpver'::
- Specifies the NTP protocol version number _ntpver_ to include in
- requests, default 4. This option is rarely useful.
-`-r, --usereservedport`::
- By default, `sntp` uses a UDP source port number selected by the
- operating system. When this option is used, the reserved NTP port 123
- is used, which most often requires `sntp` be invoked as the superuser
- (commonly "root"). This can help identify connectivity failures due to
- port-based firewalling which affect `ntpd`, which always uses source
- port 123.
-`-S, --step`::
- By default, `sntp` displays the clock offset but does not attempt to
- correct it. This option enables offset correction by stepping, that
- is, directly setting the clock to the corrected time. This typically
- requires `sntp` be invoked as the superuser ("root"). Note that the
- short option is `-S`, an uppercase letter S.
-`-s, --slew`::
- By default, `sntp` displays the clock offset but does not attempt to
- correct it. This option enables offset correction by slewing using
- adjtime(), which changes the rate of the clock for a period long
- enough to accomplish the required offset (phase) correction. This
- typically requires `sntp` be invoked as the superuser ("root").
-`-u` 'uctimeout', `--uctimeout` 'uctimeout'::
- Specifies the maximum time _uctimeout_ in seconds to wait for a
- unicast response before terminating.
-`--wait`::
- When neither `-S`/`--step` nor `-s`/`--slew` options are provided,
- `sntp` will by default terminate after the first valid response is
- received. This option causes `sntp` to instead wait for all pending
- queries' responses.
-`--version`::
- Display the `sntp` program's version number and the date and time it
- was compiled.
-
-== Return Value ==
-
-The program returns an exit status of zero for if a valid response is
-received and non-zero otherwise.
-
-== Author ==
-
-This `sntp` was originally developed by Johannes Maximilian Kuehn.
-Harlan Stenn and Dave Hart modified it to query more than one server at
-a time.
+include::sntp-body.txt[]
'''''
diff --git a/sntp/sntp.txt b/sntp/sntp.txt
index 902538d..a35e80f 100644
--- a/sntp/sntp.txt
+++ b/sntp/sntp.txt
@@ -1,208 +1,10 @@
-= ntpd(1) =
+= sntp(1) =
:doctype: manpage
+
== NAME ==
sntp - standard Simple Network Time Protocol client program
-== SYNOPSIS ==
-sntp [-flag [value]]... [--opt-name [[=| ]value]]... [ hostname-or-IP ...]
-== DESCRIPTION ==
-
-`sntp` can be used as an SNTP client to query a NTP or SNTP server and
-either display the time or set the local system's time (given suitable
-privilege). It can be run as an interactive command or from a _cron_
-job. NTP (the Network Time Protocol) and SNTP (the Simple Network Time
-Protocol) are defined and described by RFC 5905.
-
-The default is to write the estimated correct local date and time (i.e.
-not UTC) to the standard output in a format like:
-'1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs' where the
-_'(+0800)'_ means that to get to UTC from the reported local time one
-must add 8 hours and 0 minutes, the _'+4.567'_ indicates the local clock
-is 4.567 seconds behind the correct time (so 4.567 seconds must be added
-to the local clock to get it to be correct). Note that the number of
-decimals printed for this value will change based on the reported
-precision of the server. _'+/- 0.089'_ is the reported _synchronization_
-_distance_ (in seconds), which represents the maximum error due to all
-causes. If the server does not report valid data needed to calculate the
-synchronization distance, this will be reported as _'+/- ?'_. If the
-_host_ is different from the _IP_, both will be displayed. Otherwise,
-only the _IP_ is displayed. Finally, the _stratum_ of the host is
-reported and the leap indicator is decoded and displayed.
-
-= OPTIONS
-
-`-4`, `--ipv4`::
- Force IPv4 DNS name resolution. This option must not appear in
- combination with any of the following options: ipv6.
-+
-Force DNS resolution of the following host names on the command line
-to the IPv4 namespace.
-
-`-6`, `--ipv6`::
- Force IPv6 DNS name resolution. This option must not appear in
- combination with any of the following options: ipv4.
-+
-Force DNS resolution of the following host names on the command line
-to the IPv6 namespace.
-
-`-a` auth-keynumber, `--authentication`=_auth-keynumber_::
- Enable authentication with the key _auth-keynumber_. This option takes
- an integer number as its argument.
- +
-Enable authentication using the key specified in this option's
-argument. The argument of this option is the _keyid_, a number
-specified in the _keyfile_ as this key's identifier. See the _keyfile_
-option (`-k`) for more details.
-
-`-b` broadcast-address, `--broadcast`=_broadcast-address_::
- Listen to the address specified for broadcast time sync. This option
- may appear an unlimited number of times.
-+
-If specified `sntp` will listen to the specified address for NTP
-broadcasts. The default maximum wait time can (and probably should) be
-modified with `-t`.
-
-`-c` host-name, `--concurrent`=_host-name_::
- Concurrently query all IPs returned for host-name. This option may
- appear an unlimited number of times.
-+
-Requests from an NTP "client" to a "server" should never be sent more
-rapidly than one every 2 seconds. By default, any IPs returned as part
-of a DNS lookup are assumed to be for a single instance of _ntpd_, and
-therefore `sntp` will send queries to these IPs one after another,
-with a 2-second gap in between each query.
-+
-The `-c` or `--concurrent` flag says that any IPs returned for the DNS
-lookup of the supplied host-name are on different machines, so we can
-send concurrent queries.
-
-`-d`, `--debug-level`::
- Increase debug verbosity level. This option may appear an unlimited
- number of times.
-
-`-D` number, `--set-debug-level`=_number_::
- Set the debug verbosity level. This option may appear an unlimited
- number of times. This option takes an integer number as its argument.
-
-`-g` milliseconds, `--gap`=_milliseconds_::
- The gap (in milliseconds) between time requests. This option takes an
- integer number as its argument. The default _milliseconds_ for this
- option is:
-+
-__
-50
-__
-+
-Since we're only going to use the first valid response we get and
-there is benefit to specifying a good number of servers to query,
-separate the queries we send out by the specified number of
-milliseconds.
-
-`-K` file-name, `--kod`=_file-name_::
- KoD history filename. The default _file-name_ for this option is:
-+
-_______________
-/var/db/ntp-kod
-_______________
-+
-Specifies the filename to be used for the persistent history of KoD
-responses received from servers. If the file does not exist, a warning
-message will be displayed. The file will not be created.
-
-`-k` file-name, `--keyfile`=_file-name_::
- Look in this file for the key specified with `-a`.
-+
-This option specifies the keyfile. `sntp` will search for the key
-specified with `-a` keyno in this file. See _ntp.keys(5)_ for more
-information.
-
-`-l` file-name, `--logfile`=_file-name_::
- Log to specified logfile.
-+
-This option causes the client to write log messages to the specified
-_logfile_.
-
-`-M` number, `--steplimit`=_number_::
- Adjustments less than _steplimit_ msec will be slewed. This option
- takes an integer number as its argument. The value of _number_ is
- constrained to being:
-+
---------------------------
-greater than or equal to 0
---------------------------
-+
-If the time adjustment is less than _steplimit_ milliseconds, slew the
-amount using _adjtime(2)_. Otherwise, step the correction using
-_settimeofday(2)_. The default value is 0, which means all adjustments
-will be stepped. This is a feature, as different situations demand
-different values.
-
-`-o` number, `--ntpversion`=_number_::
- Send _int_ as our NTP protocol version. This option takes an integer
- number as its argument. The value of _number_ is constrained to being:
-+
--------------------------
-
-in the range 0 through 7
--------------------------
-+
-The default _number_ for this option is:
-+
-_
-4
-_
-+
-When sending requests to a remote server, tell them we are running NTP
-protocol version _ntpversion_ .
-
-`-r`, `--usereservedport`::
- Use the NTP Reserved Port (port 123).
-+
-Use port 123, which is reserved for NTP, for our network
-communications.
-
-`-S`, `--step`::
- OK to 'step' the time with _settimeofday(2)_.
-
-`-s`, `--slew`::
- OK to 'slew' the time with _adjtime(2)_.
-
-`-t` seconds, `--timeout`=_seconds_::
- The number of seconds to wait for responses. This option takes an
- integer number as its argument. The default _seconds_ for this option
- is: 5.
-+
-When waiting for a reply, `sntp` will wait the number of seconds
-specified before giving up. The default should be more than enough for
-a unicast response. If `sntp` is only waiting for a broadcast response
-a longer timeout is likely needed.
-
-`--wait`, `- Fl -no-wait`::
- Wait for pending replies (if not setting the time). The _no-wait_ form
- will disable the option. This option is enabled by default.
-+
-If we are not setting the time, wait for all pending responses.
-
-`--version`::
- Output version of program and exit.
-
-== USAGE ==
-
-_sntp ntpserver.somewhere_::
- is the simplest use of this program and can be run as an unprivileged
- command to check the current time and error in the local clock.
-_sntp -Ss -M 128 ntpserver.somewhere_::
- With suitable privilege, run as a command or from a _cron_(8) job,
- `sntp -Ss -M 128 ntpserver.somewhere` will request the time from the
- server, and if that server reports that it is synchronized then if the
- offset adjustment is less than 128 milliseconds the correction will be
- slewed, and if the correction is more than 128 milliseconds the
- correction will be stepped.
-_sntp -S ntpserver.somewhere_::
- With suitable privilege, run as a command or from a _cron_(8) job,
- `sntp -S ntpserver.somewhere` will set (step) the local clock from a
- synchronized specified server, like the (deprecated)
- _ntpdate_(@NTPDATE_MS@), or _rdate_(8) commands.
+ at ../docs/sntp-body.txt@
== EXIT STATUS ==
@@ -213,21 +15,5 @@ One of the following exit values will be returned:
1 (EXIT_FAILURE)::
The operation failed or the command syntax was not valid.
-== AUTHORS ==
-
-"Johannes Maximilian Kuehn" "Harlan Stenn" "Dave Hart"
-
-== COPYRIGHT ==
-
-//FIXME: ntp.org reference
-Copyright (C) 1992-2015 The University of Delaware and Network Time
-Foundation all rights reserved. This program is released under the terms
-of the NTP license, <http://ntp.org/license>.
-
-== BUGS ==
-
-//FIXME: ntp.org reference
-Please send bug reports to: http://bugs.ntp.org, bugs at ntp.org
-
// end
More information about the vc
mailing list