+* sntp documentation cleanup.
(4.2.7p331) 2012/12/03 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 2114] Correctly calculate sntp's synch distance.
(4.2.7p330) 2012/12/03 Released by Harlan Stenn <stenn@ntp.org>
#
# EDIT THIS FILE WITH CAUTION (invoke-sntp.texi)
#
-# It has been AutoGen-ed December 3, 2012 at 11:43:13 AM by AutoGen 5.16.2
+# It has been AutoGen-ed December 6, 2012 at 02:11:56 AM by AutoGen 5.16.2
# From the definitions sntp-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
are defined and described by RFC 5905.
-.PP
+
The default is to write the estimated correct local date and time (i.e. not
UTC) to the standard output in a format like:
* sntp exit status:: exit status
* sntp Usage:: Usage
* sntp Authors:: Authors
-* sntp Bugs:: Bugs
+* sntp Notes:: Notes
@end menu
@node sntp usage
-M Num steplimit Adjustments less than steplimit msec will be slewed
- It must be in the range:
greater than or equal to 0
- -o Num ntpversion Send int as our NTP version
+ -o Num ntpversion Send int as our NTP protocol version
- It must be in the range:
0 to 7
-r no usereservedport Use the NTP Reserved Port (port 123)
This is the ``enable authentication with the key @var{auth-keynumber}'' option.
This option takes an argument number @file{auth-keynumber}.
-This option enables 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 (@option{-k}) for more details.
+Enable authentication using the key specified in this option's
+argument. The argument of this option is the @option{keyid}, a
+number specified in the @option{keyfile} as this key's identifier.
+See the @option{keyfile} option (@option{-k}) for more details.
@node sntp broadcast
@subsection broadcast option (-b)
@cindex sntp-broadcast
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 @code{sntp} will send queries to these IPs one
-after another, with a 2-second gap in between each query.
+@code{ntpd}, and therefore @code{sntp} will send queries to these IPs
+one after another, with a 2-second gap in between each query.
The @option{-c} or @option{--concurrent} flag says that any IPs
returned for the DNS lookup of the supplied host-name are on
This option takes an argument file @file{file-name}.
This option specifies the keyfile.
@code{sntp} will search for the key specified with @option{-a}
-@file{keyno} in this file. Key files follow the following format:
-
-@file{keyid keytype key}
-
-Where @file{keyid} is a number identifying this key
-@file{keytype} is one of the following:
-@code{S} Key is a 64 Bit hexadecimal number as specified in in the DES specification.
-@code{N} Key is a 64 Bit hexadecimal number as specified in the NTP standard.
-@code{A} Key is a 1-to-8 character ASCII string.
-@code{M} Key is a 1-to-8 character ASCII string using the MD5 authentication scheme.
-
-For more information see @command{ntp.keys(5)}.
+@file{keyno} in this file. See @command{ntp.keys(5)} for more
+information.
@node sntp logfile
@subsection logfile option (-l)
@cindex sntp-logfile
@subsection ntpversion option (-o)
@cindex sntp-ntpversion
-This is the ``send @var{int} as our ntp version'' option.
+This is the ``send @var{int} as our ntp protocol version'' option.
This option takes an argument number.
When sending requests to a remote server, tell them we are running
NTP protocol version @file{ntpversion} .
.An
"Dave
Hart"
-@node sntp Bugs
-@subsection sntp Bugs
-Please report bugs to http://bugs.ntp.org .
+@node sntp Notes
+@subsection sntp Notes
+This document corresponds to version @VERSION@ of
+@code{sntp}.
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.c)
*
- * It has been AutoGen-ed December 3, 2012 at 11:37:03 AM by AutoGen 5.16.2
+ * It has been AutoGen-ed December 6, 2012 at 02:11:18 AM by AutoGen 5.16.2
* From the definitions sntp-opts.def
* and the template file options
*
/*
* sntp option static const strings
*/
-static char const sntp_opt_strs[2491] =
+static char const sntp_opt_strs[2500] =
/* 0 */ "sntp 4.2.7p331\n"
"Copyright (C) 1970-2012 The University of Delaware, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
/* 1587 */ "Adjustments less than steplimit msec will be slewed\0"
/* 1639 */ "STEPLIMIT\0"
/* 1649 */ "steplimit\0"
-/* 1659 */ "Send int as our NTP version\0"
-/* 1687 */ "NTPVERSION\0"
-/* 1698 */ "ntpversion\0"
-/* 1709 */ "Use the NTP Reserved Port (port 123)\0"
-/* 1746 */ "USERESERVEDPORT\0"
-/* 1762 */ "usereservedport\0"
-/* 1778 */ "OK to 'step' the time with settimeofday(2)\0"
-/* 1821 */ "STEP\0"
-/* 1826 */ "step\0"
-/* 1831 */ "OK to 'slew' the time with adjtime(2)\0"
-/* 1869 */ "SLEW\0"
-/* 1874 */ "slew\0"
-/* 1879 */ "The number of seconds to wait for responses\0"
-/* 1923 */ "TIMEOUT\0"
-/* 1931 */ "timeout\0"
-/* 1939 */ "Wait for pending replies (if not setting the time)\0"
-/* 1990 */ "WAIT\0"
-/* 1995 */ "no-wait\0"
-/* 2003 */ "no\0"
-/* 2006 */ "Display extended usage information and exit\0"
-/* 2050 */ "help\0"
-/* 2055 */ "Extended usage information passed thru pager\0"
-/* 2100 */ "more-help\0"
-/* 2110 */ "Output version information and exit\0"
-/* 2146 */ "version\0"
-/* 2154 */ "Save the option state to a config file\0"
-/* 2193 */ "save-opts\0"
-/* 2203 */ "Load options from a config file\0"
-/* 2235 */ "LOAD_OPTS\0"
-/* 2245 */ "no-load-opts\0"
-/* 2258 */ "SNTP\0"
-/* 2263 */ "sntp - standard Simple Network Time Protocol client program - Ver. 4.2.7p331\n"
+/* 1659 */ "Send int as our NTP protocol version\0"
+/* 1696 */ "NTPVERSION\0"
+/* 1707 */ "ntpversion\0"
+/* 1718 */ "Use the NTP Reserved Port (port 123)\0"
+/* 1755 */ "USERESERVEDPORT\0"
+/* 1771 */ "usereservedport\0"
+/* 1787 */ "OK to 'step' the time with settimeofday(2)\0"
+/* 1830 */ "STEP\0"
+/* 1835 */ "step\0"
+/* 1840 */ "OK to 'slew' the time with adjtime(2)\0"
+/* 1878 */ "SLEW\0"
+/* 1883 */ "slew\0"
+/* 1888 */ "The number of seconds to wait for responses\0"
+/* 1932 */ "TIMEOUT\0"
+/* 1940 */ "timeout\0"
+/* 1948 */ "Wait for pending replies (if not setting the time)\0"
+/* 1999 */ "WAIT\0"
+/* 2004 */ "no-wait\0"
+/* 2012 */ "no\0"
+/* 2015 */ "Display extended usage information and exit\0"
+/* 2059 */ "help\0"
+/* 2064 */ "Extended usage information passed thru pager\0"
+/* 2109 */ "more-help\0"
+/* 2119 */ "Output version information and exit\0"
+/* 2155 */ "version\0"
+/* 2163 */ "Save the option state to a config file\0"
+/* 2202 */ "save-opts\0"
+/* 2212 */ "Load options from a config file\0"
+/* 2244 */ "LOAD_OPTS\0"
+/* 2254 */ "no-load-opts\0"
+/* 2267 */ "SNTP\0"
+/* 2272 */ "sntp - standard Simple Network Time Protocol client program - Ver. 4.2.7p331\n"
"USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
"\t\t[ hostname-or-IP ...]\n\0"
-/* 2424 */ "$HOME\0"
-/* 2430 */ ".\0"
-/* 2432 */ ".ntprc\0"
-/* 2439 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 2473 */ "\n\n\0"
-/* 2476 */ "sntp 4.2.7p331";
+/* 2433 */ "$HOME\0"
+/* 2439 */ ".\0"
+/* 2441 */ ".ntprc\0"
+/* 2448 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 2482 */ "\n\n\0"
+/* 2485 */ "sntp 4.2.7p331";
/*
* ipv4 option description with
* ntpversion option description:
*/
#define NTPVERSION_DESC (sntp_opt_strs+1659)
-#define NTPVERSION_NAME (sntp_opt_strs+1687)
-#define NTPVERSION_name (sntp_opt_strs+1698)
+#define NTPVERSION_NAME (sntp_opt_strs+1696)
+#define NTPVERSION_name (sntp_opt_strs+1707)
#define NTPVERSION_DFT_ARG ((char const*)4)
#define NTPVERSION_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
/*
* usereservedport option description:
*/
-#define USERESERVEDPORT_DESC (sntp_opt_strs+1709)
-#define USERESERVEDPORT_NAME (sntp_opt_strs+1746)
-#define USERESERVEDPORT_name (sntp_opt_strs+1762)
+#define USERESERVEDPORT_DESC (sntp_opt_strs+1718)
+#define USERESERVEDPORT_NAME (sntp_opt_strs+1755)
+#define USERESERVEDPORT_name (sntp_opt_strs+1771)
#define USERESERVEDPORT_FLAGS (OPTST_DISABLED)
/*
* step option description:
*/
-#define STEP_DESC (sntp_opt_strs+1778)
-#define STEP_NAME (sntp_opt_strs+1821)
-#define STEP_name (sntp_opt_strs+1826)
+#define STEP_DESC (sntp_opt_strs+1787)
+#define STEP_NAME (sntp_opt_strs+1830)
+#define STEP_name (sntp_opt_strs+1835)
#define STEP_FLAGS (OPTST_DISABLED)
/*
* slew option description:
*/
-#define SLEW_DESC (sntp_opt_strs+1831)
-#define SLEW_NAME (sntp_opt_strs+1869)
-#define SLEW_name (sntp_opt_strs+1874)
+#define SLEW_DESC (sntp_opt_strs+1840)
+#define SLEW_NAME (sntp_opt_strs+1878)
+#define SLEW_name (sntp_opt_strs+1883)
#define SLEW_FLAGS (OPTST_DISABLED)
/*
* timeout option description:
*/
-#define TIMEOUT_DESC (sntp_opt_strs+1879)
-#define TIMEOUT_NAME (sntp_opt_strs+1923)
-#define TIMEOUT_name (sntp_opt_strs+1931)
+#define TIMEOUT_DESC (sntp_opt_strs+1888)
+#define TIMEOUT_NAME (sntp_opt_strs+1932)
+#define TIMEOUT_name (sntp_opt_strs+1940)
#define TIMEOUT_DFT_ARG ((char const*)5)
#define TIMEOUT_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
/*
* wait option description:
*/
-#define WAIT_DESC (sntp_opt_strs+1939)
-#define WAIT_NAME (sntp_opt_strs+1990)
-#define NOT_WAIT_name (sntp_opt_strs+1995)
-#define NOT_WAIT_PFX (sntp_opt_strs+2003)
+#define WAIT_DESC (sntp_opt_strs+1948)
+#define WAIT_NAME (sntp_opt_strs+1999)
+#define NOT_WAIT_name (sntp_opt_strs+2004)
+#define NOT_WAIT_PFX (sntp_opt_strs+2012)
#define WAIT_name (NOT_WAIT_name + 3)
#define WAIT_FLAGS (OPTST_INITENABLED)
/*
* Help/More_Help/Version option descriptions:
*/
-#define HELP_DESC (sntp_opt_strs+2006)
-#define HELP_name (sntp_opt_strs+2050)
+#define HELP_DESC (sntp_opt_strs+2015)
+#define HELP_name (sntp_opt_strs+2059)
#ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC (sntp_opt_strs+2055)
-#define MORE_HELP_name (sntp_opt_strs+2100)
+#define MORE_HELP_DESC (sntp_opt_strs+2064)
+#define MORE_HELP_name (sntp_opt_strs+2109)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC NULL
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-#define VER_DESC (sntp_opt_strs+2110)
-#define VER_name (sntp_opt_strs+2146)
-#define SAVE_OPTS_DESC (sntp_opt_strs+2154)
-#define SAVE_OPTS_name (sntp_opt_strs+2193)
-#define LOAD_OPTS_DESC (sntp_opt_strs+2203)
-#define LOAD_OPTS_NAME (sntp_opt_strs+2235)
-#define NO_LOAD_OPTS_name (sntp_opt_strs+2245)
-#define LOAD_OPTS_pfx (sntp_opt_strs+2003)
+#define VER_DESC (sntp_opt_strs+2119)
+#define VER_name (sntp_opt_strs+2155)
+#define SAVE_OPTS_DESC (sntp_opt_strs+2163)
+#define SAVE_OPTS_name (sntp_opt_strs+2202)
+#define LOAD_OPTS_DESC (sntp_opt_strs+2212)
+#define LOAD_OPTS_NAME (sntp_opt_strs+2244)
+#define NO_LOAD_OPTS_name (sntp_opt_strs+2254)
+#define LOAD_OPTS_pfx (sntp_opt_strs+2012)
#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
/*
* Declare option callback procedures
*
* Define the sntp Option Environment
*/
-#define zPROGNAME (sntp_opt_strs+2258)
-#define zUsageTitle (sntp_opt_strs+2263)
-#define zRcName (sntp_opt_strs+2432)
+#define zPROGNAME (sntp_opt_strs+2267)
+#define zUsageTitle (sntp_opt_strs+2272)
+#define zRcName (sntp_opt_strs+2441)
static char const * const apzHomeList[3] = {
- sntp_opt_strs+2424,
- sntp_opt_strs+2430,
+ sntp_opt_strs+2433,
+ sntp_opt_strs+2439,
NULL };
-#define zBugsAddr (sntp_opt_strs+2439)
-#define zExplain (sntp_opt_strs+2473)
+#define zBugsAddr (sntp_opt_strs+2448)
+#define zExplain (sntp_opt_strs+2482)
#define zDetail (NULL)
-#define zFullVersion (sntp_opt_strs+2476)
+#define zFullVersion (sntp_opt_strs+2485)
/* extracted from optcode.tlib near line 350 */
#if defined(ENABLE_NLS)
arg-type = number;
arg-name = "auth-keynumber";
doc = <<- _EndOfDoc_
- This option enables 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 (@option{-k}) for more details.
+ Enable authentication using the key specified in this option's
+ argument. The argument of this option is the @option{keyid}, a
+ number specified in the @option{keyfile} as this key's identifier.
+ See the @option{keyfile} option (@option{-k}) for more details.
_EndOfDoc_;
};
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 @code{sntp} will send queries to these IPs one
- after another, with a 2-second gap in between each query.
+ @code{ntpd}, and therefore @code{sntp} will send queries to these IPs
+ one after another, with a 2-second gap in between each query.
The @option{-c} or @option{--concurrent} flag says that any IPs
returned for the DNS lookup of the supplied host-name are on
doc = <<- _EndOfDoc_
This option specifies the keyfile.
@code{sntp} will search for the key specified with @option{-a}
- @file{keyno} in this file. Key files follow the following format:
-
- @file{keyid keytype key}
-
- Where @file{keyid} is a number identifying this key
- @file{keytype} is one of the following:
- @code{S} Key is a 64 Bit hexadecimal number as specified in in the DES specification.
- @code{N} Key is a 64 Bit hexadecimal number as specified in the NTP standard.
- @code{A} Key is a 1-to-8 character ASCII string.
- @code{M} Key is a 1-to-8 character ASCII string using the MD5 authentication scheme.
-
- For more information see @command{ntp.keys(5)}.
+ @file{keyno} in this file. See @command{ntp.keys(5)} for more
+ information.
_EndOfDoc_;
};
flag = {
name = ntpversion;
value = o;
- descrip = "Send @var{int} as our NTP version";
+ descrip = "Send @var{int} as our NTP protocol version";
arg-type = number;
arg-default = 4;
arg-range = "0->7";
NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
are defined and described by RFC 5905.
-.PP
+.Pp
The default is to write the estimated correct local date and time (i.e. not
UTC) to the standard output in a format like:
};
doc-section = {
- ds-type = 'BUGS';
+ ds-type = 'NOTES';
ds-format = 'mdoc';
- ds-text = <<- _END_MDOC_BUGS
-Please report bugs to http://bugs.ntp.org .
- _END_MDOC_BUGS;
+ ds-text = <<- _END_MDOC_NOTES
+This document corresponds to version @VERSION@ of
+.Nm .
+ _END_MDOC_NOTES;
};
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.h)
*
- * It has been AutoGen-ed December 3, 2012 at 11:37:02 AM by AutoGen 5.16.2
+ * It has been AutoGen-ed December 6, 2012 at 02:11:18 AM by AutoGen 5.16.2
* From the definitions sntp-opts.def
* and the template file options
*
-.TH sntp 1sntpman "03 Dec 2012" "4.2.7p331" "User Commands"
+.TH sntp 1sntpman "06 Dec 2012" "4.2.7p331" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (sntp-opts.man)
.\"
-.\" It has been AutoGen-ed December 3, 2012 at 11:43:09 AM by AutoGen 5.16.2
+.\" It has been AutoGen-ed December 6, 2012 at 02:11:59 AM by AutoGen 5.16.2
.\" From the definitions sntp-opts.def
.\" and the template file agman-cmd.tpl
.\"
.RB [ \-\fIflag\fP " [\fIvalue\fP]]... [" \-\-\fIopt\-name\fP " [[=| ]\fIvalue\fP]]..." [ hostname-or-IP ...]
.PP
.SH DESCRIPTION
+.B
+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
+.Ic cron
+job.
+NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
+are defined and described by RFC 5905.
+.PP
+The default is to write the estimated correct local date and time (i.e. not
+UTC) to the standard output in a format like:
+.Ic "'1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 [host] IP sN'"
+where the
+.Ic "'(+0800)'"
+means that to get to UTC from the reported local time one must
+add 8 hours and 0 minutes,
+the
+.Ic "'+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.
+.Ic "'+/- 0.089'"
+is the reported
+.I 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
+.Ic "'+/- ?'" .
+If the
+.I host
+is different from the
+.I IP ,
+both will be displayed.
+Otherwise, only the
+.I IP
+is displayed.
+Finally, the
+.I stratum
+of the host is reported.
.SH "OPTIONS"
.TP
.BR \-4 ", " -\-ipv4
Enable authentication with the key \fBauth-keynumber\fP.
This option takes an integer number as its argument.
.sp
-This option enables 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 (\fB-k\fP) for more details.
+Enable authentication using the key specified in this option's
+argument. The argument of this option is the \fBkeyid\fP, a
+number specified in the \fBkeyfile\fP as this key's identifier.
+See the \fBkeyfile\fP option (\fB-k\fP) for more details.
.TP
.BR \-b " \fIbroadcast\-address\fP, " \-\-broadcast "=" \fIbroadcast\-address\fP
Listen to the address specified for broadcast time sync.
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 \fBsntp\fP will send queries to these IPs one
-after another, with a 2-second gap in between each query.
+\fBntpd\fP, and therefore \fBsntp\fP will send queries to these IPs
+one after another, with a 2-second gap in between each query.
The \fB-c\fP or \fB--concurrent\fP 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.
.sp
This option specifies the keyfile.
\fBsntp\fP will search for the key specified with \fB-a\fP
-\fIkeyno\fP in this file. Key files follow the following format:
-\fIkeyid keytype key\fP
-Where \fIkeyid\fP is a number identifying this key
-\fIkeytype\fP is one of the following:
-\fBS\fP Key is a 64 Bit hexadecimal number as specified in in the DES specification.
-\fBN\fP Key is a 64 Bit hexadecimal number as specified in the NTP standard.
-\fBA\fP Key is a 1-to-8 character ASCII string.
-\fBM\fP Key is a 1-to-8 character ASCII string using the MD5 authentication scheme.
-For more information see \fBntp.keys(5)\fP.
+\fIkeyno\fP in this file. See \fBntp.keys(5)\fP for more
+information.
.TP
.BR \-l " \fIfile\-name\fP, " \-\-logfile "=" \fIfile\-name\fP
Log to specified logfile.
correction using \fBsettimeofday(2)\fP.
.TP
.BR \-o " \fInumber\fP, " \-\-ntpversion "=" \fInumber\fP
-Send \fBint\fP as our NTP version.
+Send \fBint\fP as our NTP protocol version.
This option takes an integer number as its argument.
The value of \fInumber\fP is constrained to being:
.in +4
If any of these are directories, then the file \fI.ntprc\fP
is searched for within those directories.
.SH USAGE
+.TP
+.BR Li "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.
+.TP
+.BR Li "sntp -a ntpserver.somewhere"
+With suitable privilege,
+run as a command
+or from a
+.Xr cron 8
+job,
+.Ic "sntp -a"
+will reset the local clock from a synchronized specified server,
+like the (deprecated)
+.Xr ntpdate 1ntpdatemdoc ,
+or
+.Xr rdate 8
+commands.
.SH "ENVIRONMENT"
See \fBOPTION PRESETS\fP for configuration environment variables.
.SH "FILES"
libopts had an internal operational error. Please report
it to autogen-users@lists.sourceforge.net. Thank you.
.SH AUTHORS
+.An "Johannes Maximilian Kuehn"
+.An "Harlan Stenn"
+.An "Dave Hart"
.SH "COPYRIGHT"
Copyright (C) 1970-2012 The University of Delaware all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
-.SH BUGS
+.SH "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
-.SH "NOTES"
+.SH NOTES
+This document corresponds to version @VERSION@ of
+.B .
+.PP
This manual page was \fIAutoGen\fP-erated from the \fBsntp\fP
option definitions.
-.Dd December 3 2012
+.Dd December 6 2012
.Dt SNTP 1sntpmdoc User Commands
-.Os SunOS 5.10
+.Os FreeBSD 6.4-STABLE
.\" EDIT THIS FILE WITH CAUTION (sntp-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 3, 2012 at 11:43:15 AM by AutoGen 5.16.2
+.\" It has been AutoGen-ed December 6, 2012 at 02:11:47 AM by AutoGen 5.16.2
.\" From the definitions sntp-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
[ hostname-or-IP ...]
.Pp
.Sh DESCRIPTION
+.Nm
+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
+.Ic cron
+job.
+NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
+are defined and described by RFC 5905.
+.Pp
+The default is to write the estimated correct local date and time (i.e. not
+UTC) to the standard output in a format like:
+.Ic "'1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 [host] IP sN'"
+where the
+.Ic "'(+0800)'"
+means that to get to UTC from the reported local time one must
+add 8 hours and 0 minutes,
+the
+.Ic "'+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.
+.Ic "'+/- 0.089'"
+is the reported
+.Em 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
+.Ic "'+/- ?'" .
+If the
+.Em host
+is different from the
+.Em IP ,
+both will be displayed.
+Otherwise, only the
+.Em IP
+is displayed.
+Finally, the
+.Em stratum
+of the host is reported.
.Sh "OPTIONS"
.Bl -tag
.It \-4 ", " -\-ipv4
Enable authentication with the key \fBauth\-keynumber\fP.
This option takes an integer number as its argument.
.sp
-This option enables 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 (\fB\-k\fP) for more details.
+Enable authentication using the key specified in this option's
+argument. The argument of this option is the \fBkeyid\fP, a
+number specified in the \fBkeyfile\fP as this key's identifier.
+See the \fBkeyfile\fP option (\fB\-k\fP) for more details.
.It \-b " \fIbroadcast\-address\fP, " \-\-broadcast "=" \fIbroadcast\-address\fP
Listen to the address specified for broadcast time sync.
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 \fBsntp\fP will send queries to these IPs one
-after another, with a 2\-second gap in between each query.
+\fBntpd\fP, and therefore \fBsntp\fP will send queries to these IPs
+one after another, with a 2\-second gap in between each query.
.sp
The \fB\-c\fP or \fB\-\-concurrent\fP flag says that any IPs
returned for the DNS lookup of the supplied host\-name are on
.sp
This option specifies the keyfile.
\fBsntp\fP will search for the key specified with \fB\-a\fP
-\fIkeyno\fP in this file. Key files follow the following format:
-.sp
-\fIkeyid keytype key\fP
-.sp
-Where \fIkeyid\fP is a number identifying this key
-\fIkeytype\fP is one of the following:
-\fBS\fP Key is a 64 Bit hexadecimal number as specified in in the DES specification.
-\fBN\fP Key is a 64 Bit hexadecimal number as specified in the NTP standard.
-\fBA\fP Key is a 1\-to\-8 character ASCII string.
-\fBM\fP Key is a 1\-to\-8 character ASCII string using the MD5 authentication scheme.
-.sp
-For more information see \fBntp.keys(5)\fP.
+\fIkeyno\fP in this file. See \fBntp.keys(5)\fP for more
+information.
.It \-l " \fIfile\-name\fP, " \-\-logfile "=" \fIfile\-name\fP
Log to specified logfile.
.sp
slew the amount using \fBadjtime(2)\fP. Otherwise, step the
correction using \fBsettimeofday(2)\fP.
.It \-o " \fInumber\fP, " \-\-ntpversion "=" \fInumber\fP
-Send \fBint\fP as our NTP version.
+Send \fBint\fP as our NTP protocol version.
This option takes an integer number as its argument.
The value of \fInumber\fP is constrained to being:
.in +4
If any of these are directories, then the file \fI.ntprc\fP
is searched for within those directories.
.Sh USAGE
+.Bl -tag -width indent
+.It Li "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.
+.It Li "sntp -a ntpserver.somewhere"
+With suitable privilege,
+run as a command
+or from a
+.Xr cron 8
+job,
+.Ic "sntp -a"
+will reset the local clock from a synchronized specified server,
+like the (deprecated)
+.Xr ntpdate 1ntpdatemdoc ,
+or
+.Xr rdate 8
+commands.
+.El
.Sh "ENVIRONMENT"
See \fBOPTION PRESETS\fP for configuration environment variables.
.Sh "FILES"
it to autogen-users@lists.sourceforge.net. Thank you.
.El
.Sh AUTHORS
+.An "Johannes Maximilian Kuehn"
+.An "Harlan Stenn"
+.An "Dave Hart"
.Sh "COPYRIGHT"
Copyright (C) 1970-2012 The University of Delaware all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
-.Sh BUGS
+.Sh "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
-.Sh "NOTES"
+.Sh NOTES
+This document corresponds to version @VERSION@ of
+.Nm .
+.Pp
This manual page was \fIAutoGen\fP-erated from the \fBsntp\fP
option definitions.
<title>Sntp User's Manual</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Sntp User's Manual">
-<meta name="generator" content="makeinfo 4.7">
+<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="top" href="#Top">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
- span.sc { font-variant:small-caps }
- span.roman { font-family: serif; font-weight: normal; }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family:serif; font-weight:normal; }
+ span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<h1 class="settitle">Sntp User's Manual</h1>
<div class="node">
+<a name="Top"></a>
<p><hr>
-<a name="Top"></a>Next: <a rel="next" accesskey="n" href="#sntp-Description">sntp Description</a>,
+Next: <a rel="next" accesskey="n" href="#sntp-Description">sntp Description</a>,
Previous: <a rel="previous" accesskey="p" href="#dir">(dir)</a>,
Up: <a rel="up" accesskey="u" href="#dir">(dir)</a>
-<br>
+
</div>
<h2 class="unnumbered">Simple Network Time Protocol User Manual</h2>
</ul>
<div class="node">
-<p><hr>
<a name="sntp-Description"></a>
-<br>
+<p><hr>
+
+
</div>
<!-- node-name, next, previous, up -->
error bound of the system clock relative to the server clock.
<div class="node">
-<p><hr>
<a name="sntp-Invocation"></a>
-<br>
+<p><hr>
+
+
</div>
<h3 class="section">Invoking sntp</h3>
<p>NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
are defined and described by RFC 5905.
- <p>.PP
-The default is to write the estimated correct local date and time (i.e. not
+ <p>The default is to write the estimated correct local date and time (i.e. not
UTC) to the standard output in a format like:
<p>.Ic
This software is released under the NTP license, <http://ntp.org/license>.
<ul class="menu">
-<li><a accesskey="1" href="#sntp-usage">sntp usage</a>: sntp help/usage (<span class="option">--help</span>)
+<li><a accesskey="1" href="#sntp-usage">sntp usage</a>: sntp help/usage (<samp><span class="option">--help</span></samp>)
<li><a accesskey="2" href="#sntp-ipv4">sntp ipv4</a>: ipv4 option (-4)
<li><a accesskey="3" href="#sntp-ipv6">sntp ipv6</a>: ipv6 option (-6)
<li><a accesskey="4" href="#sntp-authentication">sntp authentication</a>: authentication option (-a)
<li><a href="#sntp-exit-status">sntp exit status</a>: exit status
<li><a href="#sntp-Usage">sntp Usage</a>: Usage
<li><a href="#sntp-Authors">sntp Authors</a>: Authors
-<li><a href="#sntp-Bugs">sntp Bugs</a>: Bugs
+<li><a href="#sntp-Notes">sntp Notes</a>: Notes
</ul>
<div class="node">
+<a name="sntp-usage"></a>
<p><hr>
-<a name="sntp-usage"></a>Next: <a rel="next" accesskey="n" href="#sntp-ipv4">sntp ipv4</a>,
+Next: <a rel="next" accesskey="n" href="#sntp-ipv4">sntp ipv4</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
-<h4 class="subsection">sntp help/usage (<span class="option">--help</span>)</h4>
+<h4 class="subsection">sntp help/usage (<samp><span class="option">--help</span></samp>)</h4>
<p><a name="index-sntp-help-3"></a>
This is the automatically generated usage text for sntp.
<p>The text printed is the same whether selected with the <code>help</code> option
-(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
+(<samp><span class="option">--help</span></samp>) or the <code>more-help</code> option (<samp><span class="option">--more-help</span></samp>). <code>more-help</code> will print
the usage text by passing it through a pager program.
<code>more-help</code> is disabled on platforms without a working
<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
-used to select the program, defaulting to <span class="file">more</span>. Both will exit
+used to select the program, defaulting to <samp><span class="file">more</span></samp>. Both will exit
with a status code of 0.
<pre class="example">sntp - standard Simple Network Time Protocol client program - Ver. 4.2.7p331
-M Num steplimit Adjustments less than steplimit msec will be slewed
- It must be in the range:
greater than or equal to 0
- -o Num ntpversion Send int as our NTP version
+ -o Num ntpversion Send int as our NTP protocol version
- It must be in the range:
0 to 7
-r no usereservedport Use the NTP Reserved Port (port 123)
please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
</pre>
<div class="node">
+<a name="sntp-ipv4"></a>
<p><hr>
-<a name="sntp-ipv4"></a>Next: <a rel="next" accesskey="n" href="#sntp-ipv6">sntp ipv6</a>,
+Next: <a rel="next" accesskey="n" href="#sntp-ipv6">sntp ipv6</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-usage">sntp usage</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">ipv4 option (-4)</h4>
<p>Force DNS resolution of the following host names on the command line
to the IPv4 namespace.
<div class="node">
+<a name="sntp-ipv6"></a>
<p><hr>
-<a name="sntp-ipv6"></a>Next: <a rel="next" accesskey="n" href="#sntp-authentication">sntp authentication</a>,
+Next: <a rel="next" accesskey="n" href="#sntp-authentication">sntp authentication</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-ipv4">sntp ipv4</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">ipv6 option (-6)</h4>
<p>Force DNS resolution of the following host names on the command line
to the IPv6 namespace.
<div class="node">
+<a name="sntp-authentication"></a>
<p><hr>
-<a name="sntp-authentication"></a>Next: <a rel="next" accesskey="n" href="#sntp-broadcast">sntp broadcast</a>,
+Next: <a rel="next" accesskey="n" href="#sntp-broadcast">sntp broadcast</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-ipv6">sntp ipv6</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">authentication option (-a)</h4>
<p><a name="index-sntp_002dauthentication-6"></a>
This is the “enable authentication with the key <var>auth-keynumber</var>” option.
-This option takes an argument number <span class="file">auth-keynumber</span>.
-This option enables 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 (<span class="option">-k</span>) for more details.
+This option takes an argument number <samp><span class="file">auth-keynumber</span></samp>.
+Enable authentication using the key specified in this option's
+argument. The argument of this option is the <samp><span class="option">keyid</span></samp>, a
+number specified in the <samp><span class="option">keyfile</span></samp> as this key's identifier.
+See the <samp><span class="option">keyfile</span></samp> option (<samp><span class="option">-k</span></samp>) for more details.
<div class="node">
+<a name="sntp-broadcast"></a>
<p><hr>
-<a name="sntp-broadcast"></a>Next: <a rel="next" accesskey="n" href="#sntp-concurrent">sntp concurrent</a>,
+Next: <a rel="next" accesskey="n" href="#sntp-concurrent">sntp concurrent</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-authentication">sntp authentication</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">broadcast option (-b)</h4>
<p><a name="index-sntp_002dbroadcast-7"></a>
This is the “listen to the address specified for broadcast time sync” option.
-This option takes an argument string <span class="file">broadcast-address</span>.
+This option takes an argument string <samp><span class="file">broadcast-address</span></samp>.
<p class="noindent">This option has some usage constraints. It:
<ul>
<p>If specified <code>sntp</code> will listen to the specified address
for NTP broadcasts. The default maximum wait time
-can (and probably should) be modified with <span class="option">-t</span>.
+can (and probably should) be modified with <samp><span class="option">-t</span></samp>.
<div class="node">
+<a name="sntp-concurrent"></a>
<p><hr>
-<a name="sntp-concurrent"></a>Next: <a rel="next" accesskey="n" href="#sntp-gap">sntp gap</a>,
+Next: <a rel="next" accesskey="n" href="#sntp-gap">sntp gap</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-broadcast">sntp broadcast</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">concurrent option (-c)</h4>
<p><a name="index-sntp_002dconcurrent-8"></a>
This is the “concurrently query all ips returned for host-name” option.
-This option takes an argument string <span class="file">host-name</span>.
+This option takes an argument string <samp><span class="file">host-name</span></samp>.
<p class="noindent">This option has some usage constraints. It:
<ul>
<p>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 <code>sntp</code> will send queries to these IPs one
-after another, with a 2-second gap in between each query.
+<code>ntpd</code>, and therefore <code>sntp</code> will send queries to these IPs
+one after another, with a 2-second gap in between each query.
- <p>The <span class="option">-c</span> or <span class="option">--concurrent</span> flag says that any IPs
+ <p>The <samp><span class="option">-c</span></samp> or <samp><span class="option">--concurrent</span></samp> 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.
<div class="node">
+<a name="sntp-gap"></a>
<p><hr>
-<a name="sntp-gap"></a>Next: <a rel="next" accesskey="n" href="#sntp-kod">sntp kod</a>,
+Next: <a rel="next" accesskey="n" href="#sntp-kod">sntp kod</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-concurrent">sntp concurrent</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">gap option (-g)</h4>
<p><a name="index-sntp_002dgap-9"></a>
This is the “the gap (in milliseconds) between time requests” option.
-This option takes an argument number <span class="file">milliseconds</span>.
+This option takes an argument number <samp><span class="file">milliseconds</span></samp>.
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.
<div class="node">
+<a name="sntp-kod"></a>
<p><hr>
-<a name="sntp-kod"></a>Next: <a rel="next" accesskey="n" href="#sntp-keyfile">sntp keyfile</a>,
+Next: <a rel="next" accesskey="n" href="#sntp-keyfile">sntp keyfile</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-gap">sntp gap</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">kod option (-K)</h4>
<p><a name="index-sntp_002dkod-10"></a>
This is the “kod history filename” option.
-This option takes an argument file <span class="file">file-name</span>.
+This option takes an argument file <samp><span class="file">file-name</span></samp>.
Specifies the filename to be used for the persistent history of KoD
responses received from servers.
<div class="node">
+<a name="sntp-keyfile"></a>
<p><hr>
-<a name="sntp-keyfile"></a>Next: <a rel="next" accesskey="n" href="#sntp-logfile">sntp logfile</a>,
+Next: <a rel="next" accesskey="n" href="#sntp-logfile">sntp logfile</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-kod">sntp kod</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">keyfile option (-k)</h4>
<p><a name="index-sntp_002dkeyfile-11"></a>
-This is the “look in this file for the key specified with <span class="option">-a</span>” option.
-This option takes an argument file <span class="file">file-name</span>.
+This is the “look in this file for the key specified with <samp><span class="option">-a</span></samp>” option.
+This option takes an argument file <samp><span class="file">file-name</span></samp>.
This option specifies the keyfile.
-<code>sntp</code> will search for the key specified with <span class="option">-a</span>
-<span class="file">keyno</span> in this file. Key files follow the following format:
-
- <p><span class="file">keyid keytype key</span>
-
- <p>Where <span class="file">keyid</span> is a number identifying this key
-<span class="file">keytype</span> is one of the following:
-<code>S</code> Key is a 64 Bit hexadecimal number as specified in in the DES specification.
-<code>N</code> Key is a 64 Bit hexadecimal number as specified in the NTP standard.
-<code>A</code> Key is a 1-to-8 character ASCII string.
-<code>M</code> Key is a 1-to-8 character ASCII string using the MD5 authentication scheme.
-
- <p>For more information see <span class="command">ntp.keys(5)</span>.
+<code>sntp</code> will search for the key specified with <samp><span class="option">-a</span></samp>
+<samp><span class="file">keyno</span></samp> in this file. See <samp><span class="command">ntp.keys(5)</span></samp> for more
+information.
<div class="node">
+<a name="sntp-logfile"></a>
<p><hr>
-<a name="sntp-logfile"></a>Next: <a rel="next" accesskey="n" href="#sntp-steplimit">sntp steplimit</a>,
+Next: <a rel="next" accesskey="n" href="#sntp-steplimit">sntp steplimit</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-keyfile">sntp keyfile</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">logfile option (-l)</h4>
<p><a name="index-sntp_002dlogfile-12"></a>
This is the “log to specified logfile” option.
-This option takes an argument file <span class="file">file-name</span>.
+This option takes an argument file <samp><span class="file">file-name</span></samp>.
This option causes the client to write log messages to the specified
-<span class="file">logfile</span>.
+<samp><span class="file">logfile</span></samp>.
<div class="node">
+<a name="sntp-steplimit"></a>
<p><hr>
-<a name="sntp-steplimit"></a>Next: <a rel="next" accesskey="n" href="#sntp-ntpversion">sntp ntpversion</a>,
+Next: <a rel="next" accesskey="n" href="#sntp-ntpversion">sntp ntpversion</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-logfile">sntp logfile</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">steplimit option (-M)</h4>
<p><a name="index-sntp_002dsteplimit-13"></a>
This is the “adjustments less than <var>steplimit</var> msec will be slewed” option.
This option takes an argument number.
-If the time adjustment is less than <span class="file">steplimit</span> milliseconds,
-slew the amount using <span class="command">adjtime(2)</span>. Otherwise, step the
-correction using <span class="command">settimeofday(2)</span>.
+If the time adjustment is less than <samp><span class="file">steplimit</span></samp> milliseconds,
+slew the amount using <samp><span class="command">adjtime(2)</span></samp>. Otherwise, step the
+correction using <samp><span class="command">settimeofday(2)</span></samp>.
<div class="node">
+<a name="sntp-ntpversion"></a>
<p><hr>
-<a name="sntp-ntpversion"></a>Next: <a rel="next" accesskey="n" href="#sntp-usereservedport">sntp usereservedport</a>,
+Next: <a rel="next" accesskey="n" href="#sntp-usereservedport">sntp usereservedport</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-steplimit">sntp steplimit</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">ntpversion option (-o)</h4>
<p><a name="index-sntp_002dntpversion-14"></a>
-This is the “send <var>int</var> as our ntp version” option.
+This is the “send <var>int</var> as our ntp protocol version” option.
This option takes an argument number.
When sending requests to a remote server, tell them we are running
-NTP protocol version <span class="file">ntpversion</span> .
+NTP protocol version <samp><span class="file">ntpversion</span></samp> .
<div class="node">
+<a name="sntp-usereservedport"></a>
<p><hr>
-<a name="sntp-usereservedport"></a>Next: <a rel="next" accesskey="n" href="#sntp-timeout">sntp timeout</a>,
+Next: <a rel="next" accesskey="n" href="#sntp-timeout">sntp timeout</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-ntpversion">sntp ntpversion</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">usereservedport option (-r)</h4>
Use port 123, which is reserved for NTP, for our network
communications.
<div class="node">
+<a name="sntp-timeout"></a>
<p><hr>
-<a name="sntp-timeout"></a>Next: <a rel="next" accesskey="n" href="#sntp-wait">sntp wait</a>,
+Next: <a rel="next" accesskey="n" href="#sntp-wait">sntp wait</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-usereservedport">sntp usereservedport</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">timeout option (-t)</h4>
<p><a name="index-sntp_002dtimeout-16"></a>
This is the “the number of seconds to wait for responses” option.
-This option takes an argument number <span class="file">seconds</span>.
+This option takes an argument number <samp><span class="file">seconds</span></samp>.
When waiting for a reply, <code>sntp</code> will wait the number
of seconds specified before giving up. The default should be
more than enough for a unicast response. If <code>sntp</code> is
only waiting for a broadcast response a longer timeout is
likely needed.
<div class="node">
+<a name="sntp-wait"></a>
<p><hr>
-<a name="sntp-wait"></a>Next: <a rel="next" accesskey="n" href="#sntp-config">sntp config</a>,
+Next: <a rel="next" accesskey="n" href="#sntp-config">sntp config</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-timeout">sntp timeout</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">wait option</h4>
<p>If we are not setting the time, wait for all pending responses.
<div class="node">
+<a name="sntp-config"></a>
<p><hr>
-<a name="sntp-config"></a>Next: <a rel="next" accesskey="n" href="#sntp-exit-status">sntp exit status</a>,
+Next: <a rel="next" accesskey="n" href="#sntp-exit-status">sntp exit status</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-wait">sntp wait</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">presetting/configuring sntp</h4>
<li>$PWD
</ul>
The environment variables <code>HOME</code>, and <code>PWD</code>
-are expanded and replaced when <span class="file">sntp</span> runs.
+are expanded and replaced when <samp><span class="file">sntp</span></samp> runs.
For any of these that are plain files, they are simply processed.
-For any that are directories, then a file named <span class="file">.ntprc</span> is searched for
+For any that are directories, then a file named <samp><span class="file">.ntprc</span></samp> is searched for
within that directory and processed.
<p>Configuration files may be in a wide variety of formats.
first letter of the argument is examined:
<dl>
-<dt><span class="samp">version</span><dd>Only print the version. This is the default.
-<br><dt><span class="samp">copyright</span><dd>Name the copyright usage licensing terms.
-<br><dt><span class="samp">verbose</span><dd>Print the full copyright usage licensing terms.
+<dt>‘<samp><span class="samp">version</span></samp>’<dd>Only print the version. This is the default.
+<br><dt>‘<samp><span class="samp">copyright</span></samp>’<dd>Name the copyright usage licensing terms.
+<br><dt>‘<samp><span class="samp">verbose</span></samp>’<dd>Print the full copyright usage licensing terms.
</dl>
<div class="node">
+<a name="sntp-exit-status"></a>
<p><hr>
-<a name="sntp-exit-status"></a>Next: <a rel="next" accesskey="n" href="#sntp-Usage">sntp Usage</a>,
+Next: <a rel="next" accesskey="n" href="#sntp-Usage">sntp Usage</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-config">sntp config</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">sntp exit status</h4>
<p>One of the following exit values will be returned:
<dl>
-<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
-<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
-<br><dt><span class="samp">66 (EX_NOINPUT)</span><dd>A specified configuration file could not be loaded.
-<br><dt><span class="samp">70 (EX_SOFTWARE)</span><dd>libopts had an internal operational error. Please report
+<dt>‘<samp><span class="samp">0 (EXIT_SUCCESS)</span></samp>’<dd>Successful program execution.
+<br><dt>‘<samp><span class="samp">1 (EXIT_FAILURE)</span></samp>’<dd>The operation failed or the command syntax was not valid.
+<br><dt>‘<samp><span class="samp">66 (EX_NOINPUT)</span></samp>’<dd>A specified configuration file could not be loaded.
+<br><dt>‘<samp><span class="samp">70 (EX_SOFTWARE)</span></samp>’<dd>libopts had an internal operational error. Please report
it to autogen-users@lists.sourceforge.net. Thank you.
</dl>
<div class="node">
+<a name="sntp-Usage"></a>
<p><hr>
-<a name="sntp-Usage"></a>Next: <a rel="next" accesskey="n" href="#sntp-Authors">sntp Authors</a>,
+Next: <a rel="next" accesskey="n" href="#sntp-Authors">sntp Authors</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-exit-status">sntp exit status</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">sntp Usage</h4>
<dl>
-<dt><span class="samp">Li</span><dd>is the simplest use of this program
+<dt>‘<samp><span class="samp">Li</span></samp>’<dd>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.
-<br><dt><span class="samp">Li</span><dd>With suitable privilege,
+<br><dt>‘<samp><span class="samp">Li</span></samp>’<dd>With suitable privilege,
run as a command
or from a
<code>cron(8)</code>
commands.
<div class="node">
+<a name="sntp-Authors"></a>
<p><hr>
-<a name="sntp-Authors"></a>Next: <a rel="next" accesskey="n" href="#sntp-Bugs">sntp Bugs</a>,
+Next: <a rel="next" accesskey="n" href="#sntp-Notes">sntp Notes</a>,
Previous: <a rel="previous" accesskey="p" href="#sntp-Usage">sntp Usage</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
<h4 class="subsection">sntp Authors</h4>
"Dave
Hart"
<div class="node">
+<a name="sntp-Notes"></a>
<p><hr>
-<a name="sntp-Bugs"></a>Previous: <a rel="previous" accesskey="p" href="#sntp-Authors">sntp Authors</a>,
+Previous: <a rel="previous" accesskey="p" href="#sntp-Authors">sntp Authors</a>,
Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
-<br>
+
</div>
-<h4 class="subsection">sntp Bugs</h4>
+<h4 class="subsection">sntp Notes</h4>
- <p>Please report bugs to http://bugs.ntp.org .
+ <p>This document corresponds to version of
+<code>sntp</code>.
<div class="node">
-<p><hr>
<a name="Usage"></a>
-<br>
+<p><hr>
+
+
</div>
<!-- node-name, next, previous, up -->
For example:
<pre class="example"> sntp ntpserver.somewhere
- </pre>
+</pre>
<p>With suitable privilege, it can be run as a command or in a
<code>crom</code> job to reset the local clock from a reliable server, like
the <code>ntpdate</code> and <code>rdate</code> commands.
For example:
<pre class="example"> sntp -a ntpserver.somewhere
- </pre>
+</pre>
</body></html>
-.TH sntp @SNTP_MS@ "03 Dec 2012" "4.2.7p331" "User Commands"
+.TH sntp @SNTP_MS@ "06 Dec 2012" "4.2.7p331" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (sntp-opts.man)
.\"
-.\" It has been AutoGen-ed December 3, 2012 at 11:43:09 AM by AutoGen 5.16.2
+.\" It has been AutoGen-ed December 6, 2012 at 02:11:59 AM by AutoGen 5.16.2
.\" From the definitions sntp-opts.def
.\" and the template file agman-cmd.tpl
.\"
.RB [ \-\fIflag\fP " [\fIvalue\fP]]... [" \-\-\fIopt\-name\fP " [[=| ]\fIvalue\fP]]..." [ hostname-or-IP ...]
.PP
.SH DESCRIPTION
+.B
+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
+.Ic cron
+job.
+NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
+are defined and described by RFC 5905.
+.PP
+The default is to write the estimated correct local date and time (i.e. not
+UTC) to the standard output in a format like:
+.Ic "'1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 [host] IP sN'"
+where the
+.Ic "'(+0800)'"
+means that to get to UTC from the reported local time one must
+add 8 hours and 0 minutes,
+the
+.Ic "'+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.
+.Ic "'+/- 0.089'"
+is the reported
+.I 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
+.Ic "'+/- ?'" .
+If the
+.I host
+is different from the
+.I IP ,
+both will be displayed.
+Otherwise, only the
+.I IP
+is displayed.
+Finally, the
+.I stratum
+of the host is reported.
.SH "OPTIONS"
.TP
.BR \-4 ", " -\-ipv4
Enable authentication with the key \fBauth-keynumber\fP.
This option takes an integer number as its argument.
.sp
-This option enables 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 (\fB-k\fP) for more details.
+Enable authentication using the key specified in this option's
+argument. The argument of this option is the \fBkeyid\fP, a
+number specified in the \fBkeyfile\fP as this key's identifier.
+See the \fBkeyfile\fP option (\fB-k\fP) for more details.
.TP
.BR \-b " \fIbroadcast\-address\fP, " \-\-broadcast "=" \fIbroadcast\-address\fP
Listen to the address specified for broadcast time sync.
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 \fBsntp\fP will send queries to these IPs one
-after another, with a 2-second gap in between each query.
+\fBntpd\fP, and therefore \fBsntp\fP will send queries to these IPs
+one after another, with a 2-second gap in between each query.
The \fB-c\fP or \fB--concurrent\fP 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.
.sp
This option specifies the keyfile.
\fBsntp\fP will search for the key specified with \fB-a\fP
-\fIkeyno\fP in this file. Key files follow the following format:
-\fIkeyid keytype key\fP
-Where \fIkeyid\fP is a number identifying this key
-\fIkeytype\fP is one of the following:
-\fBS\fP Key is a 64 Bit hexadecimal number as specified in in the DES specification.
-\fBN\fP Key is a 64 Bit hexadecimal number as specified in the NTP standard.
-\fBA\fP Key is a 1-to-8 character ASCII string.
-\fBM\fP Key is a 1-to-8 character ASCII string using the MD5 authentication scheme.
-For more information see \fBntp.keys(5)\fP.
+\fIkeyno\fP in this file. See \fBntp.keys(5)\fP for more
+information.
.TP
.BR \-l " \fIfile\-name\fP, " \-\-logfile "=" \fIfile\-name\fP
Log to specified logfile.
correction using \fBsettimeofday(2)\fP.
.TP
.BR \-o " \fInumber\fP, " \-\-ntpversion "=" \fInumber\fP
-Send \fBint\fP as our NTP version.
+Send \fBint\fP as our NTP protocol version.
This option takes an integer number as its argument.
The value of \fInumber\fP is constrained to being:
.in +4
If any of these are directories, then the file \fI.ntprc\fP
is searched for within those directories.
.SH USAGE
+.TP
+.BR Li "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.
+.TP
+.BR Li "sntp -a ntpserver.somewhere"
+With suitable privilege,
+run as a command
+or from a
+.Xr cron 8
+job,
+.Ic "sntp -a"
+will reset the local clock from a synchronized specified server,
+like the (deprecated)
+.Xr ntpdate @NTPDATE_MS@ ,
+or
+.Xr rdate 8
+commands.
.SH "ENVIRONMENT"
See \fBOPTION PRESETS\fP for configuration environment variables.
.SH "FILES"
libopts had an internal operational error. Please report
it to autogen-users@lists.sourceforge.net. Thank you.
.SH AUTHORS
+.An "Johannes Maximilian Kuehn"
+.An "Harlan Stenn"
+.An "Dave Hart"
.SH "COPYRIGHT"
Copyright (C) 1970-2012 The University of Delaware all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
-.SH BUGS
+.SH "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
-.SH "NOTES"
+.SH NOTES
+This document corresponds to version @VERSION@ of
+.B .
+.PP
This manual page was \fIAutoGen\fP-erated from the \fBsntp\fP
option definitions.
-.Dd December 3 2012
+.Dd December 6 2012
.Dt SNTP @SNTP_MS@ User Commands
-.Os SunOS 5.10
+.Os FreeBSD 6.4-STABLE
.\" EDIT THIS FILE WITH CAUTION (sntp-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 3, 2012 at 11:43:15 AM by AutoGen 5.16.2
+.\" It has been AutoGen-ed December 6, 2012 at 02:11:47 AM by AutoGen 5.16.2
.\" From the definitions sntp-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
[ hostname-or-IP ...]
.Pp
.Sh DESCRIPTION
+.Nm
+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
+.Ic cron
+job.
+NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
+are defined and described by RFC 5905.
+.Pp
+The default is to write the estimated correct local date and time (i.e. not
+UTC) to the standard output in a format like:
+.Ic "'1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 [host] IP sN'"
+where the
+.Ic "'(+0800)'"
+means that to get to UTC from the reported local time one must
+add 8 hours and 0 minutes,
+the
+.Ic "'+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.
+.Ic "'+/- 0.089'"
+is the reported
+.Em 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
+.Ic "'+/- ?'" .
+If the
+.Em host
+is different from the
+.Em IP ,
+both will be displayed.
+Otherwise, only the
+.Em IP
+is displayed.
+Finally, the
+.Em stratum
+of the host is reported.
.Sh "OPTIONS"
.Bl -tag
.It \-4 ", " -\-ipv4
Enable authentication with the key \fBauth\-keynumber\fP.
This option takes an integer number as its argument.
.sp
-This option enables 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 (\fB\-k\fP) for more details.
+Enable authentication using the key specified in this option's
+argument. The argument of this option is the \fBkeyid\fP, a
+number specified in the \fBkeyfile\fP as this key's identifier.
+See the \fBkeyfile\fP option (\fB\-k\fP) for more details.
.It \-b " \fIbroadcast\-address\fP, " \-\-broadcast "=" \fIbroadcast\-address\fP
Listen to the address specified for broadcast time sync.
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 \fBsntp\fP will send queries to these IPs one
-after another, with a 2\-second gap in between each query.
+\fBntpd\fP, and therefore \fBsntp\fP will send queries to these IPs
+one after another, with a 2\-second gap in between each query.
.sp
The \fB\-c\fP or \fB\-\-concurrent\fP flag says that any IPs
returned for the DNS lookup of the supplied host\-name are on
.sp
This option specifies the keyfile.
\fBsntp\fP will search for the key specified with \fB\-a\fP
-\fIkeyno\fP in this file. Key files follow the following format:
-.sp
-\fIkeyid keytype key\fP
-.sp
-Where \fIkeyid\fP is a number identifying this key
-\fIkeytype\fP is one of the following:
-\fBS\fP Key is a 64 Bit hexadecimal number as specified in in the DES specification.
-\fBN\fP Key is a 64 Bit hexadecimal number as specified in the NTP standard.
-\fBA\fP Key is a 1\-to\-8 character ASCII string.
-\fBM\fP Key is a 1\-to\-8 character ASCII string using the MD5 authentication scheme.
-.sp
-For more information see \fBntp.keys(5)\fP.
+\fIkeyno\fP in this file. See \fBntp.keys(5)\fP for more
+information.
.It \-l " \fIfile\-name\fP, " \-\-logfile "=" \fIfile\-name\fP
Log to specified logfile.
.sp
slew the amount using \fBadjtime(2)\fP. Otherwise, step the
correction using \fBsettimeofday(2)\fP.
.It \-o " \fInumber\fP, " \-\-ntpversion "=" \fInumber\fP
-Send \fBint\fP as our NTP version.
+Send \fBint\fP as our NTP protocol version.
This option takes an integer number as its argument.
The value of \fInumber\fP is constrained to being:
.in +4
If any of these are directories, then the file \fI.ntprc\fP
is searched for within those directories.
.Sh USAGE
+.Bl -tag -width indent
+.It Li "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.
+.It Li "sntp -a ntpserver.somewhere"
+With suitable privilege,
+run as a command
+or from a
+.Xr cron 8
+job,
+.Ic "sntp -a"
+will reset the local clock from a synchronized specified server,
+like the (deprecated)
+.Xr ntpdate @NTPDATE_MS@ ,
+or
+.Xr rdate 8
+commands.
+.El
.Sh "ENVIRONMENT"
See \fBOPTION PRESETS\fP for configuration environment variables.
.Sh "FILES"
it to autogen-users@lists.sourceforge.net. Thank you.
.El
.Sh AUTHORS
+.An "Johannes Maximilian Kuehn"
+.An "Harlan Stenn"
+.An "Dave Hart"
.Sh "COPYRIGHT"
Copyright (C) 1970-2012 The University of Delaware all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
-.Sh BUGS
+.Sh "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
-.Sh "NOTES"
+.Sh NOTES
+This document corresponds to version @VERSION@ of
+.Nm .
+.Pp
This manual page was \fIAutoGen\fP-erated from the \fBsntp\fP
option definitions.