summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/ntpq
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp/ntpq')
-rw-r--r--contrib/ntp/ntpq/Makefile.am6
-rw-r--r--contrib/ntp/ntpq/Makefile.in26
-rw-r--r--contrib/ntp/ntpq/invoke-ntpq.texi502
-rw-r--r--contrib/ntp/ntpq/ntpq-opts.c226
-rw-r--r--contrib/ntp/ntpq/ntpq-opts.def738
-rw-r--r--contrib/ntp/ntpq/ntpq-opts.h6
-rw-r--r--contrib/ntp/ntpq/ntpq-subs.c64
-rw-r--r--contrib/ntp/ntpq/ntpq.1ntpqman648
-rw-r--r--contrib/ntp/ntpq/ntpq.1ntpqmdoc731
-rw-r--r--contrib/ntp/ntpq/ntpq.c337
-rw-r--r--contrib/ntp/ntpq/ntpq.html429
-rw-r--r--contrib/ntp/ntpq/ntpq.man.in648
-rw-r--r--contrib/ntp/ntpq/ntpq.mdoc.in731
-rw-r--r--contrib/ntp/ntpq/ntpq.texi2
14 files changed, 2977 insertions, 2117 deletions
diff --git a/contrib/ntp/ntpq/Makefile.am b/contrib/ntp/ntpq/Makefile.am
index 06018fc..074bdce 100644
--- a/contrib/ntp/ntpq/Makefile.am
+++ b/contrib/ntp/ntpq/Makefile.am
@@ -21,9 +21,13 @@ ntpq_LDADD = version.o $(LIBOPTS_LDADD)
ntpq_LDADD += ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
ntpq_LDADD += $(PTHREAD_LIBS) $(EDITLINE_LIBS)
ntpq_LDADD += $(LDADD_NTP)
+ntpq_LDADD += $(NTP_HARD_LDFLAGS)
noinst_HEADERS= ntpq.h
noinst_LIBRARIES= libntpq.a
-libntpq_a_CFLAGS= -DNO_MAIN_ALLOWED -DBUILD_AS_LIB
+libntpq_a_CFLAGS= $(AM_CFLAGS)
+libntpq_a_CFLAGS+= -DNO_MAIN_ALLOWED -DBUILD_AS_LIB
+libntpq_a_CPPFLAGS= $(AM_CPPFLAGS)
+libntpq_a_LDFLAGS= $(AM_LDFLAGS)
CLEANFILES=
DISTCLEANFILES= .version version.c config.log $(man_MANS)
ETAGS_ARGS= Makefile.am
diff --git a/contrib/ntp/ntpq/Makefile.in b/contrib/ntp/ntpq/Makefile.in
index 2bddc00..b208853 100644
--- a/contrib/ntp/ntpq/Makefile.in
+++ b/contrib/ntp/ntpq/Makefile.in
@@ -108,6 +108,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ltsugar.m4 \
$(top_srcdir)/sntp/m4/ltversion.m4 \
$(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_af_unspec.m4 \
$(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
$(top_srcdir)/sntp/m4/ntp_compiler.m4 \
$(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
@@ -167,7 +168,7 @@ am__DEPENDENCIES_1 =
ntpq_DEPENDENCIES = version.o $(am__DEPENDENCIES_1) ../libntp/libntp.a \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1)
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
@@ -547,10 +548,12 @@ AM_LDFLAGS = $(LDFLAGS_NTP) $(NTP_HARD_LDFLAGS)
# LDADD might need RESLIB and ADJLIB
ntpq_LDADD = version.o $(LIBOPTS_LDADD) ../libntp/libntp.a \
$(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) $(EDITLINE_LIBS) \
- $(LDADD_NTP)
+ $(LDADD_NTP) $(NTP_HARD_LDFLAGS)
noinst_HEADERS = ntpq.h
noinst_LIBRARIES = libntpq.a
-libntpq_a_CFLAGS = -DNO_MAIN_ALLOWED -DBUILD_AS_LIB
+libntpq_a_CFLAGS = $(AM_CFLAGS) -DNO_MAIN_ALLOWED -DBUILD_AS_LIB
+libntpq_a_CPPFLAGS = $(AM_CPPFLAGS)
+libntpq_a_LDFLAGS = $(AM_LDFLAGS)
CLEANFILES = check-libopts check-libntp .deps-ver
DISTCLEANFILES = .version version.c config.log $(man_MANS)
ETAGS_ARGS = Makefile.am
@@ -828,32 +831,32 @@ distclean-compile:
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
libntpq_a-libntpq.o: libntpq.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -MT libntpq_a-libntpq.o -MD -MP -MF $(DEPDIR)/libntpq_a-libntpq.Tpo -c -o libntpq_a-libntpq.o `test -f 'libntpq.c' || echo '$(srcdir)/'`libntpq.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntpq_a_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -MT libntpq_a-libntpq.o -MD -MP -MF $(DEPDIR)/libntpq_a-libntpq.Tpo -c -o libntpq_a-libntpq.o `test -f 'libntpq.c' || echo '$(srcdir)/'`libntpq.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libntpq_a-libntpq.Tpo $(DEPDIR)/libntpq_a-libntpq.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libntpq.c' object='libntpq_a-libntpq.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -c -o libntpq_a-libntpq.o `test -f 'libntpq.c' || echo '$(srcdir)/'`libntpq.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntpq_a_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -c -o libntpq_a-libntpq.o `test -f 'libntpq.c' || echo '$(srcdir)/'`libntpq.c
libntpq_a-libntpq.obj: libntpq.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -MT libntpq_a-libntpq.obj -MD -MP -MF $(DEPDIR)/libntpq_a-libntpq.Tpo -c -o libntpq_a-libntpq.obj `if test -f 'libntpq.c'; then $(CYGPATH_W) 'libntpq.c'; else $(CYGPATH_W) '$(srcdir)/libntpq.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntpq_a_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -MT libntpq_a-libntpq.obj -MD -MP -MF $(DEPDIR)/libntpq_a-libntpq.Tpo -c -o libntpq_a-libntpq.obj `if test -f 'libntpq.c'; then $(CYGPATH_W) 'libntpq.c'; else $(CYGPATH_W) '$(srcdir)/libntpq.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libntpq_a-libntpq.Tpo $(DEPDIR)/libntpq_a-libntpq.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libntpq.c' object='libntpq_a-libntpq.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -c -o libntpq_a-libntpq.obj `if test -f 'libntpq.c'; then $(CYGPATH_W) 'libntpq.c'; else $(CYGPATH_W) '$(srcdir)/libntpq.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntpq_a_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -c -o libntpq_a-libntpq.obj `if test -f 'libntpq.c'; then $(CYGPATH_W) 'libntpq.c'; else $(CYGPATH_W) '$(srcdir)/libntpq.c'; fi`
libntpq_a-libntpq_subs.o: libntpq_subs.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -MT libntpq_a-libntpq_subs.o -MD -MP -MF $(DEPDIR)/libntpq_a-libntpq_subs.Tpo -c -o libntpq_a-libntpq_subs.o `test -f 'libntpq_subs.c' || echo '$(srcdir)/'`libntpq_subs.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntpq_a_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -MT libntpq_a-libntpq_subs.o -MD -MP -MF $(DEPDIR)/libntpq_a-libntpq_subs.Tpo -c -o libntpq_a-libntpq_subs.o `test -f 'libntpq_subs.c' || echo '$(srcdir)/'`libntpq_subs.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libntpq_a-libntpq_subs.Tpo $(DEPDIR)/libntpq_a-libntpq_subs.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libntpq_subs.c' object='libntpq_a-libntpq_subs.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -c -o libntpq_a-libntpq_subs.o `test -f 'libntpq_subs.c' || echo '$(srcdir)/'`libntpq_subs.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntpq_a_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -c -o libntpq_a-libntpq_subs.o `test -f 'libntpq_subs.c' || echo '$(srcdir)/'`libntpq_subs.c
libntpq_a-libntpq_subs.obj: libntpq_subs.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -MT libntpq_a-libntpq_subs.obj -MD -MP -MF $(DEPDIR)/libntpq_a-libntpq_subs.Tpo -c -o libntpq_a-libntpq_subs.obj `if test -f 'libntpq_subs.c'; then $(CYGPATH_W) 'libntpq_subs.c'; else $(CYGPATH_W) '$(srcdir)/libntpq_subs.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntpq_a_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -MT libntpq_a-libntpq_subs.obj -MD -MP -MF $(DEPDIR)/libntpq_a-libntpq_subs.Tpo -c -o libntpq_a-libntpq_subs.obj `if test -f 'libntpq_subs.c'; then $(CYGPATH_W) 'libntpq_subs.c'; else $(CYGPATH_W) '$(srcdir)/libntpq_subs.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libntpq_a-libntpq_subs.Tpo $(DEPDIR)/libntpq_a-libntpq_subs.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libntpq_subs.c' object='libntpq_a-libntpq_subs.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -c -o libntpq_a-libntpq_subs.obj `if test -f 'libntpq_subs.c'; then $(CYGPATH_W) 'libntpq_subs.c'; else $(CYGPATH_W) '$(srcdir)/libntpq_subs.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libntpq_a_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -c -o libntpq_a-libntpq_subs.obj `if test -f 'libntpq_subs.c'; then $(CYGPATH_W) 'libntpq_subs.c'; else $(CYGPATH_W) '$(srcdir)/libntpq_subs.c'; fi`
mostlyclean-libtool:
-rm -f *.lo
@@ -1272,7 +1275,6 @@ check-libopts: ../sntp/libopts/libopts.la
-cd ../sntp/libopts && $(MAKE) $(AM_MAKEFLAGS) libopts.la
check-libntp: ../libntp/libntp.a
- @echo stamp > $@
../libntp/libntp.a:
cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
diff --git a/contrib/ntp/ntpq/invoke-ntpq.texi b/contrib/ntp/ntpq/invoke-ntpq.texi
index 3cee868..69f2088 100644
--- a/contrib/ntp/ntpq/invoke-ntpq.texi
+++ b/contrib/ntp/ntpq/invoke-ntpq.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpq.texi)
#
-# It has been AutoGen-ed March 21, 2017 at 10:45:28 AM by AutoGen 5.18.5
+# It has been AutoGen-ed February 27, 2018 at 05:15:26 PM by AutoGen 5.18.5
# From the definitions ntpq-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -14,13 +14,9 @@
The
@code{ntpq}
-utility program is used to query NTP servers which
-implement the standard NTP mode 6 control message formats defined
-in Appendix B of the NTPv3 specification RFC1305, requesting
+utility program is used to query NTP servers to monitor NTP operations
+and performance, requesting
information about current state and/or changes in that state.
-The same formats are used in NTPv4, although some of the
-variables have changed and new ones added. The description on this
-page is for the NTPv4 variables.
The program may be run either in interactive mode or controlled using
command line arguments.
Requests to read and write arbitrary
@@ -64,6 +60,16 @@ one attempt to retransmit requests, and will time requests out if
the remote host is not heard from within a suitable timeout
time.
+Note that in contexts where a host name is expected, a
+@code{-4}
+qualifier preceding the host name forces resolution to the IPv4
+namespace, while a
+@code{-6}
+qualifier forces resolution to the IPv6 namespace.
+For examples and usage, see the
+@quotedblleft{}NTP Debugging Techniques@quotedblright{}
+page.
+
Specifying a
command line option other than
@code{-i}
@@ -76,7 +82,9 @@ Otherwise,
@code{ntpq}
will attempt to read
interactive format commands from the standard input.
+
@subsubsection Internal Commands
+
Interactive format commands consist of a keyword followed by zero
to four arguments.
Only enough characters of the full keyword to
@@ -86,41 +94,36 @@ A
number of interactive format commands are executed entirely within
the
@code{ntpq}
-utility itself and do not result in NTP mode 6
+utility itself and do not result in NTP
requests being sent to a server.
These are described following.
@table @asis
-@item @code{?} @code{[@kbd{command_keyword}]}
-@item @code{help} @code{[@kbd{command_keyword}]}
+@item @code{?} @code{[@kbd{command}]}
+@item @code{help} @code{[@kbd{command}]}
A
@quoteleft{}?@quoteright{}
-by itself will print a list of all the command
-keywords known to this incarnation of
+by itself will print a list of all the commands
+known to
@code{ntpq}
A
@quoteleft{}?@quoteright{}
-followed by a command keyword will print function and usage
+followed by a command name will print function and usage
information about the command.
-This command is probably a better
-source of information about
-@code{ntpq}
-than this manual
-page.
-@item @code{addvars} @kbd{variable_name}@code{[@code{=value}]} @code{...}
-@item @code{rmvars} @kbd{variable_name} @code{...}
+@item @code{addvars} @kbd{name}@code{[=@kbd{value}]}@code{[,...]}
+@item @code{rmvars} @kbd{name}@code{[,...]}
@item @code{clearvars}
@item @code{showvars}
-The data carried by NTP mode 6 messages consists of a list of
+The arguments to this command consist of a list of
items of the form
-@quoteleft{}variable_name=value@quoteright{},
+@kbd{name}@code{[=@kbd{value}]},
where the
-@quoteleft{}=value@quoteright{}
+.No = Ns Ar value
is ignored, and can be omitted,
in requests to the server to read variables.
The
@code{ntpq}
-utility maintains an internal list in which data to be included in control
-messages can be assembled, and sent using the
+utility maintains an internal list in which data to be included in
+messages can be assembled, and displayed or set using the
@code{readlist}
and
@code{writelist}
@@ -135,35 +138,31 @@ The
@code{rmvars}
command can be used to remove individual variables from the list,
while the
-@code{clearlist}
+@code{clearvars}
command removes all variables from the
list.
The
@code{showvars}
command displays the current list of optional variables.
-@item @code{authenticate} @code{[yes | no]}
+@item @code{authenticate} @code{[@code{yes}|@code{no}]}
Normally
@code{ntpq}
does not authenticate requests unless
they are write requests.
The command
-@quoteleft{}authenticate yes@quoteright{}
+@code{authenticate} @code{yes}
causes
@code{ntpq}
to send authentication with all requests it
makes.
Authenticated requests causes some servers to handle
-requests slightly differently, and can occasionally melt the CPU in
-fuzzballs if you turn authentication on before doing a
-@code{peer}
-display.
+requests slightly differently.
The command
-@quoteleft{}authenticate@quoteright{}
+@code{authenticate}
causes
@code{ntpq}
to display whether or not
-@code{ntpq}
-is currently autheinticating requests.
+it is currently authenticating requests.
@item @code{cooked}
Causes output from query commands to be "cooked", so that
variables which are recognized by
@@ -172,13 +171,13 @@ will have their
values reformatted for human consumption.
Variables which
@code{ntpq}
-thinks should have a decodable value but didn't are
+could not decode completely are
marked with a trailing
@quoteleft{}?@quoteright{}.
-@item @code{debug} @code{[@code{more} | @code{less} | @code{off}]}
+@item @code{debug} @code{[@code{more}|@code{less}|@code{off}]}
With no argument, displays the current debug level.
-Otherwise, the debug level is changed to the indicated level.
-@item @code{delay} @kbd{milliseconds}
+Otherwise, the debugging level is changed as indicated.
+@item @code{delay} @code{[@kbd{milliseconds}]}
Specify a time interval to be added to timestamps included in
requests which require authentication.
This is used to enable
@@ -187,14 +186,21 @@ or between machines whose clocks are unsynchronized.
Actually the
server does not now require timestamps in authenticated requests,
so this command may be obsolete.
+Without any arguments, displays the current delay.
+@item @code{drefid} @code{[@code{hash}|@code{ipv4}]}
+Display refids as IPv4 or hash.
+Without any arguments, displays whether refids are shown as IPv4
+addresses or hashes.
@item @code{exit}
Exit
@code{ntpq}
-@item @code{host} @kbd{hostname}
+@item @code{host} @code{[@kbd{name}]}
Set the host to which future queries will be sent.
-@kbd{hostname}
+The
+@kbd{name}
may be either a host name or a numeric address.
-@item @code{hostnames} @code{[@code{yes} | @code{no}]}
+Without any arguments, displays the current host.
+@item @code{hostnames} @code{[@code{yes}|@code{no}]}
If
@code{yes}
is specified, host names are printed in
@@ -209,7 +215,9 @@ unless
modified using the command line
@code{-n}
switch.
-@item @code{keyid} @kbd{keyid}
+Without any arguments, displays whether host names or numeric addresses
+are shown.
+@item @code{keyid} @code{[@kbd{keyid}]}
This command allows the specification of a key number to be
used to authenticate configuration requests.
This must correspond
@@ -217,18 +225,20 @@ to the
@code{controlkey}
key number the server has been configured to use for this
purpose.
-@item @code{keytype} @code{[@code{md5} | @code{OpenSSLDigestType}]}
-Specify the type of key to use for authenticating requests.
-@code{md5}
-is alway supported.
+Without any arguments, displays the current
+@kbd{keyid}.
+@item @code{keytype} @code{[@kbd{digest}]}
+Specify the digest algorithm to use for authenticating requests, with default
+@code{MD5}.
If
@code{ntpq}
-was built with OpenSSL support,
-any digest type supported by OpenSSL can also be provided.
+was built with OpenSSL support, and OpenSSL is installed,
+@kbd{digest}
+can be any message digest algorithm supported by OpenSSL.
If no argument is given, the current
-@code{keytype}
-is displayed.
-@item @code{ntpversion} @code{[@code{1} | @code{2} | @code{3} | @code{4}]}
+@code{keytype} @kbd{digest}
+algorithm used is displayed.
+@item @code{ntpversion} @code{[@code{1}|@code{2}|@code{3}|@code{4}]}
Sets the NTP version number which
@code{ntpq}
claims in
@@ -246,9 +256,11 @@ requests.
The password must correspond to the key configured for
use by the NTP server for this purpose if such requests are to be
successful.
-@code{poll}
+@item @code{poll} @code{[@kbd{n}]} @code{[@code{verbose}]}
+Poll an NTP server in client mode
@kbd{n}
-@code{verbose}
+times.
+Poll not implemented yet.
@item @code{quit}
Exit
@code{ntpq}
@@ -258,24 +270,28 @@ from the remote server.
The only formating/interpretation done on
the data is to transform nonascii data into a printable (but barely
understandable) form.
-@item @code{timeout} @kbd{milliseconds}
+@item @code{timeout} @code{[@kbd{milliseconds}]}
Specify a timeout period for responses to server queries.
The
default is about 5000 milliseconds.
+Without any arguments, displays the current timeout period.
Note that since
@code{ntpq}
retries each query once after a timeout, the total waiting time for
a timeout will be twice the timeout value set.
@item @code{version}
-Print the version of the
+Display the version of the
@code{ntpq}
program.
@end table
@subsubsection Control Message Commands
-Association IDs are used to identify system, peer and clock variables.
-System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace.
-Most control commands send a single mode-6 message to the server and expect a single response message.
+Association ids are used to identify system, peer and clock variables.
+System variables are assigned an association id of zero and system name
+space, while each association is assigned a nonzero association id and
+peer namespace.
+Most control commands send a single message to the server and expect a
+single response message.
The exceptions are the
@code{peers}
command, which sends a series of messages,
@@ -285,63 +301,121 @@ and
@code{mreadvar}
commands, which iterate over a range of associations.
@table @asis
+@item @code{apeers}
+Display a list of peers in the form:
+@example
+[tally]remote refid assid st t when pool reach delay offset jitter
+@end example
+where the output is just like the
+@code{peers}
+command except that the
+@code{refid}
+is displayed in hex format and the association number is also displayed.
@item @code{associations}
Display a list of mobilized associations in the form:
@example
ind assid status conf reach auth condition last_event cnt
@end example
@table @asis
-@item Sy String Ta Sy Description
+@item Sy Variable Ta Sy Description
@item @code{ind} @code{Ta} @code{index} @code{on} @code{this} @code{list}
-@item @code{assid} @code{Ta} @code{association} @code{ID}
+@item @code{assid} @code{Ta} @code{association} @code{id}
@item @code{status} @code{Ta} @code{peer} @code{status} @code{word}
-@item @code{conf} @code{Ta} @code{yes}: @code{persistent,} @code{no}: @code{ephemeral}
-@item @code{reach} @code{Ta} @code{yes}: @code{reachable,} @code{no}: @code{unreachable}
-@item @code{auth} @code{Ta} @code{ok}, @code{yes}, @code{bad} @code{and} @code{none}
-@item @code{condition} @code{Ta} @code{selection} @code{status} @code{(see} @code{the} @code{select} @code{field} @code{of} @code{the} @code{peer} @code{status} @code{word)}
-@item @code{last_event} @code{Ta} @code{event} @code{report} @code{(see} @code{the} @code{event} @code{field} @code{of} @code{the} @code{peer} @code{status} @code{word)}
-@item @code{cnt} @code{Ta} @code{event} @code{count} @code{(see} @code{the} @code{count} @code{field} @code{of} @code{the} @code{peer} @code{status} @code{word)}
+@item @code{conf} @code{Ta} @code{yes}: @code{No} @code{persistent,} @code{no}: @code{No} @code{ephemeral}
+@item @code{reach} @code{Ta} @code{yes}: @code{No} @code{reachable,} @code{no}: @code{No} @code{unreachable}
+@item @code{auth} @code{Ta} @code{ok}, @code{yes}, @code{bad} @code{No} @code{and} @code{none}
+@item @code{condition} @code{Ta} @code{selection} @code{status} @code{(see} @code{the} @code{select} @code{No} @code{field} @code{of} @code{the} @code{peer} @code{status} @code{word)}
+@item @code{last_event} @code{Ta} @code{event} @code{report} @code{(see} @code{the} @code{event} @code{No} @code{field} @code{of} @code{the} @code{peer} @code{status} @code{word)}
+@item @code{cnt} @code{Ta} @code{event} @code{count} @code{(see} @code{the} @code{count} @code{No} @code{field} @code{of} @code{the} @code{peer} @code{status} @code{word)}
@end table
@item @code{authinfo}
-Display the authentication statistics.
-@item @code{clockvar} @kbd{assocID} @code{[@kbd{name}@code{[@code{=}@kbd{value}]}]} @code{[...]}
-@item @code{cv} @kbd{assocID} @code{[@kbd{name}@code{[@code{=}@kbd{value}]}]} @code{[...]}
-Display a list of clock variables for those associations supporting a reference clock.
-@item @code{:config} @code{[...]}
-Send the remainder of the command line, including whitespace, to the server as a run-time configuration command in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.
+Display the authentication statistics counters:
+time since reset, stored keys, free keys, key lookups, keys not found,
+uncached keys, expired keys, encryptions, decryptions.
+@item @code{clocklist} @code{[@kbd{associd}]}
+@item @code{cl} @code{[@kbd{associd}]}
+Display all clock variables in the variable list for those associations
+supporting a reference clock.
+@item @code{clockvar} @code{[@kbd{associd}]} @code{[@kbd{name}@code{[=@kbd{value}]}]}@code{[,...]}
+@item @code{cv} @code{[@kbd{associd}]} @code{[@kbd{name}@code{[=@kbd{value}]}]}@code{[,...]}
+Display a list of clock variables for those associations supporting a
+reference clock.
+@item @code{:config} @kbd{configuration command line}
+Send the remainder of the command line, including whitespace, to the
+server as a run-time configuration command in the same format as a line
+in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is of course required.
@item @code{config-from-file} @kbd{filename}
-Send the each line of
+Send each line of
@kbd{filename}
-to the server as run-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required.
+to the server as run-time configuration commands in the same format as
+lines in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is required.
@item @code{ifstats}
-Display statistics for each local network address. Authentication is required.
+Display status and statistics counters for each local network interface address:
+interface number, interface name and address or broadcast, drop, flag,
+ttl, mc, received, sent, send failed, peers, uptime.
+Authentication is required.
@item @code{iostats}
-Display network and reference clock I/O statistics.
+Display network and reference clock I/O statistics:
+time since reset, receive buffers, free receive buffers, used receive buffers,
+low water refills, dropped packets, ignored packets, received packets,
+packets sent, packet send failures, input wakeups, useful input wakeups.
@item @code{kerninfo}
-Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.
+Display kernel loop and PPS statistics:
+associd, status, pll offset, pll frequency, maximum error,
+estimated error, kernel status, pll time constant, precision,
+frequency tolerance, pps frequency, pps stability, pps jitter,
+calibration interval, calibration cycles, jitter exceeded,
+stability exceeded, calibration errors.
+As with other ntpq output, times are in milliseconds; very small values
+may be shown as exponentials.
+The precision value displayed is in milliseconds as well, unlike the
+precision system variable.
@item @code{lassociations}
-Perform the same function as the associations command, except display mobilized and unmobilized associations.
-@item @code{lopeers} @code{[@code{-4} | @code{-6}]}
-Obtain and print a list of all peers and clients showing
-@kbd{dstadr}
-(associated with any given IP version).
-@item @code{lpeers} @code{[@code{-4} | @code{-6}]}
-Print a peer spreadsheet for the appropriate IP version(s).
-@kbd{dstadr}
-(associated with any given IP version).
+Perform the same function as the associations command, except display
+mobilized and unmobilized associations, including all clients.
+@item @code{lopeers} @code{[@code{-4}|@code{-6}]}
+Display a list of all peers and clients showing
+@code{dstadr}
+(associated with the given IP version).
+@item @code{lpassociations}
+Display the last obtained list of associations, including all clients.
+@item @code{lpeers} @code{[@code{-4}|@code{-6}]}
+Display a list of all peers and clients (associated with the given IP version).
@item @code{monstats}
-Display monitor facility statistics.
-@item @code{mrulist} @code{[@code{limited} | @code{kod} | @code{mincount}=@kbd{count} | @code{laddr}=@kbd{localaddr} | @code{sort}=@kbd{sortorder} | @code{resany}=@kbd{hexmask} | @code{resall}=@kbd{hexmask}]}
-Obtain and print traffic counts collected and maintained by the monitor facility.
+Display monitor facility status, statistics, and limits:
+enabled, addresses, peak addresses, maximum addresses,
+reclaim above count, reclaim older than, kilobytes, maximum kilobytes.
+@item @code{mreadlist} @kbd{associdlo} @kbd{associdhi}
+@item @code{mrl} @kbd{associdlo} @kbd{associdhi}
+Perform the same function as the
+@code{readlist}
+command for a range of association ids.
+@item @code{mreadvar} @kbd{associdlo} @kbd{associdhi} @code{[@kbd{name}]}@code{[,...]}
+This range may be determined from the list displayed by any
+command showing associations.
+@item @code{mrv} @kbd{associdlo} @kbd{associdhi} @code{[@kbd{name}]}@code{[,...]}
+Perform the same function as the
+@code{readvar}
+command for a range of association ids.
+This range may be determined from the list displayed by any
+command showing associations.
+@item @code{mrulist} @code{[@code{limited} | @code{kod} | @code{mincount}=@kbd{count} | @code{laddr}=@kbd{localaddr} | @code{sort}=@code{[-]}@kbd{sortorder} | @code{resany}=@kbd{hexmask} | @code{resall}=@kbd{hexmask}]}
+Display traffic counts of the most recently seen source addresses
+collected and maintained by the monitor facility.
With the exception of
-@code{sort}=@kbd{sortorder},
+@code{sort}=@code{[-]}@kbd{sortorder},
the options filter the list returned by
-@code{ntpd.}
+@code{ntpd(8)}.
The
@code{limited}
and
@code{kod}
-options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
+options return only entries representing client addresses from which the
+last packet received triggered either discarding or a KoD response.
The
@code{mincount}=@kbd{count}
option filters entries representing less than
@@ -362,18 +436,21 @@ The
@kbd{sortorder}
defaults to
@code{lstint}
-and may be any of
+and may be
@code{addr},
-@code{count},
@code{avgint},
+@code{count},
@code{lstint},
-or any of those preceded by a minus sign (hyphen) to reverse the sort order.
+or any of those preceded by
+@quoteleft{}-@quoteright{}
+to reverse the sort order.
The output columns are:
@table @asis
@item Column
Description
@item @code{lstint}
-Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by
+Interval in seconds between the receipt of the most recent packet from
+this address and the completion of the retrieval of the MRU list by
@code{ntpq}
@item @code{avgint}
Average interval in s between packets from this address.
@@ -381,7 +458,8 @@ Average interval in s between packets from this address.
Restriction flags associated with this address.
Most are copied unchanged from the matching
@code{restrict}
-command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
+command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless
+the last packet from this address triggered a rate control response.
@item @code{r}
Rate control indicator, either
a period,
@@ -399,23 +477,15 @@ Packets received from this address.
@item @code{rport}
Source port of last packet from this address.
@item @code{remote} @code{address}
-DNS name, numeric address, or address followed by
+host or DNS name, numeric address, or address followed by
claimed DNS name which could not be verified in parentheses.
@end table
-@item @code{mreadvar} @code{assocID} @code{assocID} @code{[@kbd{variable_name}@code{[=@kbd{value}]} ...]}
-@item @code{mrv} @code{assocID} @code{assocID} @code{[@kbd{variable_name}@code{[=@kbd{value}]} ...]}
-Perform the same function as the
-@code{readvar}
-command, except for a range of association IDs.
-This range is determined from the association list cached by the most recent
-@code{associations}
-command.
@item @code{opeers} @code{[@code{-4} | @code{-6}]}
Obtain and print the old-style list of all peers and clients showing
-@kbd{dstadr}
-(associated with any given IP version),
+@code{dstadr}
+(associated with the given IP version),
rather than the
-@kbd{refid}.
+@code{refid}.
@item @code{passociations}
Perform the same function as the
@code{associations}
@@ -436,21 +506,25 @@ field of the
.Lk decode.html#peer "peer status word"
@item @code{remote}
host name (or IP number) of peer.
-The value displayed will be truncated to 15 characters unless the
+The value displayed will be truncated to 15 characters unless the
+@code{ntpq}
@code{-w}
-flag is given, in which case the full value will be displayed
-on the first line,
-and the remaining data is displayed on the next line.
+option is given, in which case the full value will be displayed
+on the first line, and if too long,
+the remaining data will be displayed on the next line.
@item @code{refid}
-association ID or
+source IP address or
.Lk decode.html#kiss "'kiss code"
@item @code{st}
-stratum
+stratum: 0 for local reference clocks, 1 for servers with local
+reference clocks, ..., 16 for unsynchronized server clocks
@item @code{t}
@code{u}:
unicast or manycast client,
@code{b}:
broadcast or multicast client,
+@code{p}:
+pool source,
@code{l}:
local (reference clock),
@code{s}:
@@ -462,9 +536,12 @@ broadcast server,
@code{M}:
multicast server
@item @code{when}
-sec/min/hr since last received packet
+time in seconds, minutes, hours, or days since the last packet
+was received, or
+@quoteleft{}-@quoteright{}
+if a packet has never been received
@item @code{poll}
-poll interval (log2 s)
+poll interval (s)
@item @code{reach}
reach shift register (octal)
@item @code{delay}
@@ -472,110 +549,124 @@ roundtrip delay
@item @code{offset}
offset of server relative to this host
@item @code{jitter}
-jitter
+offset RMS error estimate.
@end table
-@item @code{apeers}
-Display a list of peers in the form:
-@example
-[tally]remote refid assid st t when pool reach delay offset jitter
-@end example
-where the output is just like the
-@code{peers}
-command except that the
-@code{refid}
-is displayed in hex format and the association number is also displayed.
-@item @code{pstats} @kbd{assocID}
-Show the statistics for the peer with the given
-@kbd{assocID}.
-@item @code{readlist} @kbd{assocID}
-@item @code{rl} @kbd{assocID}
-Read the system or peer variables included in the variable list.
-@item @code{readvar} @kbd{assocID} @kbd{name}@code{[=@kbd{value}]} @code{[, ...]}
-@item @code{rv} @kbd{assocID} @kbd{name}@code{[=@kbd{value}]} @code{[, ...]}
-Display the specified variables.
+@item @code{pstats} @kbd{associd}
+Display the statistics for the peer with the given
+@kbd{associd}:
+associd, status, remote host, local address, time last received,
+time until next send, reachability change, packets sent,
+packets received, bad authentication, bogus origin, duplicate,
+bad dispersion, bad reference time, candidate order.
+@item @code{readlist} @code{[@kbd{associd}]}
+@item @code{rl} @code{[@kbd{associd}]}
+Display all system or peer variables.
+If the
+@kbd{associd}
+is omitted, it is assumed to be zero.
+@item @code{readvar} @code{[@kbd{associd} @kbd{name}@code{[=@kbd{value}]} @code{[, ...]}]}
+@item @code{rv} @code{[@kbd{associd} @kbd{name}@code{[=@kbd{value}]} @code{[, ...]}]}
+Display the specified system or peer variables.
If
-@kbd{assocID}
+@kbd{associd}
is zero, the variables are from the
@ref{System Variables}
name space, otherwise they are from the
@ref{Peer Variables}
name space.
The
-@kbd{assocID}
+@kbd{associd}
is required, as the same name can occur in both spaces.
If no
@kbd{name}
is included, all operative variables in the name space are displayed.
-
In this case only, if the
-@kbd{assocID}
-is omitted, it is assumed zero.
+@kbd{associd}
+is omitted, it is assumed to be zero.
Multiple names are specified with comma separators and without whitespace.
Note that time values are represented in milliseconds
and frequency values in parts-per-million (PPM).
Some NTP timestamps are represented in the format
-YYYYMMDDTTTT ,
-where YYYY is the year,
-MM the month of year,
-DD the day of month and
-TTTT the time of day.
+@kbd{YYYY}@kbd{MM} @kbd{DD} @kbd{TTTT},
+where
+@kbd{YYYY}
+is the year,
+@kbd{MM}
+the month of year,
+@kbd{DD}
+the day of month and
+@kbd{TTTT}
+the time of day.
@item @code{reslist}
-Show the access control (restrict) list for
+Display the access control (restrict) list for
@code{ntpq}
-
+Authentication is required.
@item @code{saveconfig} @kbd{filename}
-Write the current configuration,
-including any runtime modifications given with
+Save the current configuration,
+including any runtime modifications made by
@code{:config}
or
@code{config-from-file},
-to the ntpd host's file
+to the NTP server host file
@kbd{filename}.
This command will be rejected by the server unless
.Lk miscopt.html#saveconfigdir "saveconfigdir"
appears in the
-@code{ntpd}
+@code{ntpd(8)}
configuration file.
@kbd{filename}
can use
-@code{strftime()}
-format specifies to substitute the current date and time, for example,
-@code{q]saveconfig} @code{ntp-%Y%m%d-%H%M%S.confq]}.
+@code{date(1)}
+format specifiers to substitute the current date and time, for
+example,
+@example
+@code{saveconfig} @file{ntp-%Y%m%d-%H%M%S.conf}.
+@end example
The filename used is stored in system variable
@code{savedconfig}.
Authentication is required.
+@item @code{sysinfo}
+Display system operational summary:
+associd, status, system peer, system peer mode, leap indicator,
+stratum, log2 precision, root delay, root dispersion,
+reference id, reference time, system jitter, clock jitter,
+clock wander, broadcast delay, symm. auth. delay.
+@item @code{sysstats}
+Display system uptime and packet counts maintained in the
+protocol module:
+uptime, sysstats reset, packets received, current version,
+older version, bad length or format, authentication failed,
+declined, restricted, rate limited, KoD responses,
+processed for time.
@item @code{timerstats}
-Display interval timer counters.
-@item @code{writelist} @kbd{assocID}
-Write the system or peer variables included in the variable list.
-@item @code{writevar} @kbd{assocID} @kbd{name}=@kbd{value} @code{[, ...]}
-Write the specified variables.
+Display interval timer counters:
+time since reset, timer overruns, calls to transmit.
+@item @code{writelist} @kbd{associd}
+Set all system or peer variables included in the variable list.
+@item @code{writevar} @kbd{associd} @kbd{name}=@kbd{value} @code{[, ...]}
+Set the specified variables in the variable list.
If the
-@kbd{assocID}
+@kbd{associd}
is zero, the variables are from the
@ref{System Variables}
name space, otherwise they are from the
@ref{Peer Variables}
name space.
The
-@kbd{assocID}
+@kbd{associd}
is required, as the same name can occur in both spaces.
-@item @code{sysinfo}
-Display operational summary.
-@item @code{sysstats}
-Print statistics counters maintained in the protocol module.
+Authentication is required.
@end table
@subsubsection Status Words and Kiss Codes
-
The current state of the operating program is shown
in a set of status words
maintained by the system.
Status information is also available on a per-association basis.
-These words are displayed in the
-@code{rv}
+These words are displayed by the
+@code{readlist}
and
-@code{as}
+@code{associations}
commands both in hexadecimal and in decoded short tip strings.
The codes, tips and short explanations are documented on the
.Lk decode.html "Event Messages and Status Words"
@@ -593,9 +684,10 @@ in the reference identifier field in various billboards.
@subsubsection System Variables
The following system variables appear in the
-@code{rv}
+@code{readlist}
billboard.
Not all variables are displayed in some configurations.
+
@table @asis
@item Variable
Description
@@ -617,25 +709,25 @@ precision (log2 s)
total roundtrip delay to the primary reference clock
@item @code{rootdisp}
total dispersion to the primary reference clock
+@item @code{refid}
+reference id or
+.Lk decode.html#kiss "kiss code"
+@item @code{reftime}
+reference time
+@item @code{clock}
+date and time of day
@item @code{peer}
-system peer association ID
+system peer association id
@item @code{tc}
time constant and poll exponent (log2 s) (3-17)
@item @code{mintc}
minimum time constant (log2 s) (3-10)
-@item @code{clock}
-date and time of day
-@item @code{refid}
-reference ID or
-.Lk decode.html#kiss "kiss code"
-@item @code{reftime}
-reference time
@item @code{offset}
-combined offset of server relative to this host
+combined offset of server relative to this host
+@item @code{frequency}
+frequency drift (PPM) relative to hardware clock
@item @code{sys_jitter}
combined system jitter
-@item @code{frequency}
-frequency offset (PPM) relative to hardware clock
@item @code{clk_wander}
clock frequency wander (PPM)
@item @code{clk_jitter}
@@ -655,7 +747,6 @@ When the NTPv4 daemon is compiled with the OpenSSL software library,
additional system variables are displayed,
including some or all of the following,
depending on the particular Autokey dance:
-
@table @asis
@item Variable
Description
@@ -678,7 +769,7 @@ NTP seconds when the certificate expires
@end table
@subsubsection Peer Variables
The following peer variables appear in the
-@code{rv}
+@code{readlist}
billboard for each association.
Not all variables are displayed in some configurations.
@@ -686,7 +777,7 @@ Not all variables are displayed in some configurations.
@item Variable
Description
@item @code{associd}
-association ID
+association id
@item @code{status}
.Lk decode.html#peer "peer status word"
@item @code{srcadr}
@@ -708,10 +799,12 @@ total roundtrip delay to the primary reference clock
@item @code{rootdisp}
total root dispersion to the primary reference clock
@item @code{refid}
-reference ID or
+reference id or
.Lk decode.html#kiss "kiss code"
@item @code{reftime}
reference time
+@item @code{rec}
+last packet received time
@item @code{reach}
reach register (octal)
@item @code{unreach}
@@ -729,6 +822,8 @@ headway (see
.Lk rate.html "Rate Management and the Kiss-o'-Death Packet" )
@item @code{flash}
.Lk decode.html#flash "flash status word"
+@item @code{keyid}
+symmetric key id
@item @code{offset}
filter offset
@item @code{delay}
@@ -737,8 +832,6 @@ filter delay
filter dispersion
@item @code{jitter}
filter jitter
-@item @code{ident}
-Autokey group name for this association
@item @code{bias}
unicast/broadcast bias
@item @code{xleave}
@@ -749,7 +842,8 @@ The
@code{bias}
variable is calculated when the first broadcast packet is received
after the calibration volley.
-It represents the offset of the broadcast subgraph relative to the unicast subgraph.
+It represents the offset of the broadcast subgraph relative to the
+unicast subgraph.
The
@code{xleave}
variable appears only for the interleaved symmetric and interleaved modes.
@@ -770,23 +864,25 @@ peer flags (see Autokey specification)
@item @code{signature}
OpenSSL digest/signature scheme
@item @code{initsequence}
-initial key ID
+initial key id
@item @code{initkey}
initial key index
@item @code{timestamp}
Autokey signature timestamp
+@item @code{ident}
+Autokey group name for this association
@end table
@subsubsection Clock Variables
The following clock variables appear in the
-@code{cv}
+@code{clocklist}
billboard for each association with a reference clock.
Not all variables are displayed in some configurations.
@table @asis
@item Variable
Description
@item @code{associd}
-association ID
+association id
@item @code{status}
.Lk decode.html#clock "clock status word"
@item @code{device}
@@ -808,7 +904,7 @@ fudge time 2
@item @code{stratum}
driver stratum
@item @code{refid}
-driver reference ID
+driver reference id
@item @code{flags}
driver flags
@end table
@@ -848,12 +944,12 @@ with a status code of 0.
@exampleindent 0
@example
-ntpq - standard NTP query program - Ver. 4.2.8p10-beta
+ntpq - standard NTP query program - Ver. 4.2.8p11
Usage: ntpq [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description
- -4 no ipv4 Force IPv4 DNS name resolution
+ -4 no ipv4 Force IPv4 name resolution
- prohibits the option 'ipv6'
- -6 no ipv6 Force IPv6 DNS name resolution
+ -6 no ipv6 Force IPv6 name resolution
- prohibits the option 'ipv4'
-c Str command run a command and exit
- may appear multiple times
@@ -899,7 +995,7 @@ Please send bug reports to: <http://bugs.ntp.org, bugs@@ntp.org>
@subsection ipv4 option (-4)
@cindex ntpq-ipv4
-This is the ``force ipv4 dns name resolution'' option.
+This is the ``force ipv4 name resolution'' option.
@noindent
This option has some usage constraints. It:
@@ -909,13 +1005,13 @@ must not appear in combination with any of the following options:
ipv6.
@end itemize
-Force DNS resolution of following host names on the command line
+Force resolution of following host names on the command line
to the IPv4 namespace.
@node ntpq ipv6
@subsection ipv6 option (-6)
@cindex ntpq-ipv6
-This is the ``force ipv6 dns name resolution'' option.
+This is the ``force ipv6 name resolution'' option.
@noindent
This option has some usage constraints. It:
@@ -925,7 +1021,7 @@ must not appear in combination with any of the following options:
ipv4.
@end itemize
-Force DNS resolution of following host names on the command line
+Force resolution of following host names on the command line
to the IPv6 namespace.
@node ntpq command
@subsection command option (-c)
@@ -967,7 +1063,7 @@ commands read from the standard input.
This is the ``numeric host addresses'' option.
Output all host addresses in dotted-quad numeric format rather than
-converting to the canonical host names.
+converting to the canonical host names.
@node ntpq old-rv
@subsection old-rv option
@cindex ntpq-old-rv
diff --git a/contrib/ntp/ntpq/ntpq-opts.c b/contrib/ntp/ntpq/ntpq-opts.c
index b2f9431..602d40f 100644
--- a/contrib/ntp/ntpq/ntpq-opts.c
+++ b/contrib/ntp/ntpq/ntpq-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.c)
*
- * It has been AutoGen-ed March 21, 2017 at 10:45:05 AM by AutoGen 5.18.5
+ * It has been AutoGen-ed February 27, 2018 at 05:15:12 PM by AutoGen 5.18.5
* From the definitions ntpq-opts.def
* and the template file options
*
@@ -68,8 +68,8 @@ extern FILE * option_usage_fp;
/**
* static const strings for ntpq options
*/
-static char const ntpq_opt_strs[1985] =
-/* 0 */ "ntpq 4.2.8p10\n"
+static char const ntpq_opt_strs[1977] =
+/* 0 */ "ntpq 4.2.8p11\n"
"Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
@@ -86,60 +86,60 @@ static char const ntpq_opt_strs[1985] =
"Time Foundation makes no representations about the suitability this\n"
"software for any purpose. It is provided \"as is\" without express or\n"
"implied warranty.\n\0"
-/* 1009 */ "Force IPv4 DNS name resolution\0"
-/* 1040 */ "IPV4\0"
-/* 1045 */ "ipv4\0"
-/* 1050 */ "Force IPv6 DNS name resolution\0"
-/* 1081 */ "IPV6\0"
-/* 1086 */ "ipv6\0"
-/* 1091 */ "run a command and exit\0"
-/* 1114 */ "COMMAND\0"
-/* 1122 */ "command\0"
-/* 1130 */ "Increase debug verbosity level\0"
-/* 1161 */ "DEBUG_LEVEL\0"
-/* 1173 */ "debug-level\0"
-/* 1185 */ "Set the debug verbosity level\0"
-/* 1215 */ "SET_DEBUG_LEVEL\0"
-/* 1231 */ "set-debug-level\0"
-/* 1247 */ "Force ntpq to operate in interactive mode\0"
-/* 1289 */ "INTERACTIVE\0"
-/* 1301 */ "interactive\0"
-/* 1313 */ "numeric host addresses\0"
-/* 1336 */ "NUMERIC\0"
-/* 1344 */ "numeric\0"
-/* 1352 */ "Always output status line with readvar\0"
-/* 1391 */ "OLD_RV\0"
-/* 1398 */ "old-rv\0"
-/* 1405 */ "Print a list of the peers\0"
-/* 1431 */ "PEERS\0"
-/* 1437 */ "peers\0"
-/* 1443 */ "Set default display type for S2+ refids\0"
-/* 1483 */ "REFID\0"
-/* 1489 */ "refid\0"
-/* 1495 */ "Display the full 'remote' value\0"
-/* 1527 */ "WIDE\0"
-/* 1532 */ "wide\0"
-/* 1537 */ "display extended usage information and exit\0"
-/* 1581 */ "help\0"
-/* 1586 */ "extended usage information passed thru pager\0"
-/* 1631 */ "more-help\0"
-/* 1641 */ "output version information and exit\0"
-/* 1677 */ "version\0"
-/* 1685 */ "save the option state to a config file\0"
-/* 1724 */ "save-opts\0"
-/* 1734 */ "load options from a config file\0"
-/* 1766 */ "LOAD_OPTS\0"
-/* 1776 */ "no-load-opts\0"
-/* 1789 */ "no\0"
-/* 1792 */ "NTPQ\0"
-/* 1797 */ "ntpq - standard NTP query program - Ver. 4.2.8p10\n"
+/* 1009 */ "Force IPv4 name resolution\0"
+/* 1036 */ "IPV4\0"
+/* 1041 */ "ipv4\0"
+/* 1046 */ "Force IPv6 name resolution\0"
+/* 1073 */ "IPV6\0"
+/* 1078 */ "ipv6\0"
+/* 1083 */ "run a command and exit\0"
+/* 1106 */ "COMMAND\0"
+/* 1114 */ "command\0"
+/* 1122 */ "Increase debug verbosity level\0"
+/* 1153 */ "DEBUG_LEVEL\0"
+/* 1165 */ "debug-level\0"
+/* 1177 */ "Set the debug verbosity level\0"
+/* 1207 */ "SET_DEBUG_LEVEL\0"
+/* 1223 */ "set-debug-level\0"
+/* 1239 */ "Force ntpq to operate in interactive mode\0"
+/* 1281 */ "INTERACTIVE\0"
+/* 1293 */ "interactive\0"
+/* 1305 */ "numeric host addresses\0"
+/* 1328 */ "NUMERIC\0"
+/* 1336 */ "numeric\0"
+/* 1344 */ "Always output status line with readvar\0"
+/* 1383 */ "OLD_RV\0"
+/* 1390 */ "old-rv\0"
+/* 1397 */ "Print a list of the peers\0"
+/* 1423 */ "PEERS\0"
+/* 1429 */ "peers\0"
+/* 1435 */ "Set default display type for S2+ refids\0"
+/* 1475 */ "REFID\0"
+/* 1481 */ "refid\0"
+/* 1487 */ "Display the full 'remote' value\0"
+/* 1519 */ "WIDE\0"
+/* 1524 */ "wide\0"
+/* 1529 */ "display extended usage information and exit\0"
+/* 1573 */ "help\0"
+/* 1578 */ "extended usage information passed thru pager\0"
+/* 1623 */ "more-help\0"
+/* 1633 */ "output version information and exit\0"
+/* 1669 */ "version\0"
+/* 1677 */ "save the option state to a config file\0"
+/* 1716 */ "save-opts\0"
+/* 1726 */ "load options from a config file\0"
+/* 1758 */ "LOAD_OPTS\0"
+/* 1768 */ "no-load-opts\0"
+/* 1781 */ "no\0"
+/* 1784 */ "NTPQ\0"
+/* 1789 */ "ntpq - standard NTP query program - Ver. 4.2.8p11\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
-/* 1917 */ "$HOME\0"
-/* 1923 */ ".\0"
-/* 1925 */ ".ntprc\0"
-/* 1932 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 1966 */ "ntpq 4.2.8p10\0"
-/* 1980 */ "hash";
+/* 1909 */ "$HOME\0"
+/* 1915 */ ".\0"
+/* 1917 */ ".ntprc\0"
+/* 1924 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 1958 */ "ntpq 4.2.8p11\0"
+/* 1972 */ "hash";
/**
* ipv4 option description with
@@ -148,9 +148,9 @@ static char const ntpq_opt_strs[1985] =
/** Descriptive text for the ipv4 option */
#define IPV4_DESC (ntpq_opt_strs+1009)
/** Upper-cased name for the ipv4 option */
-#define IPV4_NAME (ntpq_opt_strs+1040)
+#define IPV4_NAME (ntpq_opt_strs+1036)
/** Name string for the ipv4 option */
-#define IPV4_name (ntpq_opt_strs+1045)
+#define IPV4_name (ntpq_opt_strs+1041)
/** Other options that appear in conjunction with the ipv4 option */
static int const aIpv4CantList[] = {
INDEX_OPT_IPV6, NO_EQUIVALENT };
@@ -162,11 +162,11 @@ static int const aIpv4CantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the ipv6 option */
-#define IPV6_DESC (ntpq_opt_strs+1050)
+#define IPV6_DESC (ntpq_opt_strs+1046)
/** Upper-cased name for the ipv6 option */
-#define IPV6_NAME (ntpq_opt_strs+1081)
+#define IPV6_NAME (ntpq_opt_strs+1073)
/** Name string for the ipv6 option */
-#define IPV6_name (ntpq_opt_strs+1086)
+#define IPV6_name (ntpq_opt_strs+1078)
/** Other options that appear in conjunction with the ipv6 option */
static int const aIpv6CantList[] = {
INDEX_OPT_IPV4, NO_EQUIVALENT };
@@ -177,11 +177,11 @@ static int const aIpv6CantList[] = {
* command option description:
*/
/** Descriptive text for the command option */
-#define COMMAND_DESC (ntpq_opt_strs+1091)
+#define COMMAND_DESC (ntpq_opt_strs+1083)
/** Upper-cased name for the command option */
-#define COMMAND_NAME (ntpq_opt_strs+1114)
+#define COMMAND_NAME (ntpq_opt_strs+1106)
/** Name string for the command option */
-#define COMMAND_name (ntpq_opt_strs+1122)
+#define COMMAND_name (ntpq_opt_strs+1114)
/** Compiled in flag settings for the command option */
#define COMMAND_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -190,11 +190,11 @@ static int const aIpv6CantList[] = {
* debug-level option description:
*/
/** Descriptive text for the debug-level option */
-#define DEBUG_LEVEL_DESC (ntpq_opt_strs+1130)
+#define DEBUG_LEVEL_DESC (ntpq_opt_strs+1122)
/** Upper-cased name for the debug-level option */
-#define DEBUG_LEVEL_NAME (ntpq_opt_strs+1161)
+#define DEBUG_LEVEL_NAME (ntpq_opt_strs+1153)
/** Name string for the debug-level option */
-#define DEBUG_LEVEL_name (ntpq_opt_strs+1173)
+#define DEBUG_LEVEL_name (ntpq_opt_strs+1165)
/** Compiled in flag settings for the debug-level option */
#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
@@ -202,11 +202,11 @@ static int const aIpv6CantList[] = {
* set-debug-level option description:
*/
/** Descriptive text for the set-debug-level option */
-#define SET_DEBUG_LEVEL_DESC (ntpq_opt_strs+1185)
+#define SET_DEBUG_LEVEL_DESC (ntpq_opt_strs+1177)
/** Upper-cased name for the set-debug-level option */
-#define SET_DEBUG_LEVEL_NAME (ntpq_opt_strs+1215)
+#define SET_DEBUG_LEVEL_NAME (ntpq_opt_strs+1207)
/** Name string for the set-debug-level option */
-#define SET_DEBUG_LEVEL_name (ntpq_opt_strs+1231)
+#define SET_DEBUG_LEVEL_name (ntpq_opt_strs+1223)
/** Compiled in flag settings for the set-debug-level option */
#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -216,11 +216,11 @@ static int const aIpv6CantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the interactive option */
-#define INTERACTIVE_DESC (ntpq_opt_strs+1247)
+#define INTERACTIVE_DESC (ntpq_opt_strs+1239)
/** Upper-cased name for the interactive option */
-#define INTERACTIVE_NAME (ntpq_opt_strs+1289)
+#define INTERACTIVE_NAME (ntpq_opt_strs+1281)
/** Name string for the interactive option */
-#define INTERACTIVE_name (ntpq_opt_strs+1301)
+#define INTERACTIVE_name (ntpq_opt_strs+1293)
/** Other options that appear in conjunction with the interactive option */
static int const aInteractiveCantList[] = {
INDEX_OPT_COMMAND,
@@ -232,11 +232,11 @@ static int const aInteractiveCantList[] = {
* numeric option description:
*/
/** Descriptive text for the numeric option */
-#define NUMERIC_DESC (ntpq_opt_strs+1313)
+#define NUMERIC_DESC (ntpq_opt_strs+1305)
/** Upper-cased name for the numeric option */
-#define NUMERIC_NAME (ntpq_opt_strs+1336)
+#define NUMERIC_NAME (ntpq_opt_strs+1328)
/** Name string for the numeric option */
-#define NUMERIC_name (ntpq_opt_strs+1344)
+#define NUMERIC_name (ntpq_opt_strs+1336)
/** Compiled in flag settings for the numeric option */
#define NUMERIC_FLAGS (OPTST_DISABLED)
@@ -244,11 +244,11 @@ static int const aInteractiveCantList[] = {
* old-rv option description:
*/
/** Descriptive text for the old-rv option */
-#define OLD_RV_DESC (ntpq_opt_strs+1352)
+#define OLD_RV_DESC (ntpq_opt_strs+1344)
/** Upper-cased name for the old-rv option */
-#define OLD_RV_NAME (ntpq_opt_strs+1391)
+#define OLD_RV_NAME (ntpq_opt_strs+1383)
/** Name string for the old-rv option */
-#define OLD_RV_name (ntpq_opt_strs+1398)
+#define OLD_RV_name (ntpq_opt_strs+1390)
/** Compiled in flag settings for the old-rv option */
#define OLD_RV_FLAGS (OPTST_DISABLED)
@@ -257,11 +257,11 @@ static int const aInteractiveCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the peers option */
-#define PEERS_DESC (ntpq_opt_strs+1405)
+#define PEERS_DESC (ntpq_opt_strs+1397)
/** Upper-cased name for the peers option */
-#define PEERS_NAME (ntpq_opt_strs+1431)
+#define PEERS_NAME (ntpq_opt_strs+1423)
/** Name string for the peers option */
-#define PEERS_name (ntpq_opt_strs+1437)
+#define PEERS_name (ntpq_opt_strs+1429)
/** Other options that appear in conjunction with the peers option */
static int const aPeersCantList[] = {
INDEX_OPT_INTERACTIVE, NO_EQUIVALENT };
@@ -272,11 +272,11 @@ static int const aPeersCantList[] = {
* refid option description:
*/
/** Descriptive text for the refid option */
-#define REFID_DESC (ntpq_opt_strs+1443)
+#define REFID_DESC (ntpq_opt_strs+1435)
/** Upper-cased name for the refid option */
-#define REFID_NAME (ntpq_opt_strs+1483)
+#define REFID_NAME (ntpq_opt_strs+1475)
/** Name string for the refid option */
-#define REFID_name (ntpq_opt_strs+1489)
+#define REFID_name (ntpq_opt_strs+1481)
/** The compiled in default value for the refid option argument */
#define REFID_DFT_ARG ((char const*)REFID_IPV4)
/** Compiled in flag settings for the refid option */
@@ -287,22 +287,22 @@ static int const aPeersCantList[] = {
* wide option description:
*/
/** Descriptive text for the wide option */
-#define WIDE_DESC (ntpq_opt_strs+1495)
+#define WIDE_DESC (ntpq_opt_strs+1487)
/** Upper-cased name for the wide option */
-#define WIDE_NAME (ntpq_opt_strs+1527)
+#define WIDE_NAME (ntpq_opt_strs+1519)
/** Name string for the wide option */
-#define WIDE_name (ntpq_opt_strs+1532)
+#define WIDE_name (ntpq_opt_strs+1524)
/** Compiled in flag settings for the wide option */
#define WIDE_FLAGS (OPTST_DISABLED)
/*
* Help/More_Help/Version option descriptions:
*/
-#define HELP_DESC (ntpq_opt_strs+1537)
-#define HELP_name (ntpq_opt_strs+1581)
+#define HELP_DESC (ntpq_opt_strs+1529)
+#define HELP_name (ntpq_opt_strs+1573)
#ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC (ntpq_opt_strs+1586)
-#define MORE_HELP_name (ntpq_opt_strs+1631)
+#define MORE_HELP_DESC (ntpq_opt_strs+1578)
+#define MORE_HELP_name (ntpq_opt_strs+1623)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC HELP_DESC
@@ -315,14 +315,14 @@ static int const aPeersCantList[] = {
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-#define VER_DESC (ntpq_opt_strs+1641)
-#define VER_name (ntpq_opt_strs+1677)
-#define SAVE_OPTS_DESC (ntpq_opt_strs+1685)
-#define SAVE_OPTS_name (ntpq_opt_strs+1724)
-#define LOAD_OPTS_DESC (ntpq_opt_strs+1734)
-#define LOAD_OPTS_NAME (ntpq_opt_strs+1766)
-#define NO_LOAD_OPTS_name (ntpq_opt_strs+1776)
-#define LOAD_OPTS_pfx (ntpq_opt_strs+1789)
+#define VER_DESC (ntpq_opt_strs+1633)
+#define VER_name (ntpq_opt_strs+1669)
+#define SAVE_OPTS_DESC (ntpq_opt_strs+1677)
+#define SAVE_OPTS_name (ntpq_opt_strs+1716)
+#define LOAD_OPTS_DESC (ntpq_opt_strs+1726)
+#define LOAD_OPTS_NAME (ntpq_opt_strs+1758)
+#define NO_LOAD_OPTS_name (ntpq_opt_strs+1768)
+#define LOAD_OPTS_pfx (ntpq_opt_strs+1781)
#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
/**
* Declare option callback procedures
@@ -543,24 +543,24 @@ static tOptDesc optDesc[OPTION_CT] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of ntpq. */
-#define zPROGNAME (ntpq_opt_strs+1792)
+#define zPROGNAME (ntpq_opt_strs+1784)
/** Reference to the title line for ntpq usage. */
-#define zUsageTitle (ntpq_opt_strs+1797)
+#define zUsageTitle (ntpq_opt_strs+1789)
/** ntpq configuration file name. */
-#define zRcName (ntpq_opt_strs+1925)
+#define zRcName (ntpq_opt_strs+1917)
/** Directories to search for ntpq config files. */
static char const * const apzHomeList[3] = {
- ntpq_opt_strs+1917,
- ntpq_opt_strs+1923,
+ ntpq_opt_strs+1909,
+ ntpq_opt_strs+1915,
NULL };
/** The ntpq program bug email address. */
-#define zBugsAddr (ntpq_opt_strs+1932)
+#define zBugsAddr (ntpq_opt_strs+1924)
/** Clarification/explanation of what ntpq does. */
#define zExplain (NULL)
/** Extra detail explaining what ntpq does. */
#define zDetail (NULL)
/** The full version string for ntpq. */
-#define zFullVersion (ntpq_opt_strs+1966)
+#define zFullVersion (ntpq_opt_strs+1958)
/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
@@ -633,7 +633,7 @@ doOptRefid(tOptions* pOptions, tOptDesc* pOptDesc)
/* extracted from optmain.tlib near line 945 */
static char const * const names[2] = {
- ntpq_opt_strs+1980, ntpq_opt_strs+1045 };
+ ntpq_opt_strs+1972, ntpq_opt_strs+1041 };
if (pOptions <= OPTPROC_EMIT_LIMIT) {
(void) optionEnumerationVal(pOptions, pOptDesc, names, 2);
@@ -841,7 +841,7 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpqOptions.pzCopyright */
- puts(_("ntpq 4.2.8p10\n\
+ puts(_("ntpq 4.2.8p11\n\
Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
@@ -862,10 +862,10 @@ software for any purpose. It is provided \"as is\" without express or\n\
implied warranty.\n"));
/* referenced via ntpqOptions.pOptDesc->pzText */
- puts(_("Force IPv4 DNS name resolution"));
+ puts(_("Force IPv4 name resolution"));
/* referenced via ntpqOptions.pOptDesc->pzText */
- puts(_("Force IPv6 DNS name resolution"));
+ puts(_("Force IPv6 name resolution"));
/* referenced via ntpqOptions.pOptDesc->pzText */
puts(_("run a command and exit"));
@@ -910,11 +910,11 @@ implied warranty.\n"));
puts(_("load options from a config file"));
/* referenced via ntpqOptions.pzUsageTitle */
- puts(_("ntpq - standard NTP query program - Ver. 4.2.8p10\n\
+ puts(_("ntpq - standard NTP query program - Ver. 4.2.8p11\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
/* referenced via ntpqOptions.pzFullVersion */
- puts(_("ntpq 4.2.8p10"));
+ puts(_("ntpq 4.2.8p11"));
/* referenced via ntpqOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/contrib/ntp/ntpq/ntpq-opts.def b/contrib/ntp/ntpq/ntpq-opts.def
index 9232268..f34653d 100644
--- a/contrib/ntp/ntpq/ntpq-opts.def
+++ b/contrib/ntp/ntpq/ntpq-opts.def
@@ -14,9 +14,9 @@ flag = {
name = ipv4;
flags-cant = ipv6;
value = 4;
- descrip = "Force IPv4 DNS name resolution";
+ descrip = "Force IPv4 name resolution";
doc = <<- _EndOfDoc_
- Force DNS resolution of following host names on the command line
+ Force resolution of following host names on the command line
to the IPv4 namespace.
_EndOfDoc_;
};
@@ -25,9 +25,9 @@ flag = {
name = ipv6;
flags-cant = ipv4;
value = 6;
- descrip = "Force IPv6 DNS name resolution";
+ descrip = "Force IPv6 name resolution";
doc = <<- _EndOfDoc_
- Force DNS resolution of following host names on the command line
+ Force resolution of following host names on the command line
to the IPv6 namespace.
_EndOfDoc_;
};
@@ -67,7 +67,7 @@ flag = {
descrip = "numeric host addresses";
doc = <<- _EndOfDoc_
Output all host addresses in dotted-quad numeric format rather than
- converting to the canonical host names.
+ converting to the canonical host names.
_EndOfDoc_;
};
@@ -126,16 +126,12 @@ doc-section = {
ds-type = 'DESCRIPTION';
ds-format = 'mdoc';
ds-text = <<- _END_PROG_MDOC_DESCRIP
-
+.Pp
The
.Nm
-utility program is used to query NTP servers which
-implement the standard NTP mode 6 control message formats defined
-in Appendix B of the NTPv3 specification RFC1305, requesting
+utility program is used to query NTP servers to monitor NTP operations
+and performance, requesting
information about current state and/or changes in that state.
-The same formats are used in NTPv4, although some of the
-variables have changed and new ones added. The description on this
-page is for the NTPv4 variables.
The program may be run either in interactive mode or controlled using
command line arguments.
Requests to read and write arbitrary
@@ -146,7 +142,7 @@ The
utility can also obtain and print a
list of peers in a common format by sending multiple queries to the
server.
-
+.Pp
If one or more request options is included on the command line
when
.Nm
@@ -164,7 +160,7 @@ The
.Nm
utility will prompt for
commands if the standard input is a terminal device.
-
+.Pp
.Nm
uses NTP mode 6 packets to communicate with the
NTP server, and hence can be used to query any compatible server on
@@ -178,7 +174,17 @@ utility makes
one attempt to retransmit requests, and will time requests out if
the remote host is not heard from within a suitable timeout
time.
-
+.Pp
+Note that in contexts where a host name is expected, a
+.Fl 4
+qualifier preceding the host name forces resolution to the IPv4
+namespace, while a
+.Fl 6
+qualifier forces resolution to the IPv6 namespace.
+For examples and usage, see the
+.Dq NTP Debugging Techniques
+page.
+.Pp
Specifying a
command line option other than
.Fl i
@@ -191,53 +197,48 @@ Otherwise,
.Nm
will attempt to read
interactive format commands from the standard input.
+
.Ss "Internal Commands"
+.Pp
Interactive format commands consist of a keyword followed by zero
to four arguments.
Only enough characters of the full keyword to
uniquely identify the command need be typed.
-
+.Pp
A
number of interactive format commands are executed entirely within
the
.Nm
-utility itself and do not result in NTP mode 6
+utility itself and do not result in NTP
requests being sent to a server.
These are described following.
-.Bl -tag -width "? [command_keyword]" -compact -offset indent
-.It Ic ? Op Ar command_keyword
-.It Ic help Op Ar command_keyword
+.Bl -tag -width "help [command]" -compact -offset indent
+.It Ic ? Op Ar command
+.It Ic help Op Ar command
A
.Ql \&?
-by itself will print a list of all the command
-keywords known to this incarnation of
+by itself will print a list of all the commands
+known to
.Nm .
A
.Ql \&?
-followed by a command keyword will print function and usage
+followed by a command name will print function and usage
information about the command.
-This command is probably a better
-source of information about
-.Nm
-than this manual
-page.
-.It Ic addvars Ar variable_name Ns Xo Op Ic =value
-.Ic ...
-.Xc
-.It Ic rmvars Ar variable_name Ic ...
+.It Ic addvars Ar name Ns Oo \&= Ns Ar value Oc Ns Op ,...
+.It Ic rmvars Ar name Ns Op ,...
.It Ic clearvars
.It Ic showvars
-The data carried by NTP mode 6 messages consists of a list of
+The arguments to this command consist of a list of
items of the form
-.Ql variable_name=value ,
+.Ar name Ns Op \&= Ns Ar value ,
where the
-.Ql =value
+.No \&= Ns Ar value
is ignored, and can be omitted,
in requests to the server to read variables.
The
.Nm
-utility maintains an internal list in which data to be included in control
-messages can be assembled, and sent using the
+utility maintains an internal list in which data to be included in
+messages can be assembled, and displayed or set using the
.Ic readlist
and
.Ic writelist
@@ -252,35 +253,31 @@ The
.Ic rmvars
command can be used to remove individual variables from the list,
while the
-.Ic clearlist
+.Ic clearvars
command removes all variables from the
list.
The
.Ic showvars
command displays the current list of optional variables.
-.It Ic authenticate Op yes | no
+.It Ic authenticate Op Cm yes Ns | Ns Cm no
Normally
.Nm
does not authenticate requests unless
they are write requests.
The command
-.Ql authenticate yes
+.Ic authenticate Cm yes
causes
.Nm
to send authentication with all requests it
makes.
Authenticated requests causes some servers to handle
-requests slightly differently, and can occasionally melt the CPU in
-fuzzballs if you turn authentication on before doing a
-.Ic peer
-display.
+requests slightly differently.
The command
-.Ql authenticate
+.Ic authenticate
causes
.Nm
to display whether or not
-.Nm
-is currently autheinticating requests.
+it is currently authenticating requests.
.It Ic cooked
Causes output from query commands to be "cooked", so that
variables which are recognized by
@@ -289,20 +286,13 @@ will have their
values reformatted for human consumption.
Variables which
.Nm
-thinks should have a decodable value but didn't are
+could not decode completely are
marked with a trailing
.Ql \&? .
-.It Xo
-.Ic debug
-.Oo
-.Cm more |
-.Cm less |
-.Cm off
-.Oc
-.Xc
+.It Ic debug Op Cm more Ns | Ns Cm less Ns | Ns Cm off
With no argument, displays the current debug level.
-Otherwise, the debug level is changed to the indicated level.
-.It Ic delay Ar milliseconds
+Otherwise, the debugging level is changed as indicated.
+.It Ic delay Op Ar milliseconds
Specify a time interval to be added to timestamps included in
requests which require authentication.
This is used to enable
@@ -311,14 +301,21 @@ or between machines whose clocks are unsynchronized.
Actually the
server does not now require timestamps in authenticated requests,
so this command may be obsolete.
+Without any arguments, displays the current delay.
+.It Ic drefid Op Cm hash Ns | Ns Cm ipv4
+Display refids as IPv4 or hash.
+Without any arguments, displays whether refids are shown as IPv4
+addresses or hashes.
.It Ic exit
Exit
.Nm .
-.It Ic host Ar hostname
+.It Ic host Op Ar name
Set the host to which future queries will be sent.
-.Ar hostname
+The
+.Ar name
may be either a host name or a numeric address.
-.It Ic hostnames Op Cm yes | Cm no
+Without any arguments, displays the current host.
+.It Ic hostnames Op Cm yes Ns | Ns Cm no
If
.Cm yes
is specified, host names are printed in
@@ -333,7 +330,9 @@ unless
modified using the command line
.Fl n
switch.
-.It Ic keyid Ar keyid
+Without any arguments, displays whether host names or numeric addresses
+are shown.
+.It Ic keyid Op Ar keyid
This command allows the specification of a key number to be
used to authenticate configuration requests.
This must correspond
@@ -341,28 +340,20 @@ to the
.Cm controlkey
key number the server has been configured to use for this
purpose.
-.It Ic keytype Xo Oo
-.Cm md5 |
-.Cm OpenSSLDigestType
-.Oc
-.Xc
-Specify the type of key to use for authenticating requests.
-.Cm md5
-is alway supported.
+Without any arguments, displays the current
+.Ar keyid .
+.It Ic keytype Op Ar digest
+Specify the digest algorithm to use for authenticating requests, with default
+.Cm MD5 .
If
.Nm
-was built with OpenSSL support,
-any digest type supported by OpenSSL can also be provided.
+was built with OpenSSL support, and OpenSSL is installed,
+.Ar digest
+can be any message digest algorithm supported by OpenSSL.
If no argument is given, the current
-.Ic keytype
-is displayed.
-.It Ic ntpversion Xo Oo
-.Cm 1 |
-.Cm 2 |
-.Cm 3 |
-.Cm 4
-.Oc
-.Xc
+.Ic keytype Ar digest
+algorithm used is displayed.
+.It Ic ntpversion Op Cm 1 Ns | Ns Cm 2 Ns | Ns Cm 3 Ns | Ns Cm 4
Sets the NTP version number which
.Nm
claims in
@@ -380,13 +371,11 @@ requests.
The password must correspond to the key configured for
use by the NTP server for this purpose if such requests are to be
successful.
-.\" Not yet implemented.
-.\" .It Ic poll
-.\" .Op Ar n
-.\" .Op Ic verbose
-.\" Poll an NTP server in client mode
-.\" .Ar n
-.\" times.
+.It Ic poll Oo Ar n Oc Op Cm verbose
+Poll an NTP server in client mode
+.Ar n
+times.
+Poll not implemented yet.
.It Ic quit
Exit
.Nm .
@@ -396,96 +385,151 @@ from the remote server.
The only formating/interpretation done on
the data is to transform nonascii data into a printable (but barely
understandable) form.
-.It Ic timeout Ar milliseconds
+.It Ic timeout Op Ar milliseconds
Specify a timeout period for responses to server queries.
The
default is about 5000 milliseconds.
+Without any arguments, displays the current timeout period.
Note that since
.Nm
retries each query once after a timeout, the total waiting time for
a timeout will be twice the timeout value set.
.It Ic version
-Print the version of the
+Display the version of the
.Nm
program.
.El
.Ss "Control Message Commands"
-Association IDs are used to identify system, peer and clock variables.
-System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace.
-Most control commands send a single mode-6 message to the server and expect a single response message.
+Association ids are used to identify system, peer and clock variables.
+System variables are assigned an association id of zero and system name
+space, while each association is assigned a nonzero association id and
+peer namespace.
+Most control commands send a single message to the server and expect a
+single response message.
The exceptions are the
-.Li peers
+.Ic peers
command, which sends a series of messages,
and the
-.Li mreadlist
+.Ic mreadlist
and
-.Li mreadvar
+.Ic mreadvar
commands, which iterate over a range of associations.
.Bl -tag -width "something" -compact -offset indent
-.It Cm associations
+.It Ic apeers
+Display a list of peers in the form:
+.Dl [tally]remote refid assid st t when pool reach delay offset jitter
+where the output is just like the
+.Ic peers
+command except that the
+.Cm refid
+is displayed in hex format and the association number is also displayed.
+.It Ic associations
Display a list of mobilized associations in the form:
.Dl ind assid status conf reach auth condition last_event cnt
-.Bl -column -offset indent ".Sy Variable" ".Sy Description"
-.It Sy String Ta Sy Description
-.It Li ind Ta index on this list
-.It Li assid Ta association ID
-.It Li status Ta peer status word
-.It Li conf Ta Li yes : persistent, Li no : ephemeral
-.It Li reach Ta Li yes : reachable, Li no : unreachable
-.It Li auth Ta Li ok , Li yes , Li bad and Li none
-.It Li condition Ta selection status (see the Li select field of the peer status word)
-.It Li last_event Ta event report (see the Li event field of the peer status word)
-.It Li cnt Ta event count (see the Li count field of the peer status word)
+.Bl -column -offset indent ".Sy Variable" "see the select field of the peer status word"
+.It Sy Variable Ta Sy Description
+.It Cm ind Ta index on this list
+.It Cm assid Ta association id
+.It Cm status Ta peer status word
+.It Cm conf Ta Cm yes : No persistent, Cm no : No ephemeral
+.It Cm reach Ta Cm yes : No reachable, Cm no : No unreachable
+.It Cm auth Ta Cm ok , Cm yes , Cm bad No and Cm none
+.It Cm condition Ta selection status \&(see the Cm select No field of the peer status word\&)
+.It Cm last_event Ta event report \&(see the Cm event No field of the peer status word\&)
+.It Cm cnt Ta event count \&(see the Cm count No field of the peer status word\&)
.El
-.It Cm authinfo
-Display the authentication statistics.
-.It Cm clockvar Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ...
-.It Cm cv Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ...
-Display a list of clock variables for those associations supporting a reference clock.
-.It Cm :config Op ...
-Send the remainder of the command line, including whitespace, to the server as a run-time configuration command in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.
-.It Cm config-from-file Ar filename
-Send the each line of
+.It Ic authinfo
+Display the authentication statistics counters:
+time since reset, stored keys, free keys, key lookups, keys not found,
+uncached keys, expired keys, encryptions, decryptions.
+.It Ic clocklist Op Ar associd
+.It Ic cl Op Ar associd
+Display all clock variables in the variable list for those associations
+supporting a reference clock.
+.It Ic clockvar Oo Ar associd Oc Oo Ar name Ns Oo \&= Ns Ar value Oc Ns Oc Ns Op ,...
+.It Ic cv Oo Ar associd Oc Oo Ar name Ns Oo \&= Ns Ar value Oc Ns Oc Ns Op ,...
+Display a list of clock variables for those associations supporting a
+reference clock.
+.It Ic :config Ar "configuration command line"
+Send the remainder of the command line, including whitespace, to the
+server as a run-time configuration command in the same format as a line
+in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is of course required.
+.It Ic config-from-file Ar filename
+Send each line of
.Ar filename
-to the server as run-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required.
+to the server as run-time configuration commands in the same format as
+lines in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is required.
.It Ic ifstats
-Display statistics for each local network address. Authentication is required.
+Display status and statistics counters for each local network interface address:
+interface number, interface name and address or broadcast, drop, flag,
+ttl, mc, received, sent, send failed, peers, uptime.
+Authentication is required.
.It Ic iostats
-Display network and reference clock I/O statistics.
+Display network and reference clock I/O statistics:
+time since reset, receive buffers, free receive buffers, used receive buffers,
+low water refills, dropped packets, ignored packets, received packets,
+packets sent, packet send failures, input wakeups, useful input wakeups.
.It Ic kerninfo
-Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.
+Display kernel loop and PPS statistics:
+associd, status, pll offset, pll frequency, maximum error,
+estimated error, kernel status, pll time constant, precision,
+frequency tolerance, pps frequency, pps stability, pps jitter,
+calibration interval, calibration cycles, jitter exceeded,
+stability exceeded, calibration errors.
+As with other ntpq output, times are in milliseconds; very small values
+may be shown as exponentials.
+The precision value displayed is in milliseconds as well, unlike the
+precision system variable.
.It Ic lassociations
-Perform the same function as the associations command, except display mobilized and unmobilized associations.
-.It Ic lopeers Xo
-.Oo Ic -4 |
-.Ic -6
-.Oc
-.Xc
-Obtain and print a list of all peers and clients showing
-.Ar dstadr
-(associated with any given IP version).
-.It Ic lpeers Xo
-.Oo Ic -4 |
-.Ic -6
-.Oc
-.Xc
-Print a peer spreadsheet for the appropriate IP version(s).
-.Ar dstadr
-(associated with any given IP version).
+Perform the same function as the associations command, except display
+mobilized and unmobilized associations, including all clients.
+.It Ic lopeers Op Fl 4 Ns | Ns Fl 6
+Display a list of all peers and clients showing
+.Cm dstadr
+(associated with the given IP version).
+.It Ic lpassociations
+Display the last obtained list of associations, including all clients.
+.It Ic lpeers Op Fl 4 Ns | Ns Fl 6
+Display a list of all peers and clients (associated with the given IP version).
.It Ic monstats
-Display monitor facility statistics.
-.It Ic mrulist Oo Ic limited | Ic kod | Ic mincount Ns = Ns Ar count | Ic laddr Ns = Ns Ar localaddr | Ic sort Ns = Ns Ar sortorder | Ic resany Ns = Ns Ar hexmask | Ic resall Ns = Ns Ar hexmask Oc
-Obtain and print traffic counts collected and maintained by the monitor facility.
+Display monitor facility status, statistics, and limits:
+enabled, addresses, peak addresses, maximum addresses,
+reclaim above count, reclaim older than, kilobytes, maximum kilobytes.
+.It Ic mreadlist Ar associdlo Ar associdhi
+.It Ic mrl Ar associdlo Ar associdhi
+Perform the same function as the
+.Ic readlist
+command for a range of association ids.
+.It Ic mreadvar Ar associdlo Ar associdhi Oo Ar name Oc Ns Op ,...
+This range may be determined from the list displayed by any
+command showing associations.
+.It Ic mrv Ar associdlo Ar associdhi Oo Ar name Oc Ns Op ,...
+Perform the same function as the
+.Ic readvar
+command for a range of association ids.
+This range may be determined from the list displayed by any
+command showing associations.
+.It Xo Ic mrulist Oo Cm limited | Cm kod | Cm mincount Ns \&= Ns Ar count |
+.Cm laddr Ns \&= Ns Ar localaddr | Cm sort Ns \&= Ns Oo \&- Oc Ns Ar sortorder |
+.Cm resany Ns \&= Ns Ar hexmask | Cm resall Ns \&= Ns Ar hexmask Oc
+.Xc
+Display traffic counts of the most recently seen source addresses
+collected and maintained by the monitor facility.
With the exception of
-.Cm sort Ns = Ns Ar sortorder ,
+.Cm sort Ns \&= Ns Oo \&- Oc Ns Ar sortorder ,
the options filter the list returned by
-.Cm ntpd.
+.Xr ntpd 8 .
The
.Cm limited
and
.Cm kod
-options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
+options return only entries representing client addresses from which the
+last packet received triggered either discarding or a KoD response.
The
.Cm mincount Ns = Ns Ar count
option filters entries representing less than
@@ -506,18 +550,21 @@ The
.Ar sortorder
defaults to
.Cm lstint
-and may be any of
+and may be
.Cm addr ,
-.Cm count ,
.Cm avgint ,
+.Cm count ,
.Cm lstint ,
-or any of those preceded by a minus sign (hyphen) to reverse the sort order.
+or any of those preceded by
+.Ql \&-
+to reverse the sort order.
The output columns are:
.Bl -tag -width "something" -compact -offset indent
.It Column
Description
.It Ic lstint
-Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by
+Interval in seconds between the receipt of the most recent packet from
+this address and the completion of the retrieval of the MRU list by
.Nm .
.It Ic avgint
Average interval in s between packets from this address.
@@ -525,7 +572,8 @@ Average interval in s between packets from this address.
Restriction flags associated with this address.
Most are copied unchanged from the matching
.Ic restrict
-command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
+command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless
+the last packet from this address triggered a rate control response.
.It Ic r
Rate control indicator, either
a period,
@@ -543,27 +591,15 @@ Packets received from this address.
.It Ic rport
Source port of last packet from this address.
.It Ic remote address
-DNS name, numeric address, or address followed by
+host or DNS name, numeric address, or address followed by
claimed DNS name which could not be verified in parentheses.
.El
-.It Ic mreadvar assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ...
-.It Ic mrv assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ...
-Perform the same function as the
-.Ic readvar
-command, except for a range of association IDs.
-This range is determined from the association list cached by the most recent
-.Ic associations
-command.
-.It Ic opeers Xo
-.Oo Ic -4 |
-.Ic -6
-.Oc
-.Xc
+.It Ic opeers Op Fl 4 | Fl 6
Obtain and print the old-style list of all peers and clients showing
-.Ar dstadr
-(associated with any given IP version),
+.Cm dstadr
+(associated with the given IP version),
rather than the
-.Ar refid .
+.Cm refid .
.It Ic passociations
Perform the same function as the
.Ic associations
@@ -575,28 +611,32 @@ Display a list of peers in the form:
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic [tally]
+.It Cm [tally]
single-character code indicating current value of the
.Ic select
field of the
.Lk decode.html#peer "peer status word"
-.It Ic remote
+.It Cm remote
host name (or IP number) of peer.
-The value displayed will be truncated to 15 characters unless the
+The value displayed will be truncated to 15 characters unless the
+.Nm
.Fl w
-flag is given, in which case the full value will be displayed
-on the first line,
-and the remaining data is displayed on the next line.
-.It Ic refid
-association ID or
+option is given, in which case the full value will be displayed
+on the first line, and if too long,
+the remaining data will be displayed on the next line.
+.It Cm refid
+source IP address or
.Lk decode.html#kiss "'kiss code"
-.It Ic st
-stratum
-.It Ic t
+.It Cm st
+stratum: 0 for local reference clocks, 1 for servers with local
+reference clocks, ..., 16 for unsynchronized server clocks
+.It Cm t
.Ic u :
unicast or manycast client,
.Ic b :
broadcast or multicast client,
+.Ic p :
+pool source,
.Ic l :
local (reference clock),
.Ic s :
@@ -607,119 +647,136 @@ manycast server,
broadcast server,
.Ic M :
multicast server
-.It Ic when
-sec/min/hr since last received packet
-.It Ic poll
-poll interval (log2 s)
-.It Ic reach
+.It Cm when
+time in seconds, minutes, hours, or days since the last packet
+was received, or
+.Ql \&-
+if a packet has never been received
+.It Cm poll
+poll interval (s)
+.It Cm reach
reach shift register (octal)
-.It Ic delay
+.It Cm delay
roundtrip delay
-.It Ic offset
+.It Cm offset
offset of server relative to this host
-.It Ic jitter
-jitter
+.It Cm jitter
+offset RMS error estimate.
.El
-.It Ic apeers
-Display a list of peers in the form:
-.Dl [tally]remote refid assid st t when pool reach delay offset jitter
-where the output is just like the
-.Ic peers
-command except that the
-.Ic refid
-is displayed in hex format and the association number is also displayed.
-.It Ic pstats Ar assocID
-Show the statistics for the peer with the given
-.Ar assocID .
-.It Ic readlist Ar assocID
-.It Ic rl Ar assocID
-Read the system or peer variables included in the variable list.
-.It Ic readvar Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc
-.It Ic rv Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc
-Display the specified variables.
+.It Ic pstats Ar associd
+Display the statistics for the peer with the given
+.Ar associd :
+associd, status, remote host, local address, time last received,
+time until next send, reachability change, packets sent,
+packets received, bad authentication, bogus origin, duplicate,
+bad dispersion, bad reference time, candidate order.
+.It Ic readlist Op Ar associd
+.It Ic rl Op Ar associd
+Display all system or peer variables.
+If the
+.Ar associd
+is omitted, it is assumed to be zero.
+.It Ic readvar Op Ar associd Ar name Ns Oo Ns = Ns Ar value Oc Op , ...
+.It Ic rv Op Ar associd Ar name Ns Oo Ns = Ns Ar value Oc Op , ...
+Display the specified system or peer variables.
If
-.Ar assocID
+.Ar associd
is zero, the variables are from the
.Sx System Variables
name space, otherwise they are from the
.Sx Peer Variables
name space.
The
-.Ar assocID
+.Ar associd
is required, as the same name can occur in both spaces.
If no
.Ar name
is included, all operative variables in the name space are displayed.
-
In this case only, if the
-.Ar assocID
-is omitted, it is assumed zero.
+.Ar associd
+is omitted, it is assumed to be zero.
Multiple names are specified with comma separators and without whitespace.
Note that time values are represented in milliseconds
and frequency values in parts-per-million (PPM).
Some NTP timestamps are represented in the format
-YYYYMMDDTTTT ,
-where YYYY is the year,
-MM the month of year,
-DD the day of month and
-TTTT the time of day.
+.Ar YYYY Ns Ar MM Ar DD Ar TTTT ,
+where
+.Ar YYYY
+is the year,
+.Ar MM
+the month of year,
+.Ar DD
+the day of month and
+.Ar TTTT
+the time of day.
.It Ic reslist
-Show the access control (restrict) list for
+Display the access control (restrict) list for
.Nm .
-
+Authentication is required.
.It Ic saveconfig Ar filename
-Write the current configuration,
-including any runtime modifications given with
+Save the current configuration,
+including any runtime modifications made by
.Ic :config
or
.Ic config-from-file ,
-to the ntpd host's file
+to the NTP server host file
.Ar filename .
This command will be rejected by the server unless
.Lk miscopt.html#saveconfigdir "saveconfigdir"
appears in the
-.Ic ntpd
+.Xr ntpd 8
configuration file.
.Ar filename
can use
-.Xr strftime
-format specifies to substitute the current date and time, for example,
-.Ic q]saveconfig ntp-%Y%m%d-%H%M%S.confq] .
+.Xr date 1
+format specifiers to substitute the current date and time, for
+example,
+.D1 Ic saveconfig Pa ntp-%Y%m%d-%H%M%S.conf .
The filename used is stored in system variable
-.Ic savedconfig .
+.Cm savedconfig .
Authentication is required.
+.It Ic sysinfo
+Display system operational summary:
+associd, status, system peer, system peer mode, leap indicator,
+stratum, log2 precision, root delay, root dispersion,
+reference id, reference time, system jitter, clock jitter,
+clock wander, broadcast delay, symm. auth. delay.
+.It Ic sysstats
+Display system uptime and packet counts maintained in the
+protocol module:
+uptime, sysstats reset, packets received, current version,
+older version, bad length or format, authentication failed,
+declined, restricted, rate limited, KoD responses,
+processed for time.
.It Ic timerstats
-Display interval timer counters.
-.It Ic writelist Ar assocID
-Write the system or peer variables included in the variable list.
-.It Ic writevar Ar assocID Ar name Ns = Ns Ar value Op , ...
-Write the specified variables.
+Display interval timer counters:
+time since reset, timer overruns, calls to transmit.
+.It Ic writelist Ar associd
+Set all system or peer variables included in the variable list.
+.It Ic writevar Ar associd Ar name Ns = Ns Ar value Op , ...
+Set the specified variables in the variable list.
If the
-.Ar assocID
+.Ar associd
is zero, the variables are from the
.Sx System Variables
name space, otherwise they are from the
.Sx Peer Variables
name space.
The
-.Ar assocID
+.Ar associd
is required, as the same name can occur in both spaces.
-.It Ic sysinfo
-Display operational summary.
-.It Ic sysstats
-Print statistics counters maintained in the protocol module.
+Authentication is required.
.El
.Ss Status Words and Kiss Codes
-
The current state of the operating program is shown
in a set of status words
maintained by the system.
Status information is also available on a per-association basis.
-These words are displayed in the
-.Ic rv
+These words are displayed by the
+.Ic readlist
and
-.Ic as
+.Ic associations
commands both in hexadecimal and in decoded short tip strings.
The codes, tips and short explanations are documented on the
.Lk decode.html "Event Messages and Status Words"
@@ -737,58 +794,59 @@ in the reference identifier field in various billboards.
.Ss System Variables
The following system variables appear in the
-.Ic rv
+.Ic readlist
billboard.
Not all variables are displayed in some configurations.
+.Pp
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic status
+.It Cm status
.Lk decode.html#sys "system status word"
-.It Ic version
+.It Cm version
NTP software version and build time
-.It Ic processor
+.It Cm processor
hardware platform and version
-.It Ic system
+.It Cm system
operating system and version
-.It Ic leap
+.It Cm leap
leap warning indicator (0-3)
-.It Ic stratum
+.It Cm stratum
stratum (1-15)
-.It Ic precision
+.It Cm precision
precision (log2 s)
-.It Ic rootdelay
+.It Cm rootdelay
total roundtrip delay to the primary reference clock
-.It Ic rootdisp
+.It Cm rootdisp
total dispersion to the primary reference clock
-.It Ic peer
-system peer association ID
-.It Ic tc
-time constant and poll exponent (log2 s) (3-17)
-.It Ic mintc
-minimum time constant (log2 s) (3-10)
-.It Ic clock
-date and time of day
-.It Ic refid
-reference ID or
+.It Cm refid
+reference id or
.Lk decode.html#kiss "kiss code"
-.It Ic reftime
+.It Cm reftime
reference time
-.It Ic offset
-combined offset of server relative to this host
-.It Ic sys_jitter
+.It Ic clock
+date and time of day
+.It Cm peer
+system peer association id
+.It Cm tc
+time constant and poll exponent (log2 s) (3-17)
+.It Cm mintc
+minimum time constant (log2 s) (3-10)
+.It Cm offset
+combined offset of server relative to this host
+.It Cm frequency
+frequency drift (PPM) relative to hardware clock
+.It Cm sys_jitter
combined system jitter
-.It Ic frequency
-frequency offset (PPM) relative to hardware clock
-.It Ic clk_wander
+.It Cm clk_wander
clock frequency wander (PPM)
-.It Ic clk_jitter
+.It Cm clk_jitter
clock jitter
-.It Ic tai
+.It Cm tai
TAI-UTC offset (s)
-.It Ic leapsec
+.It Cm leapsec
NTP seconds when the next leap second is/was inserted
-.It Ic expire
+.It Cm expire
NTP seconds when the NIST leapseconds file expires
.El
The jitter and wander statistics are exponentially-weighted RMS averages.
@@ -799,103 +857,105 @@ When the NTPv4 daemon is compiled with the OpenSSL software library,
additional system variables are displayed,
including some or all of the following,
depending on the particular Autokey dance:
-
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic host
+.It Cm host
Autokey host name for this host
-.It Ic ident
+.It Cm ident
Autokey group name for this host
-.It Ic flags
+.It Cm flags
host flags (see Autokey specification)
-.It Ic digest
+.It Cm digest
OpenSSL message digest algorithm
-.It Ic signature
+.It Cm signature
OpenSSL digest/signature scheme
-.It Ic update
+.It Cm update
NTP seconds at last signature update
-.It Ic cert
+.It Cm cert
certificate subject, issuer and certificate flags
-.It Ic until
+.It Cm until
NTP seconds when the certificate expires
.El
.Ss Peer Variables
The following peer variables appear in the
-.Ic rv
+.Ic readlist
billboard for each association.
Not all variables are displayed in some configurations.
-
+.Pp
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic associd
-association ID
-.It Ic status
+.It Cm associd
+association id
+.It Cm status
.Lk decode.html#peer "peer status word"
-.It Ic srcadr
+.It Cm srcadr
source (remote) IP address
-.It Ic srcport
+.It Cm srcport
source (remote) port
-.It Ic dstadr
+.It Cm dstadr
destination (local) IP address
-.It Ic dstport
+.It Cm dstport
destination (local) port
-.It Ic leap
+.It Cm leap
leap indicator (0-3)
-.It Ic stratum
+.It Cm stratum
stratum (0-15)
-.It Ic precision
+.It Cm precision
precision (log2 s)
-.It Ic rootdelay
+.It Cm rootdelay
total roundtrip delay to the primary reference clock
-.It Ic rootdisp
+.It Cm rootdisp
total root dispersion to the primary reference clock
-.It Ic refid
-reference ID or
+.It Cm refid
+reference id or
.Lk decode.html#kiss "kiss code"
-.It Ic reftime
+.It Cm reftime
reference time
-.It Ic reach
+.It Cm rec
+last packet received time
+.It Cm reach
reach register (octal)
-.It Ic unreach
+.It Cm unreach
unreach counter
-.It Ic hmode
+.It Cm hmode
host mode (1-6)
-.It Ic pmode
+.It Cm pmode
peer mode (1-5)
-.It Ic hpoll
+.It Cm hpoll
host poll exponent (log2 s) (3-17)
-.It Ic ppoll
+.It Cm ppoll
peer poll exponent (log2 s) (3-17)
-.It Ic headway
+.It Cm headway
headway (see
.Lk rate.html "Rate Management and the Kiss-o'-Death Packet" )
-.It Ic flash
+.It Cm flash
.Lk decode.html#flash "flash status word"
-.It Ic offset
+.It Cm keyid
+symmetric key id
+.It Cm offset
filter offset
-.It Ic delay
+.It Cm delay
filter delay
-.It Ic dispersion
+.It Cm dispersion
filter dispersion
-.It Ic jitter
+.It Cm jitter
filter jitter
-.It Ic ident
-Autokey group name for this association
-.It Ic bias
+.It Cm bias
unicast/broadcast bias
-.It Ic xleave
+.It Cm xleave
interleave delay (see
.Lk xleave.html "NTP Interleaved Modes" )
.El
The
-.Ic bias
+.Cm bias
variable is calculated when the first broadcast packet is received
after the calibration volley.
-It represents the offset of the broadcast subgraph relative to the unicast subgraph.
+It represents the offset of the broadcast subgraph relative to the
+unicast subgraph.
The
-.Ic xleave
+.Cm xleave
variable appears only for the interleaved symmetric and interleaved modes.
It represents the internal queuing, buffering and transmission delays
for the preceding packet.
@@ -905,55 +965,57 @@ additional peer variables are displayed, including the following:
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic flags
+.It Cm flags
peer flags (see Autokey specification)
-.It Ic host
+.It Cm host
Autokey server name
-.It Ic flags
+.It Cm flags
peer flags (see Autokey specification)
-.It Ic signature
+.It Cm signature
OpenSSL digest/signature scheme
-.It Ic initsequence
-initial key ID
-.It Ic initkey
+.It Cm initsequence
+initial key id
+.It Cm initkey
initial key index
-.It Ic timestamp
+.It Cm timestamp
Autokey signature timestamp
+.It Cm ident
+Autokey group name for this association
.El
.Ss Clock Variables
The following clock variables appear in the
-.Ic cv
+.Ic clocklist
billboard for each association with a reference clock.
Not all variables are displayed in some configurations.
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic associd
-association ID
-.It Ic status
+.It Cm associd
+association id
+.It Cm status
.Lk decode.html#clock "clock status word"
-.It Ic device
+.It Cm device
device description
-.It Ic timecode
+.It Cm timecode
ASCII time code string (specific to device)
-.It Ic poll
+.It Cm poll
poll messages sent
-.It Ic noreply
+.It Cm noreply
no reply
-.It Ic badformat
+.It Cm badformat
bad format
-.It Ic baddata
+.It Cm baddata
bad date or time
-.It Ic fudgetime1
+.It Cm fudgetime1
fudge time 1
-.It Ic fudgetime2
+.It Cm fudgetime2
fudge time 2
-.It Ic stratum
+.It Cm stratum
driver stratum
-.It Ic refid
-driver reference ID
-.It Ic flags
+.It Cm refid
+driver reference id
+.It Cm flags
driver flags
.El
_END_PROG_MDOC_DESCRIP;
diff --git a/contrib/ntp/ntpq/ntpq-opts.h b/contrib/ntp/ntpq/ntpq-opts.h
index 60c4c20..ce90e50 100644
--- a/contrib/ntp/ntpq/ntpq-opts.h
+++ b/contrib/ntp/ntpq/ntpq-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.h)
*
- * It has been AutoGen-ed March 21, 2017 at 10:45:04 AM by AutoGen 5.18.5
+ * It has been AutoGen-ed February 27, 2018 at 05:15:12 PM by AutoGen 5.18.5
* From the definitions ntpq-opts.def
* and the template file options
*
@@ -84,9 +84,9 @@ typedef enum {
/** count of all options for ntpq */
#define OPTION_CT 16
/** ntpq version */
-#define NTPQ_VERSION "4.2.8p10"
+#define NTPQ_VERSION "4.2.8p11"
/** Full ntpq version text */
-#define NTPQ_FULL_VERSION "ntpq 4.2.8p10"
+#define NTPQ_FULL_VERSION "ntpq 4.2.8p11"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/contrib/ntp/ntpq/ntpq-subs.c b/contrib/ntp/ntpq/ntpq-subs.c
index 08f9d42..acc175d1 100644
--- a/contrib/ntp/ntpq/ntpq-subs.c
+++ b/contrib/ntp/ntpq/ntpq-subs.c
@@ -307,12 +307,12 @@ typedef struct ifstats_row_tag {
sockaddr_u bcast;
int enabled;
u_int flags;
- int mcast_count;
+ u_int mcast_count;
char name[32];
- int peer_count;
- int received;
- int sent;
- int send_errors;
+ u_int peer_count;
+ u_int received;
+ u_int sent;
+ u_int send_errors;
u_int ttl;
u_int uptime;
} ifstats_row;
@@ -1452,6 +1452,8 @@ when(
else
return 0;
+ if (ts->l_ui < lasttime->l_ui)
+ return -1;
return (ts->l_ui - lasttime->l_ui);
}
@@ -1490,7 +1492,14 @@ prettyinterval(
}
diff = (diff + 11) / 24;
- snprintf(buf, cb, "%ldd", diff);
+ if (diff <= 999) {
+ snprintf(buf, cb, "%ldd", diff);
+ return buf;
+ }
+
+ /* years are only approximated... */
+ diff = (long)floor(diff / 365.25 + 0.5);
+ snprintf(buf, cb, "%ldy", diff);
return buf;
}
@@ -1833,8 +1842,12 @@ doprintpeers(
if (!have_srchost)
strlcpy(clock_name, nntohost(&srcadr),
sizeof(clock_name));
+ /* wide and long source - space over on next line */
+ /* allow for host + sp if > 1 and regular tally + source + sp */
if (wideremote && 15 < strlen(clock_name))
- fprintf(fp, "%c%s\n ", c, clock_name);
+ fprintf(fp, "%c%s\n%*s", c, clock_name,
+ ((numhosts > 1) ? (int)maxhostlen + 1 : 0)
+ + 1 + 15 + 1, "");
else
fprintf(fp, "%c%-15.15s ", c, clock_name);
if (!have_da_rid) {
@@ -2225,14 +2238,13 @@ config (
col = -1;
if (1 == sscanf(resp, "column %d syntax error", &col)
&& col >= 0 && (size_t)col <= strlen(cfgcmd) + 1) {
- if (interactive) {
- printf("______"); /* "ntpq> " */
- printf("________"); /* ":config " */
- } else
+ if (interactive)
+ fputs(" *", stdout); /* "ntpq> :config " */
+ else
printf("%s\n", cfgcmd);
- for (i = 1; i < col; i++)
- putchar('_');
- printf("^\n");
+ for (i = 0; i < col; i++)
+ fputc('_', stdout);
+ fputs("^\n", stdout);
}
printf("%s\n", resp);
free(resp);
@@ -3277,7 +3289,7 @@ validate_ifnum(
return;
if (prow->ifnum + 1 <= ifnum) {
if (*pfields < IFSTATS_FIELDS)
- fprintf(fp, "Warning: incomplete row with %d (of %d) fields",
+ fprintf(fp, "Warning: incomplete row with %d (of %d) fields\n",
*pfields, IFSTATS_FIELDS);
*pfields = 0;
prow->ifnum = ifnum;
@@ -3314,7 +3326,7 @@ another_ifstats_field(
"==============================================================================\n");
*/
fprintf(fp,
- "%3u %-24.24s %c %4x %3d %2d %6d %6d %6d %5d %8d\n"
+ "%3u %-24.24s %c %4x %3u %2u %6u %6u %6u %5u %8d\n"
" %s\n",
prow->ifnum, prow->name,
(prow->enabled)
@@ -3414,7 +3426,7 @@ ifstats(
case 'm':
if (1 == sscanf(tag, mc_fmt, &ui) &&
- 1 == sscanf(val, "%d", &row.mcast_count))
+ 1 == sscanf(val, "%u", &row.mcast_count))
comprende = TRUE;
break;
@@ -3435,31 +3447,31 @@ ifstats(
case 'p':
if (1 == sscanf(tag, pc_fmt, &ui) &&
- 1 == sscanf(val, "%d", &row.peer_count))
+ 1 == sscanf(val, "%u", &row.peer_count))
comprende = TRUE;
break;
case 'r':
if (1 == sscanf(tag, rx_fmt, &ui) &&
- 1 == sscanf(val, "%d", &row.received))
+ 1 == sscanf(val, "%u", &row.received))
comprende = TRUE;
break;
case 't':
if (1 == sscanf(tag, tl_fmt, &ui) &&
- 1 == sscanf(val, "%d", &row.ttl))
+ 1 == sscanf(val, "%u", &row.ttl))
comprende = TRUE;
else if (1 == sscanf(tag, tx_fmt, &ui) &&
- 1 == sscanf(val, "%d", &row.sent))
+ 1 == sscanf(val, "%u", &row.sent))
comprende = TRUE;
else if (1 == sscanf(tag, txerr_fmt, &ui) &&
- 1 == sscanf(val, "%d", &row.send_errors))
+ 1 == sscanf(val, "%u", &row.send_errors))
comprende = TRUE;
break;
case 'u':
if (1 == sscanf(tag, up_fmt, &ui) &&
- 1 == sscanf(val, "%d", &row.uptime))
+ 1 == sscanf(val, "%u", &row.uptime))
comprende = TRUE;
break;
}
@@ -3472,7 +3484,7 @@ ifstats(
}
}
if (fields != IFSTATS_FIELDS)
- fprintf(fp, "Warning: incomplete row with %d (of %d) fields",
+ fprintf(fp, "Warning: incomplete row with %d (of %d) fields\n",
fields, IFSTATS_FIELDS);
fflush(fp);
@@ -3847,6 +3859,10 @@ sysstats(
VDC_INIT("ss_limited", "rate limited: ", NTP_STR),
VDC_INIT("ss_kodsent", "KoD responses: ", NTP_STR),
VDC_INIT("ss_processed", "processed for time: ", NTP_STR),
+#if 0
+ VDC_INIT("ss_lamport", "Lamport violations: ", NTP_STR),
+ VDC_INIT("ss_tsrounding", "bad timestamp rounding:", NTP_STR),
+#endif
VDC_INIT(NULL, NULL, 0)
};
diff --git a/contrib/ntp/ntpq/ntpq.1ntpqman b/contrib/ntp/ntpq/ntpq.1ntpqman
index 05c801b..2ef8a32 100644
--- a/contrib/ntp/ntpq/ntpq.1ntpqman
+++ b/contrib/ntp/ntpq/ntpq.1ntpqman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpq 1ntpqman "21 Mar 2017" "4.2.8p10" "User Commands"
+.TH ntpq 1ntpqman "27 Feb 2018" "4.2.8p11" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-P4aWgw/ag-p5aWew)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-D4aGRT/ag-Q4ayQT)
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:45:26 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:15:22 PM by AutoGen 5.18.5
.\" From the definitions ntpq-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -31,15 +31,14 @@
.ne 2
.SH DESCRIPTION
+.sp \n(Ppu
+.ne 2
+
The
\f\*[B-Font]ntpq\fP
-utility program is used to query NTP servers which
-implement the standard NTP mode 6 control message formats defined
-in Appendix B of the NTPv3 specification RFC1305, requesting
+utility program is used to query NTP servers to monitor NTP operations
+and performance, requesting
information about current state and/or changes in that state.
-The same formats are used in NTPv4, although some of the
-variables have changed and new ones added. The description on this
-page is for the NTPv4 variables.
The program may be run either in interactive mode or controlled using
command line arguments.
Requests to read and write arbitrary
@@ -50,6 +49,9 @@ The
utility can also obtain and print a
list of peers in a common format by sending multiple queries to the
server.
+.sp \n(Ppu
+.ne 2
+
If one or more request options is included on the command line
when
\f\*[B-Font]ntpq\fP
@@ -67,6 +69,9 @@ The
\f\*[B-Font]ntpq\fP
utility will prompt for
commands if the standard input is a terminal device.
+.sp \n(Ppu
+.ne 2
+
\f\*[B-Font]ntpq\fP
uses NTP mode 6 packets to communicate with the
NTP server, and hence can be used to query any compatible server on
@@ -80,6 +85,21 @@ utility makes
one attempt to retransmit requests, and will time requests out if
the remote host is not heard from within a suitable timeout
time.
+.sp \n(Ppu
+.ne 2
+
+Note that in contexts where a host name is expected, a
+\f\*[B-Font]\-4\f[]
+qualifier preceding the host name forces resolution to the IPv4
+namespace, while a
+\f\*[B-Font]\-6\f[]
+qualifier forces resolution to the IPv6 namespace.
+For examples and usage, see the
+\*[Lq]NTP Debugging Techniques\*[Rq]
+page.
+.sp \n(Ppu
+.ne 2
+
Specifying a
command line option other than
\f\*[B-Font]\-i\f[]
@@ -93,64 +113,65 @@ Otherwise,
will attempt to read
interactive format commands from the standard input.
.SS "Internal Commands"
+.sp \n(Ppu
+.ne 2
+
Interactive format commands consist of a keyword followed by zero
to four arguments.
Only enough characters of the full keyword to
uniquely identify the command need be typed.
+.sp \n(Ppu
+.ne 2
+
A
number of interactive format commands are executed entirely within
the
\f\*[B-Font]ntpq\fP
-utility itself and do not result in NTP mode 6
+utility itself and do not result in NTP
requests being sent to a server.
These are described following.
-.TP 20
-.NOP \f\*[B-Font]?\f[] [\f\*[I-Font]command_keyword\f[]]
+.TP 15
+.NOP \f\*[B-Font]?\f[] [\f\*[I-Font]command\f[]]
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]help\f[] [\f\*[I-Font]command_keyword\f[]]
+.TP 15
+.NOP \f\*[B-Font]help\f[] [\f\*[I-Font]command\f[]]
A
\[oq]\&?\[cq]
-by itself will print a list of all the command
-keywords known to this incarnation of
+by itself will print a list of all the commands
+known to
\f\*[B-Font]ntpq\fP.
A
\[oq]\&?\[cq]
-followed by a command keyword will print function and usage
+followed by a command name will print function and usage
information about the command.
-This command is probably a better
-source of information about
-\f\*[B-Font]ntpq\fP
-than this manual
-page.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]addvars\f[] \f\*[I-Font]variable_name\f[][\f\*[B-Font]=value\f[]] \f\*[B-Font]...\f[]
+.TP 15
+.NOP \f\*[B-Font]addvars\f[] \f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]][,...]
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]rmvars\f[] \f\*[I-Font]variable_name\f[] \f\*[B-Font]...\f[]
+.TP 15
+.NOP \f\*[B-Font]rmvars\f[] \f\*[I-Font]name\f[][,...]
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]clearvars\f[]
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]showvars\f[]
-The data carried by NTP mode 6 messages consists of a list of
+The arguments to this command consist of a list of
items of the form
-\[oq]variable_name=value\[cq],
+\f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]],
where the
-\[oq]=value\[cq]
+.NOP \&=\f\*[I-Font]value\f[]
is ignored, and can be omitted,
in requests to the server to read variables.
The
\f\*[B-Font]ntpq\fP
-utility maintains an internal list in which data to be included in control
-messages can be assembled, and sent using the
+utility maintains an internal list in which data to be included in
+messages can be assembled, and displayed or set using the
\f\*[B-Font]readlist\f[]
and
\f\*[B-Font]writelist\f[]
@@ -165,7 +186,7 @@ The
\f\*[B-Font]rmvars\f[]
command can be used to remove individual variables from the list,
while the
-\f\*[B-Font]clearlist\f[]
+\f\*[B-Font]clearvars\f[]
command removes all variables from the
list.
The
@@ -173,33 +194,29 @@ The
command displays the current list of optional variables.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]authenticate\f[] [yes | no]
+.TP 15
+.NOP \f\*[B-Font]authenticate\f[] [\f\*[B-Font]yes\f[]|\f\*[B-Font]no\f[]]
Normally
\f\*[B-Font]ntpq\fP
does not authenticate requests unless
they are write requests.
The command
-\[oq]authenticate yes\[cq]
+\f\*[B-Font]authenticate\f[] \f\*[B-Font]yes\f[]
causes
\f\*[B-Font]ntpq\fP
to send authentication with all requests it
makes.
Authenticated requests causes some servers to handle
-requests slightly differently, and can occasionally melt the CPU in
-fuzzballs if you turn authentication on before doing a
-\f\*[B-Font]peer\f[]
-display.
+requests slightly differently.
The command
-\[oq]authenticate\[cq]
+\f\*[B-Font]authenticate\f[]
causes
\f\*[B-Font]ntpq\fP
to display whether or not
-\f\*[B-Font]ntpq\fP
-is currently autheinticating requests.
+it is currently authenticating requests.
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]cooked\f[]
Causes output from query commands to be "cooked", so that
variables which are recognized by
@@ -208,19 +225,19 @@ will have their
values reformatted for human consumption.
Variables which
\f\*[B-Font]ntpq\fP
-thinks should have a decodable value but didn't are
+could not decode completely are
marked with a trailing
\[oq]\&?\[cq].
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]debug\f[] [\f\*[B-Font]more\f[] | \f\*[B-Font]less\f[] | \f\*[B-Font]off\f[]]
+.TP 15
+.NOP \f\*[B-Font]debug\f[] [\f\*[B-Font]more\f[]|\f\*[B-Font]less\f[]|\f\*[B-Font]off\f[]]
With no argument, displays the current debug level.
-Otherwise, the debug level is changed to the indicated level.
+Otherwise, the debugging level is changed as indicated.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]delay\f[] \f\*[I-Font]milliseconds\f[]
+.TP 15
+.NOP \f\*[B-Font]delay\f[] [\f\*[I-Font]milliseconds\f[]]
Specify a time interval to be added to timestamps included in
requests which require authentication.
This is used to enable
@@ -229,23 +246,33 @@ or between machines whose clocks are unsynchronized.
Actually the
server does not now require timestamps in authenticated requests,
so this command may be obsolete.
+Without any arguments, displays the current delay.
+.br
+.ns
+.TP 15
+.NOP \f\*[B-Font]drefid\f[] [\f\*[B-Font]hash\f[]|\f\*[B-Font]ipv4\f[]]
+Display refids as IPv4 or hash.
+Without any arguments, displays whether refids are shown as IPv4
+addresses or hashes.
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]exit\f[]
Exit
\f\*[B-Font]ntpq\fP.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]host\f[] \f\*[I-Font]hostname\f[]
+.TP 15
+.NOP \f\*[B-Font]host\f[] [\f\*[I-Font]name\f[]]
Set the host to which future queries will be sent.
-\f\*[I-Font]hostname\f[]
+The
+\f\*[I-Font]name\f[]
may be either a host name or a numeric address.
+Without any arguments, displays the current host.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]hostnames\f[] [\f\*[B-Font]yes\f[] | \f\*[B-Font]no\f[]]
+.TP 15
+.NOP \f\*[B-Font]hostnames\f[] [\f\*[B-Font]yes\f[]|\f\*[B-Font]no\f[]]
If
\f\*[B-Font]yes\f[]
is specified, host names are printed in
@@ -260,10 +287,12 @@ unless
modified using the command line
\f\*[B-Font]\-n\f[]
switch.
+Without any arguments, displays whether host names or numeric addresses
+are shown.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]keyid\f[] \f\*[I-Font]keyid\f[]
+.TP 15
+.NOP \f\*[B-Font]keyid\f[] [\f\*[I-Font]keyid\f[]]
This command allows the specification of a key number to be
used to authenticate configuration requests.
This must correspond
@@ -271,24 +300,26 @@ to the
\f\*[B-Font]controlkey\f[]
key number the server has been configured to use for this
purpose.
+Without any arguments, displays the current
+\f\*[I-Font]keyid\f[].
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]keytype\f[] [\f\*[B-Font]md5\f[] | \f\*[B-Font]OpenSSLDigestType\f[]]
-Specify the type of key to use for authenticating requests.
-\f\*[B-Font]md5\f[]
-is alway supported.
+.TP 15
+.NOP \f\*[B-Font]keytype\f[] [\f\*[I-Font]digest\f[]]
+Specify the digest algorithm to use for authenticating requests, with default
+\f\*[B-Font]MD5\f[].
If
\f\*[B-Font]ntpq\fP
-was built with OpenSSL support,
-any digest type supported by OpenSSL can also be provided.
+was built with OpenSSL support, and OpenSSL is installed,
+\f\*[I-Font]digest\f[]
+can be any message digest algorithm supported by OpenSSL.
If no argument is given, the current
-\f\*[B-Font]keytype\f[]
-is displayed.
+\f\*[B-Font]keytype\f[] \f\*[I-Font]digest\f[]
+algorithm used is displayed.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]ntpversion\f[] [\f\*[B-Font]1\f[] | \f\*[B-Font]2\f[] | \f\*[B-Font]3\f[] | \f\*[B-Font]4\f[]]
+.TP 15
+.NOP \f\*[B-Font]ntpversion\f[] [\f\*[B-Font]1\f[]|\f\*[B-Font]2\f[]|\f\*[B-Font]3\f[]|\f\*[B-Font]4\f[]]
Sets the NTP version number which
\f\*[B-Font]ntpq\fP
claims in
@@ -301,7 +332,7 @@ With no argument, displays the current NTP version that will be used
when communicating with servers.
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]passwd\f[]
This command prompts you to type in a password (which will not
be echoed) which will be used to authenticate configuration
@@ -309,22 +340,23 @@ requests.
The password must correspond to the key configured for
use by the NTP server for this purpose if such requests are to be
successful.
-.\" Not yet implemented.
-.\" .It Ic poll
-.\" .Op Ar n
-.\" .Op Ic verbose
-.\" Poll an NTP server in client mode
-.\" .Ar n
-.\" times.
.br
.ns
-.TP 20
+.TP 15
+.NOP \f\*[B-Font]poll\f[] [\f\*[I-Font]n\f[]] [\f\*[B-Font]verbose\f[]]
+Poll an NTP server in client mode
+\f\*[I-Font]n\f[]
+times.
+Poll not implemented yet.
+.br
+.ns
+.TP 15
.NOP \f\*[B-Font]quit\f[]
Exit
\f\*[B-Font]ntpq\fP.
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]raw\f[]
Causes all output from query commands is printed as received
from the remote server.
@@ -333,130 +365,214 @@ the data is to transform nonascii data into a printable (but barely
understandable) form.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]timeout\f[] \f\*[I-Font]milliseconds\f[]
+.TP 15
+.NOP \f\*[B-Font]timeout\f[] [\f\*[I-Font]milliseconds\f[]]
Specify a timeout period for responses to server queries.
The
default is about 5000 milliseconds.
+Without any arguments, displays the current timeout period.
Note that since
\f\*[B-Font]ntpq\fP
retries each query once after a timeout, the total waiting time for
a timeout will be twice the timeout value set.
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]version\f[]
-Print the version of the
+Display the version of the
\f\*[B-Font]ntpq\fP
program.
.PP
.SS "Control Message Commands"
-Association IDs are used to identify system, peer and clock variables.
-System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace.
-Most control commands send a single mode-6 message to the server and expect a single response message.
+Association ids are used to identify system, peer and clock variables.
+System variables are assigned an association id of zero and system name
+space, while each association is assigned a nonzero association id and
+peer namespace.
+Most control commands send a single message to the server and expect a
+single response message.
The exceptions are the
-\f[C]peers\f[]
+\f\*[B-Font]peers\f[]
command, which sends a series of messages,
and the
-\f[C]mreadlist\f[]
+\f\*[B-Font]mreadlist\f[]
and
-\f[C]mreadvar\f[]
+\f\*[B-Font]mreadvar\f[]
commands, which iterate over a range of associations.
.TP 10
+.NOP \f\*[B-Font]apeers\f[]
+Display a list of peers in the form:
+.Dl [tally]remote refid assid st t when pool reach delay offset jitter
+where the output is just like the
+\f\*[B-Font]peers\f[]
+command except that the
+\f\*[B-Font]refid\f[]
+is displayed in hex format and the association number is also displayed.
+.br
+.ns
+.TP 10
.NOP \f\*[B-Font]associations\f[]
Display a list of mobilized associations in the form:
.Dl ind assid status conf reach auth condition last_event cnt
.RS
.IP \fB\(bu\fP 2
-.IP \fB\(bu\fP 2 \f[C]ind\f[] \f[C]Ta\f[] \f[C]index\f[] \f[C]on\f[] \f[C]this\f[] \f[C]list\f[]
-.IP \fB\(bu\fP 2 \f[C]assid\f[] \f[C]Ta\f[] \f[C]association\f[] \f[C]ID\f[]
-.IP \fB\(bu\fP 2 \f[C]status\f[] \f[C]Ta\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word\f[]
-.IP \fB\(bu\fP 2 \f[C]conf\f[] \f[C]Ta\f[] \f[C]yes\f[]: \f[C]persistent,\f[] \f[C]no\f[]: \f[C]ephemeral\f[]
-.IP \fB\(bu\fP 2 \f[C]reach\f[] \f[C]Ta\f[] \f[C]yes\f[]: \f[C]reachable,\f[] \f[C]no\f[]: \f[C]unreachable\f[]
-.IP \fB\(bu\fP 2 \f[C]auth\f[] \f[C]Ta\f[] \f[C]ok\f[], \f[C]yes\f[], \f[C]bad\f[] \f[C]and\f[] \f[C]none\f[]
-.IP \fB\(bu\fP 2 \f[C]condition\f[] \f[C]Ta\f[] \f[C]selection\f[] \f[C]status\f[] \f[C](see\f[] \f[C]the\f[] \f[C]select\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
-.IP \fB\(bu\fP 2 \f[C]last_event\f[] \f[C]Ta\f[] \f[C]event\f[] \f[C]report\f[] \f[C](see\f[] \f[C]the\f[] \f[C]event\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
-.IP \fB\(bu\fP 2 \f[C]cnt\f[] \f[C]Ta\f[] \f[C]event\f[] \f[C]count\f[] \f[C](see\f[] \f[C]the\f[] \f[C]count\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]ind\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]index\f[] \f\*[B-Font]on\f[] \f\*[B-Font]this\f[] \f\*[B-Font]list\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]assid\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]association\f[] \f\*[B-Font]id\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]status\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]conf\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]yes\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]persistent,\f[] \f\*[B-Font]no\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]ephemeral\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]reach\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]yes\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]reachable,\f[] \f\*[B-Font]no\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]unreachable\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]auth\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]ok\f[], \f\*[B-Font]yes\f[], \f\*[B-Font]bad\f[] \f\*[B-Font]No\f[] \f\*[B-Font]and\f[] \f\*[B-Font]none\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]condition\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]selection\f[] \f\*[B-Font]status\f[] \f\*[B-Font]\&(see\f[] \f\*[B-Font]the\f[] \f\*[B-Font]select\f[] \f\*[B-Font]No\f[] \f\*[B-Font]field\f[] \f\*[B-Font]of\f[] \f\*[B-Font]the\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\&)\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]last_event\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]event\f[] \f\*[B-Font]report\f[] \f\*[B-Font]\&(see\f[] \f\*[B-Font]the\f[] \f\*[B-Font]event\f[] \f\*[B-Font]No\f[] \f\*[B-Font]field\f[] \f\*[B-Font]of\f[] \f\*[B-Font]the\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\&)\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]cnt\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]event\f[] \f\*[B-Font]count\f[] \f\*[B-Font]\&(see\f[] \f\*[B-Font]the\f[] \f\*[B-Font]count\f[] \f\*[B-Font]No\f[] \f\*[B-Font]field\f[] \f\*[B-Font]of\f[] \f\*[B-Font]the\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\&)\f[]
.RE
.br
.ns
.TP 10
.NOP \f\*[B-Font]authinfo\f[]
-Display the authentication statistics.
+Display the authentication statistics counters:
+time since reset, stored keys, free keys, key lookups, keys not found,
+uncached keys, expired keys, encryptions, decryptions.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]clocklist\f[] [\f\*[I-Font]associd\f[]]
.br
.ns
.TP 10
-.NOP \f\*[B-Font]clockvar\f[] \f\*[I-Font]assocID\f[] [\f\*[I-Font]name\f[][\f\*[B-Font]=\f[]\f\*[I-Font]value\f[]] [] ...]
+.NOP \f\*[B-Font]cl\f[] [\f\*[I-Font]associd\f[]]
+Display all clock variables in the variable list for those associations
+supporting a reference clock.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]cv\f[] \f\*[I-Font]assocID\f[] [\f\*[I-Font]name\f[][\f\*[B-Font]=\f[]\f\*[I-Font]value\f[]] [] ...]
-Display a list of clock variables for those associations supporting a reference clock.
+.NOP \f\*[B-Font]clockvar\f[] [\f\*[I-Font]associd\f[]] [\f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]][] ,...]
.br
.ns
.TP 10
-.NOP \f\*[B-Font]:config\f[] [...]
-Send the remainder of the command line, including whitespace, to the server as a run-time configuration command in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.
+.NOP \f\*[B-Font]cv\f[] [\f\*[I-Font]associd\f[]] [\f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]][] ,...]
+Display a list of clock variables for those associations supporting a
+reference clock.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]:config\f[] \f\*[I-Font]configuration command line\f[]
+Send the remainder of the command line, including whitespace, to the
+server as a run-time configuration command in the same format as a line
+in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is of course required.
.br
.ns
.TP 10
.NOP \f\*[B-Font]config-from-file\f[] \f\*[I-Font]filename\f[]
-Send the each line of
+Send each line of
\f\*[I-Font]filename\f[]
-to the server as run-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required.
+to the server as run-time configuration commands in the same format as
+lines in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is required.
.br
.ns
.TP 10
.NOP \f\*[B-Font]ifstats\f[]
-Display statistics for each local network address. Authentication is required.
+Display status and statistics counters for each local network interface address:
+interface number, interface name and address or broadcast, drop, flag,
+ttl, mc, received, sent, send failed, peers, uptime.
+Authentication is required.
.br
.ns
.TP 10
.NOP \f\*[B-Font]iostats\f[]
-Display network and reference clock I/O statistics.
+Display network and reference clock I/O statistics:
+time since reset, receive buffers, free receive buffers, used receive buffers,
+low water refills, dropped packets, ignored packets, received packets,
+packets sent, packet send failures, input wakeups, useful input wakeups.
.br
.ns
.TP 10
.NOP \f\*[B-Font]kerninfo\f[]
-Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.
+Display kernel loop and PPS statistics:
+associd, status, pll offset, pll frequency, maximum error,
+estimated error, kernel status, pll time constant, precision,
+frequency tolerance, pps frequency, pps stability, pps jitter,
+calibration interval, calibration cycles, jitter exceeded,
+stability exceeded, calibration errors.
+As with other ntpq output, times are in milliseconds; very small values
+may be shown as exponentials.
+The precision value displayed is in milliseconds as well, unlike the
+precision system variable.
.br
.ns
.TP 10
.NOP \f\*[B-Font]lassociations\f[]
-Perform the same function as the associations command, except display mobilized and unmobilized associations.
+Perform the same function as the associations command, except display
+mobilized and unmobilized associations, including all clients.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]lopeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
-Obtain and print a list of all peers and clients showing
-\f\*[I-Font]dstadr\f[]
-(associated with any given IP version).
+.NOP \f\*[B-Font]lopeers\f[] [\f\*[B-Font]\-4\f[]|\f\*[B-Font]\-6\f[]]
+Display a list of all peers and clients showing
+\f\*[B-Font]dstadr\f[]
+(associated with the given IP version).
.br
.ns
.TP 10
-.NOP \f\*[B-Font]lpeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
-Print a peer spreadsheet for the appropriate IP version(s).
-\f\*[I-Font]dstadr\f[]
-(associated with any given IP version).
+.NOP \f\*[B-Font]lpassociations\f[]
+Display the last obtained list of associations, including all clients.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]lpeers\f[] [\f\*[B-Font]\-4\f[]|\f\*[B-Font]\-6\f[]]
+Display a list of all peers and clients (associated with the given IP version).
.br
.ns
.TP 10
.NOP \f\*[B-Font]monstats\f[]
-Display monitor facility statistics.
+Display monitor facility status, statistics, and limits:
+enabled, addresses, peak addresses, maximum addresses,
+reclaim above count, reclaim older than, kilobytes, maximum kilobytes.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mreadlist\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[]
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mrl\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[]
+Perform the same function as the
+\f\*[B-Font]readlist\f[]
+command for a range of association ids.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mreadvar\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[] [\f\*[I-Font]name\f[]][,...]
+This range may be determined from the list displayed by any
+command showing associations.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]mrulist\f[] [\f\*[B-Font]limited\f[] | \f\*[B-Font]kod\f[] | \f\*[B-Font]mincount\f[]=\f\*[I-Font]count\f[] | \f\*[B-Font]laddr\f[]=\f\*[I-Font]localaddr\f[] | \f\*[B-Font]sort\f[]=\f\*[I-Font]sortorder\f[] | \f\*[B-Font]resany\f[]=\f\*[I-Font]hexmask\f[] | \f\*[B-Font]resall\f[]=\f\*[I-Font]hexmask\f[]]
-Obtain and print traffic counts collected and maintained by the monitor facility.
+.NOP \f\*[B-Font]mrv\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[] [\f\*[I-Font]name\f[]][,...]
+Perform the same function as the
+\f\*[B-Font]readvar\f[]
+command for a range of association ids.
+This range may be determined from the list displayed by any
+command showing associations.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mrulist\f[] [\f\*[B-Font]limited\f[] | \f\*[B-Font]kod\f[] | \f\*[B-Font]mincount\f[]\&=\f\*[I-Font]count\f[] | \f\*[B-Font]laddr\f[]\&=\f\*[I-Font]localaddr\f[] | \f\*[B-Font]sort\f[]\&=[\&-]\f\*[I-Font]sortorder\f[] | \f\*[B-Font]resany\f[]\&=\f\*[I-Font]hexmask\f[] | \f\*[B-Font]resall\f[]\&=\f\*[I-Font]hexmask\f[]]
+Display traffic counts of the most recently seen source addresses
+collected and maintained by the monitor facility.
With the exception of
-\f\*[B-Font]sort\f[]=\f\*[I-Font]sortorder\f[],
+\f\*[B-Font]sort\f[]\&=[\&-]\f\*[I-Font]sortorder\f[],
the options filter the list returned by
-\f\*[B-Font]ntpd.\f[]
+\fCntpd\f[]\fR(8)\f[].
The
\f\*[B-Font]limited\f[]
and
\f\*[B-Font]kod\f[]
-options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
+options return only entries representing client addresses from which the
+last packet received triggered either discarding or a KoD response.
The
\f\*[B-Font]mincount\f[]=\f\*[I-Font]count\f[]
option filters entries representing less than
@@ -477,12 +593,14 @@ The
\f\*[I-Font]sortorder\f[]
defaults to
\f\*[B-Font]lstint\f[]
-and may be any of
+and may be
\f\*[B-Font]addr\f[],
-\f\*[B-Font]count\f[],
\f\*[B-Font]avgint\f[],
+\f\*[B-Font]count\f[],
\f\*[B-Font]lstint\f[],
-or any of those preceded by a minus sign (hyphen) to reverse the sort order.
+or any of those preceded by
+\[oq]\&-\[cq]
+to reverse the sort order.
The output columns are:
.RS
.TP 10
@@ -492,7 +610,8 @@ Description
.ns
.TP 10
.NOP \f\*[B-Font]lstint\f[]
-Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by
+Interval in seconds between the receipt of the most recent packet from
+this address and the completion of the retrieval of the MRU list by
\f\*[B-Font]ntpq\fP.
.br
.ns
@@ -506,7 +625,8 @@ Average interval in s between packets from this address.
Restriction flags associated with this address.
Most are copied unchanged from the matching
\f\*[B-Font]restrict\f[]
-command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
+command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless
+the last packet from this address triggered a rate control response.
.br
.ns
.TP 10
@@ -542,32 +662,18 @@ Source port of last packet from this address.
.ns
.TP 10
.NOP \f\*[B-Font]remote\f[] \f\*[B-Font]address\f[]
-DNS name, numeric address, or address followed by
+host or DNS name, numeric address, or address followed by
claimed DNS name which could not be verified in parentheses.
.RE
.br
.ns
.TP 10
-.NOP \f\*[B-Font]mreadvar\f[] \f\*[B-Font]assocID\f[] \f\*[B-Font]assocID\f[] [\f\*[I-Font]variable_name\f[][=\f\*[I-Font]value\f[]]] ...
-.br
-.ns
-.TP 10
-.NOP \f\*[B-Font]mrv\f[] \f\*[B-Font]assocID\f[] \f\*[B-Font]assocID\f[] [\f\*[I-Font]variable_name\f[][=\f\*[I-Font]value\f[]]] ...
-Perform the same function as the
-\f\*[B-Font]readvar\f[]
-command, except for a range of association IDs.
-This range is determined from the association list cached by the most recent
-\f\*[B-Font]associations\f[]
-command.
-.br
-.ns
-.TP 10
.NOP \f\*[B-Font]opeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
Obtain and print the old-style list of all peers and clients showing
-\f\*[I-Font]dstadr\f[]
-(associated with any given IP version),
+\f\*[B-Font]dstadr\f[]
+(associated with the given IP version),
rather than the
-\f\*[I-Font]refid\f[].
+\f\*[B-Font]refid\f[].
.br
.ns
.TP 10
@@ -599,22 +705,24 @@ field of the
.TP 10
.NOP \f\*[B-Font]remote\f[]
host name (or IP number) of peer.
-The value displayed will be truncated to 15 characters unless the
+The value displayed will be truncated to 15 characters unless the
+\f\*[B-Font]ntpq\fP
\f\*[B-Font]\-w\f[]
-flag is given, in which case the full value will be displayed
-on the first line,
-and the remaining data is displayed on the next line.
+option is given, in which case the full value will be displayed
+on the first line, and if too long,
+the remaining data will be displayed on the next line.
.br
.ns
.TP 10
.NOP \f\*[B-Font]refid\f[]
-association ID or
+source IP address or
.Lk decode.html#kiss "'kiss code"
.br
.ns
.TP 10
.NOP \f\*[B-Font]st\f[]
-stratum
+stratum: 0 for local reference clocks, 1 for servers with local
+reference clocks, ..., 16 for unsynchronized server clocks
.br
.ns
.TP 10
@@ -623,6 +731,8 @@ stratum
unicast or manycast client,
\f\*[B-Font]b\f[]:
broadcast or multicast client,
+\f\*[B-Font]p\f[]:
+pool source,
\f\*[B-Font]l\f[]:
local (reference clock),
\f\*[B-Font]s\f[]:
@@ -637,12 +747,15 @@ multicast server
.ns
.TP 10
.NOP \f\*[B-Font]when\f[]
-sec/min/hr since last received packet
+time in seconds, minutes, hours, or days since the last packet
+was received, or
+\[oq]\&-\[cq]
+if a packet has never been received
.br
.ns
.TP 10
.NOP \f\*[B-Font]poll\f[]
-poll interval (log2 s)
+poll interval (s)
.br
.ns
.TP 10
@@ -662,143 +775,159 @@ offset of server relative to this host
.ns
.TP 10
.NOP \f\*[B-Font]jitter\f[]
-jitter
+offset RMS error estimate.
.RE
.br
.ns
.TP 10
-.NOP \f\*[B-Font]apeers\f[]
-Display a list of peers in the form:
-.Dl [tally]remote refid assid st t when pool reach delay offset jitter
-where the output is just like the
-\f\*[B-Font]peers\f[]
-command except that the
-\f\*[B-Font]refid\f[]
-is displayed in hex format and the association number is also displayed.
-.br
-.ns
-.TP 10
-.NOP \f\*[B-Font]pstats\f[] \f\*[I-Font]assocID\f[]
-Show the statistics for the peer with the given
-\f\*[I-Font]assocID\f[].
+.NOP \f\*[B-Font]pstats\f[] \f\*[I-Font]associd\f[]
+Display the statistics for the peer with the given
+\f\*[I-Font]associd\f[]:
+associd, status, remote host, local address, time last received,
+time until next send, reachability change, packets sent,
+packets received, bad authentication, bogus origin, duplicate,
+bad dispersion, bad reference time, candidate order.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]readlist\f[] \f\*[I-Font]assocID\f[]
+.NOP \f\*[B-Font]readlist\f[] [\f\*[I-Font]associd\f[]]
.br
.ns
.TP 10
-.NOP \f\*[B-Font]rl\f[] \f\*[I-Font]assocID\f[]
-Read the system or peer variables included in the variable list.
+.NOP \f\*[B-Font]rl\f[] [\f\*[I-Font]associd\f[]]
+Display all system or peer variables.
+If the
+\f\*[I-Font]associd\f[]
+is omitted, it is assumed to be zero.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]readvar\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]
+.NOP \f\*[B-Font]readvar\f[] [\f\*[I-Font]associd\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]]
.br
.ns
.TP 10
-.NOP \f\*[B-Font]rv\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]
-Display the specified variables.
+.NOP \f\*[B-Font]rv\f[] [\f\*[I-Font]associd\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]]
+Display the specified system or peer variables.
If
-\f\*[I-Font]assocID\f[]
+\f\*[I-Font]associd\f[]
is zero, the variables are from the
\fISystem\f[] \fIVariables\f[]
name space, otherwise they are from the
\fIPeer\f[] \fIVariables\f[]
name space.
The
-\f\*[I-Font]assocID\f[]
+\f\*[I-Font]associd\f[]
is required, as the same name can occur in both spaces.
If no
\f\*[I-Font]name\f[]
is included, all operative variables in the name space are displayed.
In this case only, if the
-\f\*[I-Font]assocID\f[]
-is omitted, it is assumed zero.
+\f\*[I-Font]associd\f[]
+is omitted, it is assumed to be zero.
Multiple names are specified with comma separators and without whitespace.
Note that time values are represented in milliseconds
and frequency values in parts-per-million (PPM).
Some NTP timestamps are represented in the format
-YYYYMMDDTTTT ,
-where YYYY is the year,
-MM the month of year,
-DD the day of month and
-TTTT the time of day.
+\f\*[I-Font]YYYY\f[]\f\*[I-Font]MM\f[] \f\*[I-Font]DD\f[] \f\*[I-Font]TTTT\f[],
+where
+\f\*[I-Font]YYYY\f[]
+is the year,
+\f\*[I-Font]MM\f[]
+the month of year,
+\f\*[I-Font]DD\f[]
+the day of month and
+\f\*[I-Font]TTTT\f[]
+the time of day.
.br
.ns
.TP 10
.NOP \f\*[B-Font]reslist\f[]
-Show the access control (restrict) list for
+Display the access control (restrict) list for
\f\*[B-Font]ntpq\fP.
+Authentication is required.
.br
.ns
.TP 10
.NOP \f\*[B-Font]saveconfig\f[] \f\*[I-Font]filename\f[]
-Write the current configuration,
-including any runtime modifications given with
+Save the current configuration,
+including any runtime modifications made by
\f\*[B-Font]:config\f[]
or
\f\*[B-Font]config-from-file\f[],
-to the ntpd host's file
+to the NTP server host file
\f\*[I-Font]filename\f[].
This command will be rejected by the server unless
.Lk miscopt.html#saveconfigdir "saveconfigdir"
appears in the
-\f\*[B-Font]ntpd\f[]
+\fCntpd\f[]\fR(8)\f[]
configuration file.
\f\*[I-Font]filename\f[]
can use
-\fCstrftime\f[]\fR()\f[]
-format specifies to substitute the current date and time, for example,
-\f\*[B-Font]q]saveconfig\f[] \f\*[B-Font]ntp-%Y%m%d-%H%M%S.confq]\f[].
+\fCdate\f[]\fR(1)\f[]
+format specifiers to substitute the current date and time, for
+example,
+.in +4
+\f\*[B-Font]saveconfig\f[] \fIntp-%Y%m%d-%H%M%S.conf\f[].
+.in -4
The filename used is stored in system variable
\f\*[B-Font]savedconfig\f[].
Authentication is required.
.br
.ns
.TP 10
+.NOP \f\*[B-Font]sysinfo\f[]
+Display system operational summary:
+associd, status, system peer, system peer mode, leap indicator,
+stratum, log2 precision, root delay, root dispersion,
+reference id, reference time, system jitter, clock jitter,
+clock wander, broadcast delay, symm. auth. delay.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]sysstats\f[]
+Display system uptime and packet counts maintained in the
+protocol module:
+uptime, sysstats reset, packets received, current version,
+older version, bad length or format, authentication failed,
+declined, restricted, rate limited, KoD responses,
+processed for time.
+.br
+.ns
+.TP 10
.NOP \f\*[B-Font]timerstats\f[]
-Display interval timer counters.
+Display interval timer counters:
+time since reset, timer overruns, calls to transmit.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]writelist\f[] \f\*[I-Font]assocID\f[]
-Write the system or peer variables included in the variable list.
+.NOP \f\*[B-Font]writelist\f[] \f\*[I-Font]associd\f[]
+Set all system or peer variables included in the variable list.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]writevar\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[]=\f\*[I-Font]value\f[] [, ...]
-Write the specified variables.
+.NOP \f\*[B-Font]writevar\f[] \f\*[I-Font]associd\f[] \f\*[I-Font]name\f[]=\f\*[I-Font]value\f[] [, ...]
+Set the specified variables in the variable list.
If the
-\f\*[I-Font]assocID\f[]
+\f\*[I-Font]associd\f[]
is zero, the variables are from the
\fISystem\f[] \fIVariables\f[]
name space, otherwise they are from the
\fIPeer\f[] \fIVariables\f[]
name space.
The
-\f\*[I-Font]assocID\f[]
+\f\*[I-Font]associd\f[]
is required, as the same name can occur in both spaces.
-.br
-.ns
-.TP 10
-.NOP \f\*[B-Font]sysinfo\f[]
-Display operational summary.
-.br
-.ns
-.TP 10
-.NOP \f\*[B-Font]sysstats\f[]
-Print statistics counters maintained in the protocol module.
+Authentication is required.
.PP
.SS Status Words and Kiss Codes
The current state of the operating program is shown
in a set of status words
maintained by the system.
Status information is also available on a per-association basis.
-These words are displayed in the
-\f\*[B-Font]rv\f[]
+These words are displayed by the
+\f\*[B-Font]readlist\f[]
and
-\f\*[B-Font]as\f[]
+\f\*[B-Font]associations\f[]
commands both in hexadecimal and in decoded short tip strings.
The codes, tips and short explanations are documented on the
.Lk decode.html "Event Messages and Status Words"
@@ -817,9 +946,12 @@ They are now displayed, when appropriate,
in the reference identifier field in various billboards.
.SS System Variables
The following system variables appear in the
-\f\*[B-Font]rv\f[]
+\f\*[B-Font]readlist\f[]
billboard.
Not all variables are displayed in some configurations.
+.sp \n(Ppu
+.ne 2
+
.TP 10
.NOP Variable
Description
@@ -871,49 +1003,49 @@ total dispersion to the primary reference clock
.br
.ns
.TP 10
-.NOP \f\*[B-Font]peer\f[]
-system peer association ID
+.NOP \f\*[B-Font]refid\f[]
+reference id or
+.Lk decode.html#kiss "kiss code"
.br
.ns
.TP 10
-.NOP \f\*[B-Font]tc\f[]
-time constant and poll exponent (log2 s) (3-17)
+.NOP \f\*[B-Font]reftime\f[]
+reference time
.br
.ns
.TP 10
-.NOP \f\*[B-Font]mintc\f[]
-minimum time constant (log2 s) (3-10)
+.NOP \f\*[B-Font]clock\f[]
+date and time of day
.br
.ns
.TP 10
-.NOP \f\*[B-Font]clock\f[]
-date and time of day
+.NOP \f\*[B-Font]peer\f[]
+system peer association id
.br
.ns
.TP 10
-.NOP \f\*[B-Font]refid\f[]
-reference ID or
-.Lk decode.html#kiss "kiss code"
+.NOP \f\*[B-Font]tc\f[]
+time constant and poll exponent (log2 s) (3-17)
.br
.ns
.TP 10
-.NOP \f\*[B-Font]reftime\f[]
-reference time
+.NOP \f\*[B-Font]mintc\f[]
+minimum time constant (log2 s) (3-10)
.br
.ns
.TP 10
.NOP \f\*[B-Font]offset\f[]
-combined offset of server relative to this host
+combined offset of server relative to this host
.br
.ns
.TP 10
-.NOP \f\*[B-Font]sys_jitter\f[]
-combined system jitter
+.NOP \f\*[B-Font]frequency\f[]
+frequency drift (PPM) relative to hardware clock
.br
.ns
.TP 10
-.NOP \f\*[B-Font]frequency\f[]
-frequency offset (PPM) relative to hardware clock
+.NOP \f\*[B-Font]sys_jitter\f[]
+combined system jitter
.br
.ns
.TP 10
@@ -996,9 +1128,12 @@ NTP seconds when the certificate expires
.PP
.SS Peer Variables
The following peer variables appear in the
-\f\*[B-Font]rv\f[]
+\f\*[B-Font]readlist\f[]
billboard for each association.
Not all variables are displayed in some configurations.
+.sp \n(Ppu
+.ne 2
+
.TP 10
.NOP Variable
Description
@@ -1006,7 +1141,7 @@ Description
.ns
.TP 10
.NOP \f\*[B-Font]associd\f[]
-association ID
+association id
.br
.ns
.TP 10
@@ -1061,7 +1196,7 @@ total root dispersion to the primary reference clock
.ns
.TP 10
.NOP \f\*[B-Font]refid\f[]
-reference ID or
+reference id or
.Lk decode.html#kiss "kiss code"
.br
.ns
@@ -1071,6 +1206,11 @@ reference time
.br
.ns
.TP 10
+.NOP \f\*[B-Font]rec\f[]
+last packet received time
+.br
+.ns
+.TP 10
.NOP \f\*[B-Font]reach\f[]
reach register (octal)
.br
@@ -1112,6 +1252,11 @@ headway (see
.br
.ns
.TP 10
+.NOP \f\*[B-Font]keyid\f[]
+symmetric key id
+.br
+.ns
+.TP 10
.NOP \f\*[B-Font]offset\f[]
filter offset
.br
@@ -1132,11 +1277,6 @@ filter jitter
.br
.ns
.TP 10
-.NOP \f\*[B-Font]ident\f[]
-Autokey group name for this association
-.br
-.ns
-.TP 10
.NOP \f\*[B-Font]bias\f[]
unicast/broadcast bias
.br
@@ -1150,7 +1290,8 @@ The
\f\*[B-Font]bias\f[]
variable is calculated when the first broadcast packet is received
after the calibration volley.
-It represents the offset of the broadcast subgraph relative to the unicast subgraph.
+It represents the offset of the broadcast subgraph relative to the
+unicast subgraph.
The
\f\*[B-Font]xleave\f[]
variable appears only for the interleaved symmetric and interleaved modes.
@@ -1188,7 +1329,7 @@ OpenSSL digest/signature scheme
.ns
.TP 10
.NOP \f\*[B-Font]initsequence\f[]
-initial key ID
+initial key id
.br
.ns
.TP 10
@@ -1199,10 +1340,15 @@ initial key index
.TP 10
.NOP \f\*[B-Font]timestamp\f[]
Autokey signature timestamp
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]ident\f[]
+Autokey group name for this association
.PP
.SS Clock Variables
The following clock variables appear in the
-\f\*[B-Font]cv\f[]
+\f\*[B-Font]clocklist\f[]
billboard for each association with a reference clock.
Not all variables are displayed in some configurations.
.TP 10
@@ -1212,7 +1358,7 @@ Description
.ns
.TP 10
.NOP \f\*[B-Font]associd\f[]
-association ID
+association id
.br
.ns
.TP 10
@@ -1267,7 +1413,7 @@ driver stratum
.ns
.TP 10
.NOP \f\*[B-Font]refid\f[]
-driver reference ID
+driver reference id
.br
.ns
.TP 10
@@ -1277,19 +1423,19 @@ driver flags
.SH "OPTIONS"
.TP
.NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
-Force IPv4 DNS name resolution.
+Force IPv4 name resolution.
This option must not appear in combination with any of the following options:
ipv6.
.sp
-Force DNS resolution of following host names on the command line
+Force resolution of following host names on the command line
to the IPv4 namespace.
.TP
.NOP \f\*[B-Font]\-6\f[], \f\*[B-Font]\-\-ipv6\f[]
-Force IPv6 DNS name resolution.
+Force IPv6 name resolution.
This option must not appear in combination with any of the following options:
ipv4.
.sp
-Force DNS resolution of following host names on the command line
+Force resolution of following host names on the command line
to the IPv6 namespace.
.TP
.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]cmd\f[], \f\*[B-Font]\-\-command\f[]=\f\*[I-Font]cmd\f[]
@@ -1324,7 +1470,7 @@ commands read from the standard input.
numeric host addresses.
.sp
Output all host addresses in dotted-quad numeric format rather than
-converting to the canonical host names.
+converting to the canonical host names.
.TP
.NOP \f\*[B-Font]\-\-old\-rv\f[]
Always output status line with readvar.
diff --git a/contrib/ntp/ntpq/ntpq.1ntpqmdoc b/contrib/ntp/ntpq/ntpq.1ntpqmdoc
index 6badce0..1d801e9 100644
--- a/contrib/ntp/ntpq/ntpq.1ntpqmdoc
+++ b/contrib/ntp/ntpq/ntpq.1ntpqmdoc
@@ -1,9 +1,9 @@
-.Dd March 21 2017
+.Dd February 27 2018
.Dt NTPQ 1ntpqmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:45:31 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:15:28 PM by AutoGen 5.18.5
.\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -18,15 +18,12 @@
[ host ...]
.Pp
.Sh DESCRIPTION
+.Pp
The
.Nm
-utility program is used to query NTP servers which
-implement the standard NTP mode 6 control message formats defined
-in Appendix B of the NTPv3 specification RFC1305, requesting
+utility program is used to query NTP servers to monitor NTP operations
+and performance, requesting
information about current state and/or changes in that state.
-The same formats are used in NTPv4, although some of the
-variables have changed and new ones added. The description on this
-page is for the NTPv4 variables.
The program may be run either in interactive mode or controlled using
command line arguments.
Requests to read and write arbitrary
@@ -37,6 +34,7 @@ The
utility can also obtain and print a
list of peers in a common format by sending multiple queries to the
server.
+.Pp
If one or more request options is included on the command line
when
.Nm
@@ -54,6 +52,7 @@ The
.Nm
utility will prompt for
commands if the standard input is a terminal device.
+.Pp
.Nm
uses NTP mode 6 packets to communicate with the
NTP server, and hence can be used to query any compatible server on
@@ -67,6 +66,17 @@ utility makes
one attempt to retransmit requests, and will time requests out if
the remote host is not heard from within a suitable timeout
time.
+.Pp
+Note that in contexts where a host name is expected, a
+.Fl 4
+qualifier preceding the host name forces resolution to the IPv4
+namespace, while a
+.Fl 6
+qualifier forces resolution to the IPv6 namespace.
+For examples and usage, see the
+.Dq NTP Debugging Techniques
+page.
+.Pp
Specifying a
command line option other than
.Fl i
@@ -80,51 +90,46 @@ Otherwise,
will attempt to read
interactive format commands from the standard input.
.Ss "Internal Commands"
+.Pp
Interactive format commands consist of a keyword followed by zero
to four arguments.
Only enough characters of the full keyword to
uniquely identify the command need be typed.
+.Pp
A
number of interactive format commands are executed entirely within
the
.Nm
-utility itself and do not result in NTP mode 6
+utility itself and do not result in NTP
requests being sent to a server.
These are described following.
-.Bl -tag -width "? [command_keyword]" -compact -offset indent
-.It Ic ? Op Ar command_keyword
-.It Ic help Op Ar command_keyword
+.Bl -tag -width "help [command]" -compact -offset indent
+.It Ic ? Op Ar command
+.It Ic help Op Ar command
A
.Ql \&?
-by itself will print a list of all the command
-keywords known to this incarnation of
+by itself will print a list of all the commands
+known to
.Nm .
A
.Ql \&?
-followed by a command keyword will print function and usage
+followed by a command name will print function and usage
information about the command.
-This command is probably a better
-source of information about
-.Nm
-than this manual
-page.
-.It Ic addvars Ar variable_name Ns Xo Op Ic =value
-.Ic ...
-.Xc
-.It Ic rmvars Ar variable_name Ic ...
+.It Ic addvars Ar name Ns Oo \&= Ns Ar value Oc Ns Op ,...
+.It Ic rmvars Ar name Ns Op ,...
.It Ic clearvars
.It Ic showvars
-The data carried by NTP mode 6 messages consists of a list of
+The arguments to this command consist of a list of
items of the form
-.Ql variable_name=value ,
+.Ar name Ns Op \&= Ns Ar value ,
where the
-.Ql =value
+.No \&= Ns Ar value
is ignored, and can be omitted,
in requests to the server to read variables.
The
.Nm
-utility maintains an internal list in which data to be included in control
-messages can be assembled, and sent using the
+utility maintains an internal list in which data to be included in
+messages can be assembled, and displayed or set using the
.Ic readlist
and
.Ic writelist
@@ -139,35 +144,31 @@ The
.Ic rmvars
command can be used to remove individual variables from the list,
while the
-.Ic clearlist
+.Ic clearvars
command removes all variables from the
list.
The
.Ic showvars
command displays the current list of optional variables.
-.It Ic authenticate Op yes | no
+.It Ic authenticate Op Cm yes Ns | Ns Cm no
Normally
.Nm
does not authenticate requests unless
they are write requests.
The command
-.Ql authenticate yes
+.Ic authenticate Cm yes
causes
.Nm
to send authentication with all requests it
makes.
Authenticated requests causes some servers to handle
-requests slightly differently, and can occasionally melt the CPU in
-fuzzballs if you turn authentication on before doing a
-.Ic peer
-display.
+requests slightly differently.
The command
-.Ql authenticate
+.Ic authenticate
causes
.Nm
to display whether or not
-.Nm
-is currently autheinticating requests.
+it is currently authenticating requests.
.It Ic cooked
Causes output from query commands to be "cooked", so that
variables which are recognized by
@@ -176,20 +177,13 @@ will have their
values reformatted for human consumption.
Variables which
.Nm
-thinks should have a decodable value but didn't are
+could not decode completely are
marked with a trailing
.Ql \&? .
-.It Xo
-.Ic debug
-.Oo
-.Cm more |
-.Cm less |
-.Cm off
-.Oc
-.Xc
+.It Ic debug Op Cm more Ns | Ns Cm less Ns | Ns Cm off
With no argument, displays the current debug level.
-Otherwise, the debug level is changed to the indicated level.
-.It Ic delay Ar milliseconds
+Otherwise, the debugging level is changed as indicated.
+.It Ic delay Op Ar milliseconds
Specify a time interval to be added to timestamps included in
requests which require authentication.
This is used to enable
@@ -198,14 +192,21 @@ or between machines whose clocks are unsynchronized.
Actually the
server does not now require timestamps in authenticated requests,
so this command may be obsolete.
+Without any arguments, displays the current delay.
+.It Ic drefid Op Cm hash Ns | Ns Cm ipv4
+Display refids as IPv4 or hash.
+Without any arguments, displays whether refids are shown as IPv4
+addresses or hashes.
.It Ic exit
Exit
.Nm .
-.It Ic host Ar hostname
+.It Ic host Op Ar name
Set the host to which future queries will be sent.
-.Ar hostname
+The
+.Ar name
may be either a host name or a numeric address.
-.It Ic hostnames Op Cm yes | Cm no
+Without any arguments, displays the current host.
+.It Ic hostnames Op Cm yes Ns | Ns Cm no
If
.Cm yes
is specified, host names are printed in
@@ -220,7 +221,9 @@ unless
modified using the command line
.Fl n
switch.
-.It Ic keyid Ar keyid
+Without any arguments, displays whether host names or numeric addresses
+are shown.
+.It Ic keyid Op Ar keyid
This command allows the specification of a key number to be
used to authenticate configuration requests.
This must correspond
@@ -228,28 +231,20 @@ to the
.Cm controlkey
key number the server has been configured to use for this
purpose.
-.It Ic keytype Xo Oo
-.Cm md5 |
-.Cm OpenSSLDigestType
-.Oc
-.Xc
-Specify the type of key to use for authenticating requests.
-.Cm md5
-is alway supported.
+Without any arguments, displays the current
+.Ar keyid .
+.It Ic keytype Op Ar digest
+Specify the digest algorithm to use for authenticating requests, with default
+.Cm MD5 .
If
.Nm
-was built with OpenSSL support,
-any digest type supported by OpenSSL can also be provided.
+was built with OpenSSL support, and OpenSSL is installed,
+.Ar digest
+can be any message digest algorithm supported by OpenSSL.
If no argument is given, the current
-.Ic keytype
-is displayed.
-.It Ic ntpversion Xo Oo
-.Cm 1 |
-.Cm 2 |
-.Cm 3 |
-.Cm 4
-.Oc
-.Xc
+.Ic keytype Ar digest
+algorithm used is displayed.
+.It Ic ntpversion Op Cm 1 Ns | Ns Cm 2 Ns | Ns Cm 3 Ns | Ns Cm 4
Sets the NTP version number which
.Nm
claims in
@@ -267,13 +262,11 @@ requests.
The password must correspond to the key configured for
use by the NTP server for this purpose if such requests are to be
successful.
-.\" Not yet implemented.
-.\" .It Ic poll
-.\" .Op Ar n
-.\" .Op Ic verbose
-.\" Poll an NTP server in client mode
-.\" .Ar n
-.\" times.
+.It Ic poll Oo Ar n Oc Op Cm verbose
+Poll an NTP server in client mode
+.Ar n
+times.
+Poll not implemented yet.
.It Ic quit
Exit
.Nm .
@@ -283,95 +276,150 @@ from the remote server.
The only formating/interpretation done on
the data is to transform nonascii data into a printable (but barely
understandable) form.
-.It Ic timeout Ar milliseconds
+.It Ic timeout Op Ar milliseconds
Specify a timeout period for responses to server queries.
The
default is about 5000 milliseconds.
+Without any arguments, displays the current timeout period.
Note that since
.Nm
retries each query once after a timeout, the total waiting time for
a timeout will be twice the timeout value set.
.It Ic version
-Print the version of the
+Display the version of the
.Nm
program.
.El
.Ss "Control Message Commands"
-Association IDs are used to identify system, peer and clock variables.
-System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace.
-Most control commands send a single mode\-6 message to the server and expect a single response message.
+Association ids are used to identify system, peer and clock variables.
+System variables are assigned an association id of zero and system name
+space, while each association is assigned a nonzero association id and
+peer namespace.
+Most control commands send a single message to the server and expect a
+single response message.
The exceptions are the
-.Li peers
+.Ic peers
command, which sends a series of messages,
and the
-.Li mreadlist
+.Ic mreadlist
and
-.Li mreadvar
+.Ic mreadvar
commands, which iterate over a range of associations.
.Bl -tag -width "something" -compact -offset indent
-.It Cm associations
+.It Ic apeers
+Display a list of peers in the form:
+.Dl [tally]remote refid assid st t when pool reach delay offset jitter
+where the output is just like the
+.Ic peers
+command except that the
+.Cm refid
+is displayed in hex format and the association number is also displayed.
+.It Ic associations
Display a list of mobilized associations in the form:
.Dl ind assid status conf reach auth condition last_event cnt
-.Bl -column -offset indent ".Sy Variable" ".Sy Description"
-.It Sy String Ta Sy Description
-.It Li ind Ta index on this list
-.It Li assid Ta association ID
-.It Li status Ta peer status word
-.It Li conf Ta Li yes : persistent, Li no : ephemeral
-.It Li reach Ta Li yes : reachable, Li no : unreachable
-.It Li auth Ta Li ok , Li yes , Li bad and Li none
-.It Li condition Ta selection status (see the Li select field of the peer status word)
-.It Li last_event Ta event report (see the Li event field of the peer status word)
-.It Li cnt Ta event count (see the Li count field of the peer status word)
+.Bl -column -offset indent ".Sy Variable" "see the select field of the peer status word"
+.It Sy Variable Ta Sy Description
+.It Cm ind Ta index on this list
+.It Cm assid Ta association id
+.It Cm status Ta peer status word
+.It Cm conf Ta Cm yes : No persistent, Cm no : No ephemeral
+.It Cm reach Ta Cm yes : No reachable, Cm no : No unreachable
+.It Cm auth Ta Cm ok , Cm yes , Cm bad No and Cm none
+.It Cm condition Ta selection status \&(see the Cm select No field of the peer status word\&)
+.It Cm last_event Ta event report \&(see the Cm event No field of the peer status word\&)
+.It Cm cnt Ta event count \&(see the Cm count No field of the peer status word\&)
.El
-.It Cm authinfo
-Display the authentication statistics.
-.It Cm clockvar Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ...
-.It Cm cv Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ...
-Display a list of clock variables for those associations supporting a reference clock.
-.It Cm :config Op ...
-Send the remainder of the command line, including whitespace, to the server as a run\-time configuration command in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.
-.It Cm config\-from\-file Ar filename
-Send the each line of
+.It Ic authinfo
+Display the authentication statistics counters:
+time since reset, stored keys, free keys, key lookups, keys not found,
+uncached keys, expired keys, encryptions, decryptions.
+.It Ic clocklist Op Ar associd
+.It Ic cl Op Ar associd
+Display all clock variables in the variable list for those associations
+supporting a reference clock.
+.It Ic clockvar Oo Ar associd Oc Oo Ar name Ns Oo \&= Ns Ar value Oc Ns Oc Ns Op ,...
+.It Ic cv Oo Ar associd Oc Oo Ar name Ns Oo \&= Ns Ar value Oc Ns Oc Ns Op ,...
+Display a list of clock variables for those associations supporting a
+reference clock.
+.It Ic :config Ar "configuration command line"
+Send the remainder of the command line, including whitespace, to the
+server as a run\-time configuration command in the same format as a line
+in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is of course required.
+.It Ic config\-from\-file Ar filename
+Send each line of
.Ar filename
-to the server as run\-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required.
+to the server as run\-time configuration commands in the same format as
+lines in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is required.
.It Ic ifstats
-Display statistics for each local network address. Authentication is required.
+Display status and statistics counters for each local network interface address:
+interface number, interface name and address or broadcast, drop, flag,
+ttl, mc, received, sent, send failed, peers, uptime.
+Authentication is required.
.It Ic iostats
-Display network and reference clock I/O statistics.
+Display network and reference clock I/O statistics:
+time since reset, receive buffers, free receive buffers, used receive buffers,
+low water refills, dropped packets, ignored packets, received packets,
+packets sent, packet send failures, input wakeups, useful input wakeups.
.It Ic kerninfo
-Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.
+Display kernel loop and PPS statistics:
+associd, status, pll offset, pll frequency, maximum error,
+estimated error, kernel status, pll time constant, precision,
+frequency tolerance, pps frequency, pps stability, pps jitter,
+calibration interval, calibration cycles, jitter exceeded,
+stability exceeded, calibration errors.
+As with other ntpq output, times are in milliseconds; very small values
+may be shown as exponentials.
+The precision value displayed is in milliseconds as well, unlike the
+precision system variable.
.It Ic lassociations
-Perform the same function as the associations command, except display mobilized and unmobilized associations.
-.It Ic lopeers Xo
-.Oo Ic \-4 |
-.Ic \-6
-.Oc
-.Xc
-Obtain and print a list of all peers and clients showing
-.Ar dstadr
-(associated with any given IP version).
-.It Ic lpeers Xo
-.Oo Ic \-4 |
-.Ic \-6
-.Oc
-.Xc
-Print a peer spreadsheet for the appropriate IP version(s).
-.Ar dstadr
-(associated with any given IP version).
+Perform the same function as the associations command, except display
+mobilized and unmobilized associations, including all clients.
+.It Ic lopeers Op Fl 4 Ns | Ns Fl 6
+Display a list of all peers and clients showing
+.Cm dstadr
+(associated with the given IP version).
+.It Ic lpassociations
+Display the last obtained list of associations, including all clients.
+.It Ic lpeers Op Fl 4 Ns | Ns Fl 6
+Display a list of all peers and clients (associated with the given IP version).
.It Ic monstats
-Display monitor facility statistics.
-.It Ic mrulist Oo Ic limited | Ic kod | Ic mincount Ns = Ns Ar count | Ic laddr Ns = Ns Ar localaddr | Ic sort Ns = Ns Ar sortorder | Ic resany Ns = Ns Ar hexmask | Ic resall Ns = Ns Ar hexmask Oc
-Obtain and print traffic counts collected and maintained by the monitor facility.
+Display monitor facility status, statistics, and limits:
+enabled, addresses, peak addresses, maximum addresses,
+reclaim above count, reclaim older than, kilobytes, maximum kilobytes.
+.It Ic mreadlist Ar associdlo Ar associdhi
+.It Ic mrl Ar associdlo Ar associdhi
+Perform the same function as the
+.Ic readlist
+command for a range of association ids.
+.It Ic mreadvar Ar associdlo Ar associdhi Oo Ar name Oc Ns Op ,...
+This range may be determined from the list displayed by any
+command showing associations.
+.It Ic mrv Ar associdlo Ar associdhi Oo Ar name Oc Ns Op ,...
+Perform the same function as the
+.Ic readvar
+command for a range of association ids.
+This range may be determined from the list displayed by any
+command showing associations.
+.It Xo Ic mrulist Oo Cm limited | Cm kod | Cm mincount Ns \&= Ns Ar count |
+.Cm laddr Ns \&= Ns Ar localaddr | Cm sort Ns \&= Ns Oo \&\- Oc Ns Ar sortorder |
+.Cm resany Ns \&= Ns Ar hexmask | Cm resall Ns \&= Ns Ar hexmask Oc
+.Xc
+Display traffic counts of the most recently seen source addresses
+collected and maintained by the monitor facility.
With the exception of
-.Cm sort Ns = Ns Ar sortorder ,
+.Cm sort Ns \&= Ns Oo \&\- Oc Ns Ar sortorder ,
the options filter the list returned by
-.Cm ntpd.
+.Xr ntpd 8 .
The
.Cm limited
and
.Cm kod
-options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
+options return only entries representing client addresses from which the
+last packet received triggered either discarding or a KoD response.
The
.Cm mincount Ns = Ns Ar count
option filters entries representing less than
@@ -392,18 +440,21 @@ The
.Ar sortorder
defaults to
.Cm lstint
-and may be any of
+and may be
.Cm addr ,
-.Cm count ,
.Cm avgint ,
+.Cm count ,
.Cm lstint ,
-or any of those preceded by a minus sign (hyphen) to reverse the sort order.
+or any of those preceded by
+.Ql \&\-
+to reverse the sort order.
The output columns are:
.Bl -tag -width "something" -compact -offset indent
.It Column
Description
.It Ic lstint
-Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by
+Interval in seconds between the receipt of the most recent packet from
+this address and the completion of the retrieval of the MRU list by
.Nm .
.It Ic avgint
Average interval in s between packets from this address.
@@ -411,7 +462,8 @@ Average interval in s between packets from this address.
Restriction flags associated with this address.
Most are copied unchanged from the matching
.Ic restrict
-command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
+command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless
+the last packet from this address triggered a rate control response.
.It Ic r
Rate control indicator, either
a period,
@@ -429,27 +481,15 @@ Packets received from this address.
.It Ic rport
Source port of last packet from this address.
.It Ic remote address
-DNS name, numeric address, or address followed by
+host or DNS name, numeric address, or address followed by
claimed DNS name which could not be verified in parentheses.
.El
-.It Ic mreadvar assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ...
-.It Ic mrv assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ...
-Perform the same function as the
-.Ic readvar
-command, except for a range of association IDs.
-This range is determined from the association list cached by the most recent
-.Ic associations
-command.
-.It Ic opeers Xo
-.Oo Ic \-4 |
-.Ic \-6
-.Oc
-.Xc
+.It Ic opeers Op Fl 4 | Fl 6
Obtain and print the old\-style list of all peers and clients showing
-.Ar dstadr
-(associated with any given IP version),
+.Cm dstadr
+(associated with the given IP version),
rather than the
-.Ar refid .
+.Cm refid .
.It Ic passociations
Perform the same function as the
.Ic associations
@@ -461,28 +501,32 @@ Display a list of peers in the form:
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic [tally]
+.It Cm [tally]
single\-character code indicating current value of the
.Ic select
field of the
.Lk decode.html#peer "peer status word"
-.It Ic remote
+.It Cm remote
host name (or IP number) of peer.
-The value displayed will be truncated to 15 characters unless the
+The value displayed will be truncated to 15 characters unless the
+.Nm
.Fl w
-flag is given, in which case the full value will be displayed
-on the first line,
-and the remaining data is displayed on the next line.
-.It Ic refid
-association ID or
+option is given, in which case the full value will be displayed
+on the first line, and if too long,
+the remaining data will be displayed on the next line.
+.It Cm refid
+source IP address or
.Lk decode.html#kiss "'kiss code"
-.It Ic st
-stratum
-.It Ic t
+.It Cm st
+stratum: 0 for local reference clocks, 1 for servers with local
+reference clocks, ..., 16 for unsynchronized server clocks
+.It Cm t
.Ic u :
unicast or manycast client,
.Ic b :
broadcast or multicast client,
+.Ic p :
+pool source,
.Ic l :
local (reference clock),
.Ic s :
@@ -493,115 +537,135 @@ manycast server,
broadcast server,
.Ic M :
multicast server
-.It Ic when
-sec/min/hr since last received packet
-.It Ic poll
-poll interval (log2 s)
-.It Ic reach
+.It Cm when
+time in seconds, minutes, hours, or days since the last packet
+was received, or
+.Ql \&\-
+if a packet has never been received
+.It Cm poll
+poll interval (s)
+.It Cm reach
reach shift register (octal)
-.It Ic delay
+.It Cm delay
roundtrip delay
-.It Ic offset
+.It Cm offset
offset of server relative to this host
-.It Ic jitter
-jitter
+.It Cm jitter
+offset RMS error estimate.
.El
-.It Ic apeers
-Display a list of peers in the form:
-.Dl [tally]remote refid assid st t when pool reach delay offset jitter
-where the output is just like the
-.Ic peers
-command except that the
-.Ic refid
-is displayed in hex format and the association number is also displayed.
-.It Ic pstats Ar assocID
-Show the statistics for the peer with the given
-.Ar assocID .
-.It Ic readlist Ar assocID
-.It Ic rl Ar assocID
-Read the system or peer variables included in the variable list.
-.It Ic readvar Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc
-.It Ic rv Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc
-Display the specified variables.
+.It Ic pstats Ar associd
+Display the statistics for the peer with the given
+.Ar associd :
+associd, status, remote host, local address, time last received,
+time until next send, reachability change, packets sent,
+packets received, bad authentication, bogus origin, duplicate,
+bad dispersion, bad reference time, candidate order.
+.It Ic readlist Op Ar associd
+.It Ic rl Op Ar associd
+Display all system or peer variables.
+If the
+.Ar associd
+is omitted, it is assumed to be zero.
+.It Ic readvar Op Ar associd Ar name Ns Oo Ns = Ns Ar value Oc Op , ...
+.It Ic rv Op Ar associd Ar name Ns Oo Ns = Ns Ar value Oc Op , ...
+Display the specified system or peer variables.
If
-.Ar assocID
+.Ar associd
is zero, the variables are from the
.Sx System Variables
name space, otherwise they are from the
.Sx Peer Variables
name space.
The
-.Ar assocID
+.Ar associd
is required, as the same name can occur in both spaces.
If no
.Ar name
is included, all operative variables in the name space are displayed.
In this case only, if the
-.Ar assocID
-is omitted, it is assumed zero.
+.Ar associd
+is omitted, it is assumed to be zero.
Multiple names are specified with comma separators and without whitespace.
Note that time values are represented in milliseconds
and frequency values in parts\-per\-million (PPM).
Some NTP timestamps are represented in the format
-YYYYMMDDTTTT ,
-where YYYY is the year,
-MM the month of year,
-DD the day of month and
-TTTT the time of day.
+.Ar YYYY Ns Ar MM Ar DD Ar TTTT ,
+where
+.Ar YYYY
+is the year,
+.Ar MM
+the month of year,
+.Ar DD
+the day of month and
+.Ar TTTT
+the time of day.
.It Ic reslist
-Show the access control (restrict) list for
+Display the access control (restrict) list for
.Nm .
+Authentication is required.
.It Ic saveconfig Ar filename
-Write the current configuration,
-including any runtime modifications given with
+Save the current configuration,
+including any runtime modifications made by
.Ic :config
or
.Ic config\-from\-file ,
-to the ntpd host's file
+to the NTP server host file
.Ar filename .
This command will be rejected by the server unless
.Lk miscopt.html#saveconfigdir "saveconfigdir"
appears in the
-.Ic ntpd
+.Xr ntpd 8
configuration file.
.Ar filename
can use
-.Xr strftime
-format specifies to substitute the current date and time, for example,
-.Ic q]saveconfig ntp\-%Y%m%d\-%H%M%S.confq] .
+.Xr date 1
+format specifiers to substitute the current date and time, for
+example,
+.D1 Ic saveconfig Pa ntp\-%Y%m%d\-%H%M%S.conf .
The filename used is stored in system variable
-.Ic savedconfig .
+.Cm savedconfig .
Authentication is required.
+.It Ic sysinfo
+Display system operational summary:
+associd, status, system peer, system peer mode, leap indicator,
+stratum, log2 precision, root delay, root dispersion,
+reference id, reference time, system jitter, clock jitter,
+clock wander, broadcast delay, symm. auth. delay.
+.It Ic sysstats
+Display system uptime and packet counts maintained in the
+protocol module:
+uptime, sysstats reset, packets received, current version,
+older version, bad length or format, authentication failed,
+declined, restricted, rate limited, KoD responses,
+processed for time.
.It Ic timerstats
-Display interval timer counters.
-.It Ic writelist Ar assocID
-Write the system or peer variables included in the variable list.
-.It Ic writevar Ar assocID Ar name Ns = Ns Ar value Op , ...
-Write the specified variables.
+Display interval timer counters:
+time since reset, timer overruns, calls to transmit.
+.It Ic writelist Ar associd
+Set all system or peer variables included in the variable list.
+.It Ic writevar Ar associd Ar name Ns = Ns Ar value Op , ...
+Set the specified variables in the variable list.
If the
-.Ar assocID
+.Ar associd
is zero, the variables are from the
.Sx System Variables
name space, otherwise they are from the
.Sx Peer Variables
name space.
The
-.Ar assocID
+.Ar associd
is required, as the same name can occur in both spaces.
-.It Ic sysinfo
-Display operational summary.
-.It Ic sysstats
-Print statistics counters maintained in the protocol module.
+Authentication is required.
.El
.Ss Status Words and Kiss Codes
The current state of the operating program is shown
in a set of status words
maintained by the system.
Status information is also available on a per\-association basis.
-These words are displayed in the
-.Ic rv
+These words are displayed by the
+.Ic readlist
and
-.Ic as
+.Ic associations
commands both in hexadecimal and in decoded short tip strings.
The codes, tips and short explanations are documented on the
.Lk decode.html "Event Messages and Status Words"
@@ -618,58 +682,59 @@ They are now displayed, when appropriate,
in the reference identifier field in various billboards.
.Ss System Variables
The following system variables appear in the
-.Ic rv
+.Ic readlist
billboard.
Not all variables are displayed in some configurations.
+.Pp
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic status
+.It Cm status
.Lk decode.html#sys "system status word"
-.It Ic version
+.It Cm version
NTP software version and build time
-.It Ic processor
+.It Cm processor
hardware platform and version
-.It Ic system
+.It Cm system
operating system and version
-.It Ic leap
+.It Cm leap
leap warning indicator (0\-3)
-.It Ic stratum
+.It Cm stratum
stratum (1\-15)
-.It Ic precision
+.It Cm precision
precision (log2 s)
-.It Ic rootdelay
+.It Cm rootdelay
total roundtrip delay to the primary reference clock
-.It Ic rootdisp
+.It Cm rootdisp
total dispersion to the primary reference clock
-.It Ic peer
-system peer association ID
-.It Ic tc
-time constant and poll exponent (log2 s) (3\-17)
-.It Ic mintc
-minimum time constant (log2 s) (3\-10)
-.It Ic clock
-date and time of day
-.It Ic refid
-reference ID or
+.It Cm refid
+reference id or
.Lk decode.html#kiss "kiss code"
-.It Ic reftime
+.It Cm reftime
reference time
-.It Ic offset
-combined offset of server relative to this host
-.It Ic sys_jitter
+.It Ic clock
+date and time of day
+.It Cm peer
+system peer association id
+.It Cm tc
+time constant and poll exponent (log2 s) (3\-17)
+.It Cm mintc
+minimum time constant (log2 s) (3\-10)
+.It Cm offset
+combined offset of server relative to this host
+.It Cm frequency
+frequency drift (PPM) relative to hardware clock
+.It Cm sys_jitter
combined system jitter
-.It Ic frequency
-frequency offset (PPM) relative to hardware clock
-.It Ic clk_wander
+.It Cm clk_wander
clock frequency wander (PPM)
-.It Ic clk_jitter
+.It Cm clk_jitter
clock jitter
-.It Ic tai
+.It Cm tai
TAI\-UTC offset (s)
-.It Ic leapsec
+.It Cm leapsec
NTP seconds when the next leap second is/was inserted
-.It Ic expire
+.It Cm expire
NTP seconds when the NIST leapseconds file expires
.El
The jitter and wander statistics are exponentially\-weighted RMS averages.
@@ -683,98 +748,102 @@ depending on the particular Autokey dance:
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic host
+.It Cm host
Autokey host name for this host
-.It Ic ident
+.It Cm ident
Autokey group name for this host
-.It Ic flags
+.It Cm flags
host flags (see Autokey specification)
-.It Ic digest
+.It Cm digest
OpenSSL message digest algorithm
-.It Ic signature
+.It Cm signature
OpenSSL digest/signature scheme
-.It Ic update
+.It Cm update
NTP seconds at last signature update
-.It Ic cert
+.It Cm cert
certificate subject, issuer and certificate flags
-.It Ic until
+.It Cm until
NTP seconds when the certificate expires
.El
.Ss Peer Variables
The following peer variables appear in the
-.Ic rv
+.Ic readlist
billboard for each association.
Not all variables are displayed in some configurations.
+.Pp
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic associd
-association ID
-.It Ic status
+.It Cm associd
+association id
+.It Cm status
.Lk decode.html#peer "peer status word"
-.It Ic srcadr
+.It Cm srcadr
source (remote) IP address
-.It Ic srcport
+.It Cm srcport
source (remote) port
-.It Ic dstadr
+.It Cm dstadr
destination (local) IP address
-.It Ic dstport
+.It Cm dstport
destination (local) port
-.It Ic leap
+.It Cm leap
leap indicator (0\-3)
-.It Ic stratum
+.It Cm stratum
stratum (0\-15)
-.It Ic precision
+.It Cm precision
precision (log2 s)
-.It Ic rootdelay
+.It Cm rootdelay
total roundtrip delay to the primary reference clock
-.It Ic rootdisp
+.It Cm rootdisp
total root dispersion to the primary reference clock
-.It Ic refid
-reference ID or
+.It Cm refid
+reference id or
.Lk decode.html#kiss "kiss code"
-.It Ic reftime
+.It Cm reftime
reference time
-.It Ic reach
+.It Cm rec
+last packet received time
+.It Cm reach
reach register (octal)
-.It Ic unreach
+.It Cm unreach
unreach counter
-.It Ic hmode
+.It Cm hmode
host mode (1\-6)
-.It Ic pmode
+.It Cm pmode
peer mode (1\-5)
-.It Ic hpoll
+.It Cm hpoll
host poll exponent (log2 s) (3\-17)
-.It Ic ppoll
+.It Cm ppoll
peer poll exponent (log2 s) (3\-17)
-.It Ic headway
+.It Cm headway
headway (see
.Lk rate.html "Rate Management and the Kiss\-o'\-Death Packet" )
-.It Ic flash
+.It Cm flash
.Lk decode.html#flash "flash status word"
-.It Ic offset
+.It Cm keyid
+symmetric key id
+.It Cm offset
filter offset
-.It Ic delay
+.It Cm delay
filter delay
-.It Ic dispersion
+.It Cm dispersion
filter dispersion
-.It Ic jitter
+.It Cm jitter
filter jitter
-.It Ic ident
-Autokey group name for this association
-.It Ic bias
+.It Cm bias
unicast/broadcast bias
-.It Ic xleave
+.It Cm xleave
interleave delay (see
.Lk xleave.html "NTP Interleaved Modes" )
.El
The
-.Ic bias
+.Cm bias
variable is calculated when the first broadcast packet is received
after the calibration volley.
-It represents the offset of the broadcast subgraph relative to the unicast subgraph.
+It represents the offset of the broadcast subgraph relative to the
+unicast subgraph.
The
-.Ic xleave
+.Cm xleave
variable appears only for the interleaved symmetric and interleaved modes.
It represents the internal queuing, buffering and transmission delays
for the preceding packet.
@@ -784,71 +853,73 @@ additional peer variables are displayed, including the following:
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic flags
+.It Cm flags
peer flags (see Autokey specification)
-.It Ic host
+.It Cm host
Autokey server name
-.It Ic flags
+.It Cm flags
peer flags (see Autokey specification)
-.It Ic signature
+.It Cm signature
OpenSSL digest/signature scheme
-.It Ic initsequence
-initial key ID
-.It Ic initkey
+.It Cm initsequence
+initial key id
+.It Cm initkey
initial key index
-.It Ic timestamp
+.It Cm timestamp
Autokey signature timestamp
+.It Cm ident
+Autokey group name for this association
.El
.Ss Clock Variables
The following clock variables appear in the
-.Ic cv
+.Ic clocklist
billboard for each association with a reference clock.
Not all variables are displayed in some configurations.
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic associd
-association ID
-.It Ic status
+.It Cm associd
+association id
+.It Cm status
.Lk decode.html#clock "clock status word"
-.It Ic device
+.It Cm device
device description
-.It Ic timecode
+.It Cm timecode
ASCII time code string (specific to device)
-.It Ic poll
+.It Cm poll
poll messages sent
-.It Ic noreply
+.It Cm noreply
no reply
-.It Ic badformat
+.It Cm badformat
bad format
-.It Ic baddata
+.It Cm baddata
bad date or time
-.It Ic fudgetime1
+.It Cm fudgetime1
fudge time 1
-.It Ic fudgetime2
+.It Cm fudgetime2
fudge time 2
-.It Ic stratum
+.It Cm stratum
driver stratum
-.It Ic refid
-driver reference ID
-.It Ic flags
+.It Cm refid
+driver reference id
+.It Cm flags
driver flags
.El
.Sh "OPTIONS"
.Bl -tag
.It Fl 4 , Fl \-ipv4
-Force IPv4 DNS name resolution.
+Force IPv4 name resolution.
This option must not appear in combination with any of the following options:
ipv6.
.sp
-Force DNS resolution of following host names on the command line
+Force resolution of following host names on the command line
to the IPv4 namespace.
.It Fl 6 , Fl \-ipv6
-Force IPv6 DNS name resolution.
+Force IPv6 name resolution.
This option must not appear in combination with any of the following options:
ipv4.
.sp
-Force DNS resolution of following host names on the command line
+Force resolution of following host names on the command line
to the IPv6 namespace.
.It Fl c Ar cmd , Fl \-command Ns = Ns Ar cmd
run a command and exit.
@@ -878,7 +949,7 @@ commands read from the standard input.
numeric host addresses.
.sp
Output all host addresses in dotted\-quad numeric format rather than
-converting to the canonical host names.
+converting to the canonical host names.
.It Fl \-old\-rv
Always output status line with readvar.
.sp
diff --git a/contrib/ntp/ntpq/ntpq.c b/contrib/ntp/ntpq/ntpq.c
index 547f3cc..17c2f17 100644
--- a/contrib/ntp/ntpq/ntpq.c
+++ b/contrib/ntp/ntpq/ntpq.c
@@ -2,10 +2,11 @@
* ntpq - query an NTP server using mode 6 commands
*/
#include <config.h>
-#include <stdio.h>
#include <ctype.h>
#include <signal.h>
#include <setjmp.h>
+#include <stddef.h>
+#include <stdio.h>
#include <sys/types.h>
#include <sys/time.h>
#ifdef HAVE_UNISTD_H
@@ -34,7 +35,15 @@
#include "openssl/evp.h"
#include "openssl/objects.h"
#include "openssl/err.h"
+#ifdef SYS_WINNT
+# include "openssl/opensslv.h"
+# if !defined(HAVE_EVP_MD_DO_ALL_SORTED) && OPENSSL_VERSION_NUMBER > 0x10000000L
+# define HAVE_EVP_MD_DO_ALL_SORTED 1
+# endif
+#endif
#include "libssl_compat.h"
+
+#define CMAC "AES128CMAC"
#endif
#include <ssl_applink.c>
@@ -189,7 +198,7 @@ static int getarg (const char *, int, arg_v *);
static int findcmd (const char *, struct xcmd *,
struct xcmd *, struct xcmd **);
static int rtdatetolfp (char *, l_fp *);
-static int decodearr (char *, int *, l_fp *);
+static int decodearr (char *, int *, l_fp *, int);
static void help (struct parse *, FILE *);
static int helpsort (const void *, const void *);
static void printusage (struct xcmd *, FILE *);
@@ -227,12 +236,23 @@ static void on_ctrlc (void);
static int my_easprintf (char**, const char *, ...) NTP_PRINTF(2, 3);
void ntpq_custom_opt_handler (tOptions *, tOptDesc *);
+/* read a character from memory and expand to integer */
+static inline int
+pgetc(
+ const char *cp
+ )
+{
+ return (int)*(const unsigned char*)cp;
+}
+
+
#ifdef OPENSSL
# ifdef HAVE_EVP_MD_DO_ALL_SORTED
static void list_md_fn(const EVP_MD *m, const char *from,
const char *to, void *arg );
# endif
#endif
+static char *insert_cmac(char *list);
static char *list_digest_names(void);
/*
@@ -450,6 +470,7 @@ main(
}
#endif
+
#ifndef BUILD_AS_LIB
int
ntpqmain(
@@ -484,14 +505,16 @@ ntpqmain(
char *msg;
list = list_digest_names();
- for (icmd = 0; icmd < sizeof(builtins)/sizeof(builtins[0]); icmd++) {
- if (strcmp("keytype", builtins[icmd].keyword) == 0)
+
+ for (icmd = 0; icmd < sizeof(builtins)/sizeof(*builtins); icmd++) {
+ if (strcmp("keytype", builtins[icmd].keyword) == 0) {
break;
+ }
}
/* CID: 1295478 */
/* This should only "trip" if "keytype" is removed from builtins */
- INSIST(icmd < sizeof(builtins)/sizeof(builtins[0]));
+ INSIST(icmd < sizeof(builtins)/sizeof(*builtins));
#ifdef OPENSSL
builtins[icmd].desc[0] = "digest-name";
@@ -584,9 +607,15 @@ ntpqmain(
getcmds();
} else {
for (ihost = 0; ihost < numhosts; ihost++) {
- if (openhost(chosts[ihost].name, chosts[ihost].fam))
- for (icmd = 0; icmd < numcmds; icmd++)
+ if (openhost(chosts[ihost].name, chosts[ihost].fam)) {
+ if (ihost)
+ fputc('\n', current_output);
+ for (icmd = 0; icmd < numcmds; icmd++) {
+ if (icmd)
+ fputc('\n', current_output);
docmd(ccmds[icmd]);
+ }
+ }
}
}
#ifdef SYS_WINNT
@@ -719,7 +748,7 @@ openhost(
int err;
err = setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE,
- (char *)&optionValue, sizeof(optionValue));
+ (void *)&optionValue, sizeof(optionValue));
if (err) {
mfprintf(stderr,
"setsockopt(SO_SYNCHRONOUS_NONALERT)"
@@ -743,7 +772,7 @@ openhost(
# ifdef SO_RCVBUF
{ int rbufsize = DATASIZE + 2048; /* 2K for slop */
if (setsockopt(sockfd, SOL_SOCKET, SO_RCVBUF,
- &rbufsize, sizeof(int)) == -1)
+ (void *)&rbufsize, sizeof(int)) == -1)
error("setsockopt");
}
# endif
@@ -2014,7 +2043,7 @@ rtdatetolfp(
* d[d]-Mth-y[y[y[y]]] hh:mm:ss
*/
cp = str;
- if (!isdigit((int)*cp)) {
+ if (!isdigit(pgetc(cp))) {
if (*cp == '-') {
/*
* Catch special case
@@ -2026,7 +2055,7 @@ rtdatetolfp(
}
cal.monthday = (u_char) (*cp++ - '0'); /* ascii dependent */
- if (isdigit((int)*cp)) {
+ if (isdigit(pgetc(cp))) {
cal.monthday = (u_char)((cal.monthday << 3) + (cal.monthday << 1));
cal.monthday = (u_char)(cal.monthday + *cp++ - '0');
}
@@ -2048,18 +2077,18 @@ rtdatetolfp(
if (*cp++ != '-')
return 0;
- if (!isdigit((int)*cp))
+ if (!isdigit(pgetc(cp)))
return 0;
cal.year = (u_short)(*cp++ - '0');
- if (isdigit((int)*cp)) {
+ if (isdigit(pgetc(cp))) {
cal.year = (u_short)((cal.year << 3) + (cal.year << 1));
cal.year = (u_short)(*cp++ - '0');
}
- if (isdigit((int)*cp)) {
+ if (isdigit(pgetc(cp))) {
cal.year = (u_short)((cal.year << 3) + (cal.year << 1));
cal.year = (u_short)(cal.year + *cp++ - '0');
}
- if (isdigit((int)*cp)) {
+ if (isdigit(pgetc(cp))) {
cal.year = (u_short)((cal.year << 3) + (cal.year << 1));
cal.year = (u_short)(cal.year + *cp++ - '0');
}
@@ -2072,26 +2101,26 @@ rtdatetolfp(
return 1;
}
- if (*cp++ != ' ' || !isdigit((int)*cp))
+ if (*cp++ != ' ' || !isdigit(pgetc(cp)))
return 0;
cal.hour = (u_char)(*cp++ - '0');
- if (isdigit((int)*cp)) {
+ if (isdigit(pgetc(cp))) {
cal.hour = (u_char)((cal.hour << 3) + (cal.hour << 1));
cal.hour = (u_char)(cal.hour + *cp++ - '0');
}
- if (*cp++ != ':' || !isdigit((int)*cp))
+ if (*cp++ != ':' || !isdigit(pgetc(cp)))
return 0;
cal.minute = (u_char)(*cp++ - '0');
- if (isdigit((int)*cp)) {
+ if (isdigit(pgetc(cp))) {
cal.minute = (u_char)((cal.minute << 3) + (cal.minute << 1));
cal.minute = (u_char)(cal.minute + *cp++ - '0');
}
- if (*cp++ != ':' || !isdigit((int)*cp))
+ if (*cp++ != ':' || !isdigit(pgetc(cp)))
return 0;
cal.second = (u_char)(*cp++ - '0');
- if (isdigit((int)*cp)) {
+ if (isdigit(pgetc(cp))) {
cal.second = (u_char)((cal.second << 3) + (cal.second << 1));
cal.second = (u_char)(cal.second + *cp++ - '0');
}
@@ -2215,34 +2244,36 @@ decodeuint(
*/
static int
decodearr(
- char *str,
- int *narr,
- l_fp *lfparr
+ char *cp,
+ int *narr,
+ l_fp *lfpa,
+ int amax
)
{
- register char *cp, *bp;
- register l_fp *lfp;
+ char *bp;
char buf[60];
- lfp = lfparr;
- cp = str;
*narr = 0;
- while (*narr < 8) {
- while (isspace((int)*cp))
- cp++;
- if (*cp == '\0')
- break;
-
- bp = buf;
- while (!isspace((int)*cp) && *cp != '\0')
- *bp++ = *cp++;
- *bp++ = '\0';
+ while (*narr < amax && *cp) {
+ if (isspace(pgetc(cp))) {
+ do
+ ++cp;
+ while (*cp && isspace(pgetc(cp)));
+ } else {
+ bp = buf;
+ do {
+ if (bp != (buf + sizeof(buf) - 1))
+ *bp++ = *cp;
+ ++cp;
+ } while (*cp && !isspace(pgetc(cp)));
+ *bp = '\0';
- if (!decodetime(buf, lfp))
- return 0;
- (*narr)++;
- lfp++;
+ if (!decodetime(buf, lfpa))
+ return 0;
+ ++(*narr);
+ ++lfpa;
+ }
}
return 1;
}
@@ -3049,7 +3080,7 @@ nextvar(
/*
* Space past commas and white space
*/
- while (cp < cpend && (*cp == ',' || isspace((int)*cp)))
+ while (cp < cpend && (*cp == ',' || isspace(pgetc(cp))))
cp++;
if (cp >= cpend)
return 0;
@@ -3061,7 +3092,7 @@ nextvar(
srclen = strcspn(cp, ",=\r\n");
srclen = min(srclen, (size_t)(cpend - cp));
len = srclen;
- while (len > 0 && isspace((unsigned char)cp[len - 1]))
+ while (len > 0 && isspace(pgetc(&cp[len - 1])))
len--;
if (len >= sizeof(name))
return 0;
@@ -3087,7 +3118,7 @@ nextvar(
* So far, so good. Copy out the value
*/
cp++; /* past '=' */
- while (cp < cpend && (isspace((unsigned char)*cp) && *cp != '\r' && *cp != '\n'))
+ while (cp < cpend && (isspace(pgetc(cp)) && *cp != '\r' && *cp != '\n'))
cp++;
np = cp;
if ('"' == *np) {
@@ -3108,7 +3139,7 @@ nextvar(
/*
* Trim off any trailing whitespace
*/
- while (len > 0 && isspace((unsigned char)value[len - 1]))
+ while (len > 0 && isspace(pgetc(&value[len - 1])))
len--;
value[len] = '\0';
@@ -3191,7 +3222,7 @@ rawprint(
*/
if (cp == (cpend - 1) || *(cp + 1) != '\n')
makeascii(1, cp, fp);
- } else if (isspace((unsigned char)*cp) || isprint((unsigned char)*cp))
+ } else if (isspace(pgetc(cp)) || isprint(pgetc(cp)))
putc(*cp, fp);
else
makeascii(1, cp, fp);
@@ -3399,7 +3430,7 @@ cookedprint(
break;
case TS:
- if (!decodets(value, &lfp))
+ if (!value || !decodets(value, &lfp))
output_raw = '?';
else
output(fp, name, prettydate(&lfp));
@@ -3407,7 +3438,7 @@ cookedprint(
case HA: /* fallthru */
case NA:
- if (!decodenetnum(value, &hval)) {
+ if (!value || !decodenetnum(value, &hval)) {
output_raw = '?';
} else if (fmt == HA){
output(fp, name, nntohost(&hval));
@@ -3417,7 +3448,9 @@ cookedprint(
break;
case RF:
- if (decodenetnum(value, &hval)) {
+ if (!value) {
+ output_raw = '?';
+ } else if (decodenetnum(value, &hval)) {
if (ISREFCLOCKADR(&hval))
output(fp, name,
refnumtoa(&hval));
@@ -3431,7 +3464,7 @@ cookedprint(
break;
case LP:
- if (!decodeuint(value, &uval) || uval > 3) {
+ if (!value || !decodeuint(value, &uval) || uval > 3) {
output_raw = '?';
} else {
b[0] = (0x2 & uval)
@@ -3446,7 +3479,7 @@ cookedprint(
break;
case OC:
- if (!decodeuint(value, &uval)) {
+ if (!value || !decodeuint(value, &uval)) {
output_raw = '?';
} else {
snprintf(b, sizeof(b), "%03lo", uval);
@@ -3455,14 +3488,14 @@ cookedprint(
break;
case AR:
- if (!decodearr(value, &narr, lfparr))
+ if (!value || !decodearr(value, &narr, lfparr, 8))
output_raw = '?';
else
outputarr(fp, name, narr, lfparr);
break;
case FX:
- if (!decodeuint(value, &uval))
+ if (!value || !decodeuint(value, &uval))
output_raw = '?';
else
output(fp, name, tstflags(uval));
@@ -3584,81 +3617,205 @@ ntpq_custom_opt_handler(
* Obtain list of digest names
*/
+#if defined(OPENSSL) && !defined(HAVE_EVP_MD_DO_ALL_SORTED)
+# if defined(_MSC_VER) && OPENSSL_VERSION_NUMBER >= 0x10100000L
+# define HAVE_EVP_MD_DO_ALL_SORTED
+# endif
+#endif
+
#ifdef OPENSSL
# ifdef HAVE_EVP_MD_DO_ALL_SORTED
+# define K_PER_LINE 8
+# define K_NL_PFX_STR "\n "
+# define K_DELIM_STR ", "
+
struct hstate {
char *list;
const char **seen;
int idx;
};
-#define K_PER_LINE 8
-#define K_NL_PFX_STR "\n "
-#define K_DELIM_STR ", "
-static void list_md_fn(const EVP_MD *m, const char *from, const char *to, void *arg )
+
+
+static void
+list_md_fn(const EVP_MD *m, const char *from, const char *to, void *arg)
{
- size_t len, n;
- const char *name, *cp, **seen;
+ size_t len, n, digest_len;
+ const char *name, **seen;
struct hstate *hstate = arg;
- EVP_MD_CTX *ctx;
- u_int digest_len;
- u_char digest[EVP_MAX_MD_SIZE];
+ char *cp;
- if (!m)
+ /* m is MD obj, from is name or alias, to is base name for alias */
+ if (!m || !from || to) {
return; /* Ignore aliases */
+ }
+
+ /* Discard MACs that NTP won't accept. */
+ /* Keep this consistent with keytype_from_text() in ssl_init.c. */
+ if (EVP_MD_size(m) > (MAX_MAC_LEN - sizeof(keyid_t))) {
+ return;
+ }
name = EVP_MD_name(m);
/* Lowercase names aren't accepted by keytype_from_text in ssl_init.c */
- for( cp = name; *cp; cp++ ) {
- if( islower((unsigned char)*cp) )
+ for (cp = name; *cp; cp++) {
+ if (islower((unsigned char)*cp)) {
return;
+ }
}
+
len = (cp - name) + 1;
/* There are duplicates. Discard if name has been seen. */
- for (seen = hstate->seen; *seen; seen++)
- if (!strcmp(*seen, name))
+ for (seen = hstate->seen; *seen; seen++) {
+ if (!strcmp(*seen, name)) {
return;
+ }
+ }
+
n = (seen - hstate->seen) + 2;
hstate->seen = erealloc(hstate->seen, n * sizeof(*seen));
hstate->seen[n-2] = name;
hstate->seen[n-1] = NULL;
- /* Discard MACs that NTP won't accept.
- * Keep this consistent with keytype_from_text() in ssl_init.c.
- */
-
- ctx = EVP_MD_CTX_new();
- EVP_DigestInit(ctx, EVP_get_digestbyname(name));
- EVP_DigestFinal(ctx, digest, &digest_len);
- EVP_MD_CTX_free(ctx);
- if (digest_len > (MAX_MAC_LEN - sizeof(keyid_t)))
- return;
-
- if (hstate->list != NULL)
+ if (hstate->list != NULL) {
len += strlen(hstate->list);
- len += (hstate->idx >= K_PER_LINE)? strlen(K_NL_PFX_STR): strlen(K_DELIM_STR);
+ }
+
+ len += (hstate->idx >= K_PER_LINE)
+ ? strlen(K_NL_PFX_STR)
+ : strlen(K_DELIM_STR);
if (hstate->list == NULL) {
- hstate->list = (char *)emalloc(len);
+ hstate->list = (char *)emalloc(len);
hstate->list[0] = '\0';
- } else
+ } else {
hstate->list = (char *)erealloc(hstate->list, len);
+ }
sprintf(hstate->list + strlen(hstate->list), "%s%s",
- ((hstate->idx >= K_PER_LINE)? K_NL_PFX_STR : K_DELIM_STR),
+ ((hstate->idx >= K_PER_LINE) ? K_NL_PFX_STR : K_DELIM_STR),
name);
- if (hstate->idx >= K_PER_LINE)
+
+ if (hstate->idx >= K_PER_LINE) {
hstate->idx = 1;
- else
+ } else {
hstate->idx++;
+ }
+}
+
+
+/* Insert CMAC into SSL digests list */
+static char *
+insert_cmac(char *list)
+{
+ int insert;
+ size_t len;
+
+
+ /* If list empty, we need to insert CMAC on new line */
+ insert = (!list || !*list);
+
+ if (insert) {
+ len = strlen(K_NL_PFX_STR) + strlen(CMAC);
+ list = (char *)erealloc(list, len + 1);
+ sprintf(list, "%s%s", K_NL_PFX_STR, CMAC);
+ } else { /* List not empty */
+ /* Check if CMAC already in list - future proofing */
+ const char *cmac_sn;
+ char *cmac_p;
+
+ cmac_sn = OBJ_nid2sn(NID_cmac);
+ cmac_p = list;
+ insert = cmac_sn != NULL && *cmac_sn != '\0';
+
+ /* CMAC in list if found, followed by nul char or ',' */
+ while (insert && NULL != (cmac_p = strstr(cmac_p, cmac_sn))) {
+ cmac_p += strlen(cmac_sn);
+ /* Still need to insert if not nul and not ',' */
+ insert = *cmac_p && ',' != *cmac_p;
+ }
+
+ /* Find proper insertion point */
+ if (insert) {
+ char *last_nl;
+ char *point;
+ char *delim;
+ int found;
+
+ /* Default to start if list empty */
+ found = 0;
+ delim = list;
+ len = strlen(list);
+
+ /* While new lines */
+ while (delim < list + len && *delim &&
+ !strncmp(K_NL_PFX_STR, delim, strlen(K_NL_PFX_STR))) {
+ point = delim + strlen(K_NL_PFX_STR);
+
+ /* While digest names on line */
+ while (point < list + len && *point) {
+ /* Another digest after on same or next line? */
+ delim = strstr( point, K_DELIM_STR);
+ last_nl = strstr( point, K_NL_PFX_STR);
+
+ /* No - end of list */
+ if (!delim && !last_nl) {
+ delim = list + len;
+ } else
+ /* New line and no delim or before delim? */
+ if (last_nl && (!delim || last_nl < delim)) {
+ delim = last_nl;
+ }
+
+ /* Found insertion point where CMAC before entry? */
+ if (strncmp(CMAC, point, delim - point) < 0) {
+ found = 1;
+ break;
+ }
+
+ if (delim < list + len && *delim &&
+ !strncmp(K_DELIM_STR, delim, strlen(K_DELIM_STR))) {
+ point += strlen(K_DELIM_STR);
+ } else {
+ break;
+ }
+ } /* While digest names on line */
+ } /* While new lines */
+
+ /* If found in list */
+ if (found) {
+ /* insert cmac and delim */
+ /* Space for list could move - save offset */
+ ptrdiff_t p_offset = point - list;
+ len += strlen(CMAC) + strlen(K_DELIM_STR);
+ list = (char *)erealloc(list, len + 1);
+ point = list + p_offset;
+ /* move to handle src/dest overlap */
+ memmove(point + strlen(CMAC) + strlen(K_DELIM_STR),
+ point, strlen(point) + 1);
+ strncpy(point, CMAC, strlen(CMAC));
+ strncpy(point + strlen(CMAC), K_DELIM_STR, strlen(K_DELIM_STR));
+ } else { /* End of list */
+ /* append delim and cmac */
+ len += strlen(K_DELIM_STR) + strlen(CMAC);
+ list = (char *)erealloc(list, len + 1);
+ strcpy(list + strlen(list), K_DELIM_STR);
+ strcpy(list + strlen(list), CMAC);
+ }
+ } /* insert */
+ } /* List not empty */
+
+ return list;
}
# endif
#endif
-static char *list_digest_names(void)
+
+static char *
+list_digest_names(void)
{
char *list = NULL;
@@ -3666,12 +3823,16 @@ static char *list_digest_names(void)
# ifdef HAVE_EVP_MD_DO_ALL_SORTED
struct hstate hstate = { NULL, NULL, K_PER_LINE+1 };
- hstate.seen = (const char **) emalloc_zero(1*sizeof( const char * )); // replaces -> calloc(1, sizeof( const char * ));
+ /* replace calloc(1, sizeof(const char *)) */
+ hstate.seen = (const char **)emalloc_zero(sizeof(const char *));
INIT_SSL();
EVP_MD_do_all_sorted(list_md_fn, &hstate);
list = hstate.list;
free(hstate.seen);
+
+ list = insert_cmac(list); /* Insert CMAC into SSL digests list */
+
# else
list = (char *)emalloc(sizeof("md5, others (upgrade to OpenSSL-1.0 for full list)"));
strcpy(list, "md5, others (upgrade to OpenSSL-1.0 for full list)");
diff --git a/contrib/ntp/ntpq/ntpq.html b/contrib/ntp/ntpq/ntpq.html
index d8f6dd6..55aafc8 100644
--- a/contrib/ntp/ntpq/ntpq.html
+++ b/contrib/ntp/ntpq/ntpq.html
@@ -44,7 +44,7 @@ monitor the operational status
and determine the performance of
<code>ntpd</code>, the NTP daemon.
- <p>This document applies to version 4.2.8p10 of <code>ntpq</code>.
+ <p>This document applies to version 4.2.8p11 of <code>ntpq</code>.
<ul class="menu">
<li><a accesskey="1" href="#ntpq-Description">ntpq Description</a>
@@ -97,13 +97,9 @@ The description on this page is for the NTPv4 variables.
<p>The
<code>ntpq</code>
-utility program is used to query NTP servers which
-implement the standard NTP mode 6 control message formats defined
-in Appendix B of the NTPv3 specification RFC1305, requesting
+utility program is used to query NTP servers to monitor NTP operations
+and performance, requesting
information about current state and/or changes in that state.
-The same formats are used in NTPv4, although some of the
-variables have changed and new ones added. The description on this
-page is for the NTPv4 variables.
The program may be run either in interactive mode or controlled using
command line arguments.
Requests to read and write arbitrary
@@ -147,6 +143,16 @@ one attempt to retransmit requests, and will time requests out if
the remote host is not heard from within a suitable timeout
time.
+ <p>Note that in contexts where a host name is expected, a
+<code>-4</code>
+qualifier preceding the host name forces resolution to the IPv4
+namespace, while a
+<code>-6</code>
+qualifier forces resolution to the IPv6 namespace.
+For examples and usage, see the
+NTP Debugging Techniques
+page.
+
<p>Specifying a
command line option other than
<code>-i</code>
@@ -171,35 +177,30 @@ uniquely identify the command need be typed.
number of interactive format commands are executed entirely within
the
<code>ntpq</code>
-utility itself and do not result in NTP mode 6
+utility itself and do not result in NTP
requests being sent to a server.
These are described following.
<dl>
-<dt><code>?</code> <code>[</code><kbd>command_keyword</kbd><code>]</code><br><dt><code>help</code> <code>[</code><kbd>command_keyword</kbd><code>]</code><dd>A
+<dt><code>?</code> <code>[</code><kbd>command</kbd><code>]</code><br><dt><code>help</code> <code>[</code><kbd>command</kbd><code>]</code><dd>A
?
-by itself will print a list of all the command
-keywords known to this incarnation of
+by itself will print a list of all the commands
+known to
<code>ntpq</code>
A
?
-followed by a command keyword will print function and usage
+followed by a command name will print function and usage
information about the command.
-This command is probably a better
-source of information about
-<code>ntpq</code>
-than this manual
-page.
-<br><dt><code>addvars</code> <kbd>variable_name</kbd><code>[=value]</code> <code>...</code><br><dt><code>rmvars</code> <kbd>variable_name</kbd> <code>...</code><br><dt><code>clearvars</code><br><dt><code>showvars</code><dd>The data carried by NTP mode 6 messages consists of a list of
+<br><dt><code>addvars</code> <kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]</code><code>[,...]</code><br><dt><code>rmvars</code> <kbd>name</kbd><code>[,...]</code><br><dt><code>clearvars</code><br><dt><code>showvars</code><dd>The arguments to this command consist of a list of
items of the form
-variable_name=value,
+<kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]</code>,
where the
-=value
+.No = Ns Ar value
is ignored, and can be omitted,
in requests to the server to read variables.
The
<code>ntpq</code>
-utility maintains an internal list in which data to be included in control
-messages can be assembled, and sent using the
+utility maintains an internal list in which data to be included in
+messages can be assembled, and displayed or set using the
<code>readlist</code>
and
<code>writelist</code>
@@ -214,34 +215,30 @@ The
<code>rmvars</code>
command can be used to remove individual variables from the list,
while the
-<code>clearlist</code>
+<code>clearvars</code>
command removes all variables from the
list.
The
<code>showvars</code>
command displays the current list of optional variables.
-<br><dt><code>authenticate</code> <code>[yes | no]</code><dd>Normally
+<br><dt><code>authenticate</code> <code>[yes|no]</code><dd>Normally
<code>ntpq</code>
does not authenticate requests unless
they are write requests.
The command
-authenticate yes
+<code>authenticate</code> <code>yes</code>
causes
<code>ntpq</code>
to send authentication with all requests it
makes.
Authenticated requests causes some servers to handle
-requests slightly differently, and can occasionally melt the CPU in
-fuzzballs if you turn authentication on before doing a
-<code>peer</code>
-display.
+requests slightly differently.
The command
-authenticate
+<code>authenticate</code>
causes
<code>ntpq</code>
to display whether or not
-<code>ntpq</code>
-is currently autheinticating requests.
+it is currently authenticating requests.
<br><dt><code>cooked</code><dd>Causes output from query commands to be "cooked", so that
variables which are recognized by
<code>ntpq</code>
@@ -249,12 +246,12 @@ will have their
values reformatted for human consumption.
Variables which
<code>ntpq</code>
-thinks should have a decodable value but didn't are
+could not decode completely are
marked with a trailing
?.
-<br><dt><code>debug</code> <code>[more | less | off]</code><dd>With no argument, displays the current debug level.
-Otherwise, the debug level is changed to the indicated level.
-<br><dt><code>delay</code> <kbd>milliseconds</kbd><dd>Specify a time interval to be added to timestamps included in
+<br><dt><code>debug</code> <code>[more|less|off]</code><dd>With no argument, displays the current debug level.
+Otherwise, the debugging level is changed as indicated.
+<br><dt><code>delay</code> <code>[</code><kbd>milliseconds</kbd><code>]</code><dd>Specify a time interval to be added to timestamps included in
requests which require authentication.
This is used to enable
(unreliable) server reconfiguration over long delay network paths
@@ -262,12 +259,18 @@ or between machines whose clocks are unsynchronized.
Actually the
server does not now require timestamps in authenticated requests,
so this command may be obsolete.
+Without any arguments, displays the current delay.
+<br><dt><code>drefid</code> <code>[hash|ipv4]</code><dd>Display refids as IPv4 or hash.
+Without any arguments, displays whether refids are shown as IPv4
+addresses or hashes.
<br><dt><code>exit</code><dd>Exit
<code>ntpq</code>
-<br><dt><code>host</code> <kbd>hostname</kbd><dd>Set the host to which future queries will be sent.
-<kbd>hostname</kbd>
+<br><dt><code>host</code> <code>[</code><kbd>name</kbd><code>]</code><dd>Set the host to which future queries will be sent.
+The
+<kbd>name</kbd>
may be either a host name or a numeric address.
-<br><dt><code>hostnames</code> <code>[yes | no]</code><dd>If
+Without any arguments, displays the current host.
+<br><dt><code>hostnames</code> <code>[yes|no]</code><dd>If
<code>yes</code>
is specified, host names are printed in
information displays.
@@ -281,24 +284,28 @@ unless
modified using the command line
<code>-n</code>
switch.
-<br><dt><code>keyid</code> <kbd>keyid</kbd><dd>This command allows the specification of a key number to be
+Without any arguments, displays whether host names or numeric addresses
+are shown.
+<br><dt><code>keyid</code> <code>[</code><kbd>keyid</kbd><code>]</code><dd>This command allows the specification of a key number to be
used to authenticate configuration requests.
This must correspond
to the
<code>controlkey</code>
key number the server has been configured to use for this
purpose.
-<br><dt><code>keytype</code> <code>[md5 | OpenSSLDigestType]</code><dd>Specify the type of key to use for authenticating requests.
-<code>md5</code>
-is alway supported.
+Without any arguments, displays the current
+<kbd>keyid</kbd>.
+<br><dt><code>keytype</code> <code>[</code><kbd>digest</kbd><code>]</code><dd>Specify the digest algorithm to use for authenticating requests, with default
+<code>MD5</code>.
If
<code>ntpq</code>
-was built with OpenSSL support,
-any digest type supported by OpenSSL can also be provided.
+was built with OpenSSL support, and OpenSSL is installed,
+<kbd>digest</kbd>
+can be any message digest algorithm supported by OpenSSL.
If no argument is given, the current
-<code>keytype</code>
-is displayed.
-<br><dt><code>ntpversion</code> <code>[1 | 2 | 3 | 4]</code><dd>Sets the NTP version number which
+<code>keytype</code> <kbd>digest</kbd>
+algorithm used is displayed.
+<br><dt><code>ntpversion</code> <code>[1|2|3|4]</code><dd>Sets the NTP version number which
<code>ntpq</code>
claims in
packets.
@@ -314,9 +321,10 @@ requests.
The password must correspond to the key configured for
use by the NTP server for this purpose if such requests are to be
successful.
-<code>poll</code>
+<br><dt><code>poll</code> <code>[</code><kbd>n</kbd><code>]</code> <code>[verbose]</code><dd>Poll an NTP server in client mode
<kbd>n</kbd>
-<code>verbose</code>
+times.
+Poll not implemented yet.
<br><dt><code>quit</code><dd>Exit
<code>ntpq</code>
<br><dt><code>raw</code><dd>Causes all output from query commands is printed as received
@@ -324,23 +332,27 @@ from the remote server.
The only formating/interpretation done on
the data is to transform nonascii data into a printable (but barely
understandable) form.
-<br><dt><code>timeout</code> <kbd>milliseconds</kbd><dd>Specify a timeout period for responses to server queries.
+<br><dt><code>timeout</code> <code>[</code><kbd>milliseconds</kbd><code>]</code><dd>Specify a timeout period for responses to server queries.
The
default is about 5000 milliseconds.
+Without any arguments, displays the current timeout period.
Note that since
<code>ntpq</code>
retries each query once after a timeout, the total waiting time for
a timeout will be twice the timeout value set.
-<br><dt><code>version</code><dd>Print the version of the
+<br><dt><code>version</code><dd>Display the version of the
<code>ntpq</code>
program.
</dl>
<h5 class="subsubsection">Control Message Commands</h5>
-<p>Association IDs are used to identify system, peer and clock variables.
-System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace.
-Most control commands send a single mode-6 message to the server and expect a single response message.
+<p>Association ids are used to identify system, peer and clock variables.
+System variables are assigned an association id of zero and system name
+space, while each association is assigned a nonzero association id and
+peer namespace.
+Most control commands send a single message to the server and expect a
+single response message.
The exceptions are the
<code>peers</code>
command, which sends a series of messages,
@@ -350,38 +362,87 @@ and
<code>mreadvar</code>
commands, which iterate over a range of associations.
<dl>
-<dt><code>associations</code><dd>Display a list of mobilized associations in the form:
+<dt><code>apeers</code><dd>Display a list of peers in the form:
+ <pre class="example"> [tally]remote refid assid st t when pool reach delay offset jitter
+ </pre>
+ <p>where the output is just like the
+<code>peers</code>
+command except that the
+<code>refid</code>
+is displayed in hex format and the association number is also displayed.
+<br><dt><code>associations</code><dd>Display a list of mobilized associations in the form:
<pre class="example"> ind assid status conf reach auth condition last_event cnt
</pre>
<dl>
-<dt>Sy String Ta Sy Description<br><dt><code>ind</code> <code>Ta</code> <code>index</code> <code>on</code> <code>this</code> <code>list</code><br><dt><code>assid</code> <code>Ta</code> <code>association</code> <code>ID</code><br><dt><code>status</code> <code>Ta</code> <code>peer</code> <code>status</code> <code>word</code><br><dt><code>conf</code> <code>Ta</code> <code>yes</code>: <code>persistent,</code> <code>no</code>: <code>ephemeral</code><br><dt><code>reach</code> <code>Ta</code> <code>yes</code>: <code>reachable,</code> <code>no</code>: <code>unreachable</code><br><dt><code>auth</code> <code>Ta</code> <code>ok</code>, <code>yes</code>, <code>bad</code> <code>and</code> <code>none</code><br><dt><code>condition</code> <code>Ta</code> <code>selection</code> <code>status</code> <code>(see</code> <code>the</code> <code>select</code> <code>field</code> <code>of</code> <code>the</code> <code>peer</code> <code>status</code> <code>word)</code><br><dt><code>last_event</code> <code>Ta</code> <code>event</code> <code>report</code> <code>(see</code> <code>the</code> <code>event</code> <code>field</code> <code>of</code> <code>the</code> <code>peer</code> <code>status</code> <code>word)</code><br><dt><code>cnt</code> <code>Ta</code> <code>event</code> <code>count</code> <code>(see</code> <code>the</code> <code>count</code> <code>field</code> <code>of</code> <code>the</code> <code>peer</code> <code>status</code> <code>word)</code><dd></dl>
- <br><dt><code>authinfo</code><dd>Display the authentication statistics.
-<br><dt><code>clockvar</code> <kbd>assocID</kbd> <code>[</code><kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]]</code> <code>[...]</code><br><dt><code>cv</code> <kbd>assocID</kbd> <code>[</code><kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]]</code> <code>[...]</code><dd>Display a list of clock variables for those associations supporting a reference clock.
-<br><dt><code>:config</code> <code>[...]</code><dd>Send the remainder of the command line, including whitespace, to the server as a run-time configuration command in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.
-<br><dt><code>config-from-file</code> <kbd>filename</kbd><dd>Send the each line of
+<dt>Sy Variable Ta Sy Description<br><dt><code>ind</code> <code>Ta</code> <code>index</code> <code>on</code> <code>this</code> <code>list</code><br><dt><code>assid</code> <code>Ta</code> <code>association</code> <code>id</code><br><dt><code>status</code> <code>Ta</code> <code>peer</code> <code>status</code> <code>word</code><br><dt><code>conf</code> <code>Ta</code> <code>yes</code>: <code>No</code> <code>persistent,</code> <code>no</code>: <code>No</code> <code>ephemeral</code><br><dt><code>reach</code> <code>Ta</code> <code>yes</code>: <code>No</code> <code>reachable,</code> <code>no</code>: <code>No</code> <code>unreachable</code><br><dt><code>auth</code> <code>Ta</code> <code>ok</code>, <code>yes</code>, <code>bad</code> <code>No</code> <code>and</code> <code>none</code><br><dt><code>condition</code> <code>Ta</code> <code>selection</code> <code>status</code> <code>(see</code> <code>the</code> <code>select</code> <code>No</code> <code>field</code> <code>of</code> <code>the</code> <code>peer</code> <code>status</code> <code>word)</code><br><dt><code>last_event</code> <code>Ta</code> <code>event</code> <code>report</code> <code>(see</code> <code>the</code> <code>event</code> <code>No</code> <code>field</code> <code>of</code> <code>the</code> <code>peer</code> <code>status</code> <code>word)</code><br><dt><code>cnt</code> <code>Ta</code> <code>event</code> <code>count</code> <code>(see</code> <code>the</code> <code>count</code> <code>No</code> <code>field</code> <code>of</code> <code>the</code> <code>peer</code> <code>status</code> <code>word)</code><dd></dl>
+ <br><dt><code>authinfo</code><dd>Display the authentication statistics counters:
+time since reset, stored keys, free keys, key lookups, keys not found,
+uncached keys, expired keys, encryptions, decryptions.
+<br><dt><code>clocklist</code> <code>[</code><kbd>associd</kbd><code>]</code><br><dt><code>cl</code> <code>[</code><kbd>associd</kbd><code>]</code><dd>Display all clock variables in the variable list for those associations
+supporting a reference clock.
+<br><dt><code>clockvar</code> <code>[</code><kbd>associd</kbd><code>]</code> <code>[</code><kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]]</code><code>[,...]</code><br><dt><code>cv</code> <code>[</code><kbd>associd</kbd><code>]</code> <code>[</code><kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]]</code><code>[,...]</code><dd>Display a list of clock variables for those associations supporting a
+reference clock.
+<br><dt><code>:config</code> <kbd>configuration command line</kbd><dd>Send the remainder of the command line, including whitespace, to the
+server as a run-time configuration command in the same format as a line
+in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is of course required.
+<br><dt><code>config-from-file</code> <kbd>filename</kbd><dd>Send each line of
<kbd>filename</kbd>
-to the server as run-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required.
-<br><dt><code>ifstats</code><dd>Display statistics for each local network address. Authentication is required.
-<br><dt><code>iostats</code><dd>Display network and reference clock I/O statistics.
-<br><dt><code>kerninfo</code><dd>Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.
-<br><dt><code>lassociations</code><dd>Perform the same function as the associations command, except display mobilized and unmobilized associations.
-<br><dt><code>lopeers</code> <code>[-4 | -6]</code><dd>Obtain and print a list of all peers and clients showing
-<kbd>dstadr</kbd>
-(associated with any given IP version).
-<br><dt><code>lpeers</code> <code>[-4 | -6]</code><dd>Print a peer spreadsheet for the appropriate IP version(s).
-<kbd>dstadr</kbd>
-(associated with any given IP version).
-<br><dt><code>monstats</code><dd>Display monitor facility statistics.
-<br><dt><code>mrulist</code> <code>[limited | kod | mincount=</code><kbd>count</kbd><code> | laddr=</code><kbd>localaddr</kbd><code> | sort=</code><kbd>sortorder</kbd><code> | resany=</code><kbd>hexmask</kbd><code> | resall=</code><kbd>hexmask</kbd><code>]</code><dd>Obtain and print traffic counts collected and maintained by the monitor facility.
+to the server as run-time configuration commands in the same format as
+lines in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is required.
+<br><dt><code>ifstats</code><dd>Display status and statistics counters for each local network interface address:
+interface number, interface name and address or broadcast, drop, flag,
+ttl, mc, received, sent, send failed, peers, uptime.
+Authentication is required.
+<br><dt><code>iostats</code><dd>Display network and reference clock I/O statistics:
+time since reset, receive buffers, free receive buffers, used receive buffers,
+low water refills, dropped packets, ignored packets, received packets,
+packets sent, packet send failures, input wakeups, useful input wakeups.
+<br><dt><code>kerninfo</code><dd>Display kernel loop and PPS statistics:
+associd, status, pll offset, pll frequency, maximum error,
+estimated error, kernel status, pll time constant, precision,
+frequency tolerance, pps frequency, pps stability, pps jitter,
+calibration interval, calibration cycles, jitter exceeded,
+stability exceeded, calibration errors.
+As with other ntpq output, times are in milliseconds; very small values
+may be shown as exponentials.
+The precision value displayed is in milliseconds as well, unlike the
+precision system variable.
+<br><dt><code>lassociations</code><dd>Perform the same function as the associations command, except display
+mobilized and unmobilized associations, including all clients.
+<br><dt><code>lopeers</code> <code>[-4|-6]</code><dd>Display a list of all peers and clients showing
+<code>dstadr</code>
+(associated with the given IP version).
+<br><dt><code>lpassociations</code><dd>Display the last obtained list of associations, including all clients.
+<br><dt><code>lpeers</code> <code>[-4|-6]</code><dd>Display a list of all peers and clients (associated with the given IP version).
+<br><dt><code>monstats</code><dd>Display monitor facility status, statistics, and limits:
+enabled, addresses, peak addresses, maximum addresses,
+reclaim above count, reclaim older than, kilobytes, maximum kilobytes.
+<br><dt><code>mreadlist</code> <kbd>associdlo</kbd> <kbd>associdhi</kbd><br><dt><code>mrl</code> <kbd>associdlo</kbd> <kbd>associdhi</kbd><dd>Perform the same function as the
+<code>readlist</code>
+command for a range of association ids.
+<br><dt><code>mreadvar</code> <kbd>associdlo</kbd> <kbd>associdhi</kbd> <code>[</code><kbd>name</kbd><code>]</code><code>[,...]</code><dd>This range may be determined from the list displayed by any
+command showing associations.
+<br><dt><code>mrv</code> <kbd>associdlo</kbd> <kbd>associdhi</kbd> <code>[</code><kbd>name</kbd><code>]</code><code>[,...]</code><dd>Perform the same function as the
+<code>readvar</code>
+command for a range of association ids.
+This range may be determined from the list displayed by any
+command showing associations.
+<br><dt><code>mrulist</code> <code>[limited | kod | mincount=</code><kbd>count</kbd><code> | laddr=</code><kbd>localaddr</kbd><code> | sort=[-]</code><kbd>sortorder</kbd><code> | resany=</code><kbd>hexmask</kbd><code> | resall=</code><kbd>hexmask</kbd><code>]</code><dd>Display traffic counts of the most recently seen source addresses
+collected and maintained by the monitor facility.
With the exception of
-<code>sort</code>=<kbd>sortorder</kbd>,
+<code>sort</code>=<code>[-]</code><kbd>sortorder</kbd>,
the options filter the list returned by
-<code>ntpd.</code>
+<code>ntpd(8)</code>.
The
<code>limited</code>
and
<code>kod</code>
-options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
+options return only entries representing client addresses from which the
+last packet received triggered either discarding or a KoD response.
The
<code>mincount</code>=<kbd>count</kbd>
option filters entries representing less than
@@ -402,22 +463,26 @@ The
<kbd>sortorder</kbd>
defaults to
<code>lstint</code>
-and may be any of
+and may be
<code>addr</code>,
-<code>count</code>,
<code>avgint</code>,
+<code>count</code>,
<code>lstint</code>,
-or any of those preceded by a minus sign (hyphen) to reverse the sort order.
+or any of those preceded by
+-
+to reverse the sort order.
The output columns are:
<dl>
<dt>Column<dd>Description
-<br><dt><code>lstint</code><dd>Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by
+<br><dt><code>lstint</code><dd>Interval in seconds between the receipt of the most recent packet from
+this address and the completion of the retrieval of the MRU list by
<code>ntpq</code>
<br><dt><code>avgint</code><dd>Average interval in s between packets from this address.
<br><dt><code>rstr</code><dd>Restriction flags associated with this address.
Most are copied unchanged from the matching
<code>restrict</code>
-command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
+command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless
+the last packet from this address triggered a rate control response.
<br><dt><code>r</code><dd>Rate control indicator, either
a period,
<code>L</code>
@@ -429,20 +494,14 @@ rate limiting by discarding, or rate limiting with a KoD response, respectively.
<br><dt><code>v</code><dd>Packet version number.
<br><dt><code>count</code><dd>Packets received from this address.
<br><dt><code>rport</code><dd>Source port of last packet from this address.
-<br><dt><code>remote</code> <code>address</code><dd>DNS name, numeric address, or address followed by
+<br><dt><code>remote</code> <code>address</code><dd>host or DNS name, numeric address, or address followed by
claimed DNS name which could not be verified in parentheses.
</dl>
- <br><dt><code>mreadvar</code> <code>assocID</code> <code>assocID</code> <code>[</code><kbd>variable_name</kbd><code>[=</code><kbd>value</kbd><code>] ...]</code><br><dt><code>mrv</code> <code>assocID</code> <code>assocID</code> <code>[</code><kbd>variable_name</kbd><code>[=</code><kbd>value</kbd><code>] ...]</code><dd>Perform the same function as the
-<code>readvar</code>
-command, except for a range of association IDs.
-This range is determined from the association list cached by the most recent
-<code>associations</code>
-command.
-<br><dt><code>opeers</code> <code>[-4 | -6]</code><dd>Obtain and print the old-style list of all peers and clients showing
-<kbd>dstadr</kbd>
-(associated with any given IP version),
+ <br><dt><code>opeers</code> <code>[-4 | -6]</code><dd>Obtain and print the old-style list of all peers and clients showing
+<code>dstadr</code>
+(associated with the given IP version),
rather than the
-<kbd>refid</kbd>.
+<code>refid</code>.
<br><dt><code>passociations</code><dd>Perform the same function as the
<code>associations</code>
command,
@@ -457,18 +516,22 @@ except that it uses previously stored data rather than making a new query.
field of the
.Lk decode.html#peer "peer status word"
<br><dt><code>remote</code><dd>host name (or IP number) of peer.
-The value displayed will be truncated to 15 characters unless the
+The value displayed will be truncated to 15 characters unless the
+<code>ntpq</code>
<code>-w</code>
-flag is given, in which case the full value will be displayed
-on the first line,
-and the remaining data is displayed on the next line.
-<br><dt><code>refid</code><dd>association ID or
+option is given, in which case the full value will be displayed
+on the first line, and if too long,
+the remaining data will be displayed on the next line.
+<br><dt><code>refid</code><dd>source IP address or
.Lk decode.html#kiss "'kiss code"
-<br><dt><code>st</code><dd>stratum
+<br><dt><code>st</code><dd>stratum: 0 for local reference clocks, 1 for servers with local
+reference clocks, ..., 16 for unsynchronized server clocks
<br><dt><code>t</code><dd><code>u</code>:
unicast or manycast client,
<code>b</code>:
broadcast or multicast client,
+<code>p</code>:
+pool source,
<code>l</code>:
local (reference clock),
<code>s</code>:
@@ -479,89 +542,108 @@ manycast server,
broadcast server,
<code>M</code>:
multicast server
-<br><dt><code>when</code><dd>sec/min/hr since last received packet
-<br><dt><code>poll</code><dd>poll interval (log2 s)
+<br><dt><code>when</code><dd>time in seconds, minutes, hours, or days since the last packet
+was received, or
+-
+if a packet has never been received
+<br><dt><code>poll</code><dd>poll interval (s)
<br><dt><code>reach</code><dd>reach shift register (octal)
<br><dt><code>delay</code><dd>roundtrip delay
<br><dt><code>offset</code><dd>offset of server relative to this host
-<br><dt><code>jitter</code><dd>jitter
+<br><dt><code>jitter</code><dd>offset RMS error estimate.
</dl>
- <br><dt><code>apeers</code><dd>Display a list of peers in the form:
- <pre class="example"> [tally]remote refid assid st t when pool reach delay offset jitter
- </pre>
- <p>where the output is just like the
-<code>peers</code>
-command except that the
-<code>refid</code>
-is displayed in hex format and the association number is also displayed.
-<br><dt><code>pstats</code> <kbd>assocID</kbd><dd>Show the statistics for the peer with the given
-<kbd>assocID</kbd>.
-<br><dt><code>readlist</code> <kbd>assocID</kbd><br><dt><code>rl</code> <kbd>assocID</kbd><dd>Read the system or peer variables included in the variable list.
-<br><dt><code>readvar</code> <kbd>assocID</kbd> <kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]</code> <code>[, ...]</code><br><dt><code>rv</code> <kbd>assocID</kbd> <kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]</code> <code>[, ...]</code><dd>Display the specified variables.
+ <br><dt><code>pstats</code> <kbd>associd</kbd><dd>Display the statistics for the peer with the given
+<kbd>associd</kbd>:
+associd, status, remote host, local address, time last received,
+time until next send, reachability change, packets sent,
+packets received, bad authentication, bogus origin, duplicate,
+bad dispersion, bad reference time, candidate order.
+<br><dt><code>readlist</code> <code>[</code><kbd>associd</kbd><code>]</code><br><dt><code>rl</code> <code>[</code><kbd>associd</kbd><code>]</code><dd>Display all system or peer variables.
+If the
+<kbd>associd</kbd>
+is omitted, it is assumed to be zero.
+<br><dt><code>readvar</code> <code>[</code><kbd>associd</kbd> <kbd>name</kbd><code>[=</code><kbd>value</kbd><code>] [, ...]]</code><br><dt><code>rv</code> <code>[</code><kbd>associd</kbd> <kbd>name</kbd><code>[=</code><kbd>value</kbd><code>] [, ...]]</code><dd>Display the specified system or peer variables.
If
-<kbd>assocID</kbd>
+<kbd>associd</kbd>
is zero, the variables are from the
<a href="#System-Variables">System Variables</a>
name space, otherwise they are from the
<a href="#Peer-Variables">Peer Variables</a>
name space.
The
-<kbd>assocID</kbd>
+<kbd>associd</kbd>
is required, as the same name can occur in both spaces.
If no
<kbd>name</kbd>
-is included, all operative variables in the name space are displayed.
-
- <p>In this case only, if the
-<kbd>assocID</kbd>
-is omitted, it is assumed zero.
+is included, all operative variables in the name space are displayed.
+In this case only, if the
+<kbd>associd</kbd>
+is omitted, it is assumed to be zero.
Multiple names are specified with comma separators and without whitespace.
Note that time values are represented in milliseconds
and frequency values in parts-per-million (PPM).
Some NTP timestamps are represented in the format
-YYYYMMDDTTTT ,
-where YYYY is the year,
-MM the month of year,
-DD the day of month and
-TTTT the time of day.
-<br><dt><code>reslist</code><dd>Show the access control (restrict) list for
+<kbd>YYYY</kbd><kbd>MM</kbd> <kbd>DD</kbd> <kbd>TTTT</kbd>,
+where
+<kbd>YYYY</kbd>
+is the year,
+<kbd>MM</kbd>
+the month of year,
+<kbd>DD</kbd>
+the day of month and
+<kbd>TTTT</kbd>
+the time of day.
+<br><dt><code>reslist</code><dd>Display the access control (restrict) list for
<code>ntpq</code>
-
- <br><dt><code>saveconfig</code> <kbd>filename</kbd><dd>Write the current configuration,
-including any runtime modifications given with
+Authentication is required.
+<br><dt><code>saveconfig</code> <kbd>filename</kbd><dd>Save the current configuration,
+including any runtime modifications made by
<code>:config</code>
or
<code>config-from-file</code>,
-to the ntpd host's file
+to the NTP server host file
<kbd>filename</kbd>.
This command will be rejected by the server unless
.Lk miscopt.html#saveconfigdir "saveconfigdir"
appears in the
-<code>ntpd</code>
+<code>ntpd(8)</code>
configuration file.
<kbd>filename</kbd>
can use
-<code>strftime()</code>
-format specifies to substitute the current date and time, for example,
-<code>q]saveconfig</code> <code>ntp-%Y%m%d-%H%M%S.confq]</code>.
-The filename used is stored in system variable
+<code>date(1)</code>
+format specifiers to substitute the current date and time, for
+example,
+ <pre class="example"> <code>saveconfig</code> <span class="file">ntp-%Y%m%d-%H%M%S.conf</span>.
+ </pre>
+ <p>The filename used is stored in system variable
<code>savedconfig</code>.
Authentication is required.
-<br><dt><code>timerstats</code><dd>Display interval timer counters.
-<br><dt><code>writelist</code> <kbd>assocID</kbd><dd>Write the system or peer variables included in the variable list.
-<br><dt><code>writevar</code> <kbd>assocID</kbd> <kbd>name</kbd>=<kbd>value</kbd> <code>[, ...]</code><dd>Write the specified variables.
+<br><dt><code>sysinfo</code><dd>Display system operational summary:
+associd, status, system peer, system peer mode, leap indicator,
+stratum, log2 precision, root delay, root dispersion,
+reference id, reference time, system jitter, clock jitter,
+clock wander, broadcast delay, symm. auth. delay.
+<br><dt><code>sysstats</code><dd>Display system uptime and packet counts maintained in the
+protocol module:
+uptime, sysstats reset, packets received, current version,
+older version, bad length or format, authentication failed,
+declined, restricted, rate limited, KoD responses,
+processed for time.
+<br><dt><code>timerstats</code><dd>Display interval timer counters:
+time since reset, timer overruns, calls to transmit.
+<br><dt><code>writelist</code> <kbd>associd</kbd><dd>Set all system or peer variables included in the variable list.
+<br><dt><code>writevar</code> <kbd>associd</kbd> <kbd>name</kbd>=<kbd>value</kbd> <code>[, ...]</code><dd>Set the specified variables in the variable list.
If the
-<kbd>assocID</kbd>
+<kbd>associd</kbd>
is zero, the variables are from the
<a href="#System-Variables">System Variables</a>
name space, otherwise they are from the
<a href="#Peer-Variables">Peer Variables</a>
name space.
The
-<kbd>assocID</kbd>
+<kbd>associd</kbd>
is required, as the same name can occur in both spaces.
-<br><dt><code>sysinfo</code><dd>Display operational summary.
-<br><dt><code>sysstats</code><dd>Print statistics counters maintained in the protocol module.
+Authentication is required.
</dl>
<h5 class="subsubsection">Status Words and Kiss Codes</h5>
@@ -570,10 +652,10 @@ is required, as the same name can occur in both spaces.
in a set of status words
maintained by the system.
Status information is also available on a per-association basis.
-These words are displayed in the
-<code>rv</code>
+These words are displayed by the
+<code>readlist</code>
and
-<code>as</code>
+<code>associations</code>
commands both in hexadecimal and in decoded short tip strings.
The codes, tips and short explanations are documented on the
.Lk decode.html "Event Messages and Status Words"
@@ -592,9 +674,10 @@ in the reference identifier field in various billboards.
<h5 class="subsubsection">System Variables</h5>
<p>The following system variables appear in the
-<code>rv</code>
+<code>readlist</code>
billboard.
Not all variables are displayed in some configurations.
+
<dl>
<dt>Variable<dd>Description
<br><dt><code>status</code><dd>.Lk decode.html#sys "system status word"
@@ -606,16 +689,16 @@ Not all variables are displayed in some configurations.
<br><dt><code>precision</code><dd>precision (log2 s)
<br><dt><code>rootdelay</code><dd>total roundtrip delay to the primary reference clock
<br><dt><code>rootdisp</code><dd>total dispersion to the primary reference clock
-<br><dt><code>peer</code><dd>system peer association ID
-<br><dt><code>tc</code><dd>time constant and poll exponent (log2 s) (3-17)
-<br><dt><code>mintc</code><dd>minimum time constant (log2 s) (3-10)
-<br><dt><code>clock</code><dd>date and time of day
-<br><dt><code>refid</code><dd>reference ID or
+<br><dt><code>refid</code><dd>reference id or
.Lk decode.html#kiss "kiss code"
<br><dt><code>reftime</code><dd>reference time
-<br><dt><code>offset</code><dd>combined offset of server relative to this host
+<br><dt><code>clock</code><dd>date and time of day
+<br><dt><code>peer</code><dd>system peer association id
+<br><dt><code>tc</code><dd>time constant and poll exponent (log2 s) (3-17)
+<br><dt><code>mintc</code><dd>minimum time constant (log2 s) (3-10)
+<br><dt><code>offset</code><dd>combined offset of server relative to this host
+<br><dt><code>frequency</code><dd>frequency drift (PPM) relative to hardware clock
<br><dt><code>sys_jitter</code><dd>combined system jitter
-<br><dt><code>frequency</code><dd>frequency offset (PPM) relative to hardware clock
<br><dt><code>clk_wander</code><dd>clock frequency wander (PPM)
<br><dt><code>clk_jitter</code><dd>clock jitter
<br><dt><code>tai</code><dd>TAI-UTC offset (s)
@@ -630,7 +713,6 @@ the clock jitter statistic is computed by the clock discipline module.
additional system variables are displayed,
including some or all of the following,
depending on the particular Autokey dance:
-
<dl>
<dt>Variable<dd>Description
<br><dt><code>host</code><dd>Autokey host name for this host
@@ -646,13 +728,13 @@ depending on the particular Autokey dance:
<h5 class="subsubsection">Peer Variables</h5>
<p>The following peer variables appear in the
-<code>rv</code>
+<code>readlist</code>
billboard for each association.
Not all variables are displayed in some configurations.
<dl>
<dt>Variable<dd>Description
-<br><dt><code>associd</code><dd>association ID
+<br><dt><code>associd</code><dd>association id
<br><dt><code>status</code><dd>.Lk decode.html#peer "peer status word"
<br><dt><code>srcadr</code><dd>source (remote) IP address
<br><dt><code>srcport</code><dd>source (remote) port
@@ -663,9 +745,10 @@ Not all variables are displayed in some configurations.
<br><dt><code>precision</code><dd>precision (log2 s)
<br><dt><code>rootdelay</code><dd>total roundtrip delay to the primary reference clock
<br><dt><code>rootdisp</code><dd>total root dispersion to the primary reference clock
-<br><dt><code>refid</code><dd>reference ID or
+<br><dt><code>refid</code><dd>reference id or
.Lk decode.html#kiss "kiss code"
<br><dt><code>reftime</code><dd>reference time
+<br><dt><code>rec</code><dd>last packet received time
<br><dt><code>reach</code><dd>reach register (octal)
<br><dt><code>unreach</code><dd>unreach counter
<br><dt><code>hmode</code><dd>host mode (1-6)
@@ -675,11 +758,11 @@ Not all variables are displayed in some configurations.
<br><dt><code>headway</code><dd>headway (see
.Lk rate.html "Rate Management and the Kiss-o'-Death Packet" )
<br><dt><code>flash</code><dd>.Lk decode.html#flash "flash status word"
+<br><dt><code>keyid</code><dd>symmetric key id
<br><dt><code>offset</code><dd>filter offset
<br><dt><code>delay</code><dd>filter delay
<br><dt><code>dispersion</code><dd>filter dispersion
<br><dt><code>jitter</code><dd>filter jitter
-<br><dt><code>ident</code><dd>Autokey group name for this association
<br><dt><code>bias</code><dd>unicast/broadcast bias
<br><dt><code>xleave</code><dd>interleave delay (see
.Lk xleave.html "NTP Interleaved Modes" )
@@ -688,7 +771,8 @@ Not all variables are displayed in some configurations.
<code>bias</code>
variable is calculated when the first broadcast packet is received
after the calibration volley.
-It represents the offset of the broadcast subgraph relative to the unicast subgraph.
+It represents the offset of the broadcast subgraph relative to the
+unicast subgraph.
The
<code>xleave</code>
variable appears only for the interleaved symmetric and interleaved modes.
@@ -703,20 +787,21 @@ additional peer variables are displayed, including the following:
<br><dt><code>host</code><dd>Autokey server name
<br><dt><code>flags</code><dd>peer flags (see Autokey specification)
<br><dt><code>signature</code><dd>OpenSSL digest/signature scheme
-<br><dt><code>initsequence</code><dd>initial key ID
+<br><dt><code>initsequence</code><dd>initial key id
<br><dt><code>initkey</code><dd>initial key index
<br><dt><code>timestamp</code><dd>Autokey signature timestamp
+<br><dt><code>ident</code><dd>Autokey group name for this association
</dl>
<h5 class="subsubsection">Clock Variables</h5>
<p>The following clock variables appear in the
-<code>cv</code>
+<code>clocklist</code>
billboard for each association with a reference clock.
Not all variables are displayed in some configurations.
<dl>
<dt>Variable<dd>Description
-<br><dt><code>associd</code><dd>association ID
+<br><dt><code>associd</code><dd>association id
<br><dt><code>status</code><dd>.Lk decode.html#clock "clock status word"
<br><dt><code>device</code><dd>device description
<br><dt><code>timecode</code><dd>ASCII time code string (specific to device)
@@ -727,7 +812,7 @@ Not all variables are displayed in some configurations.
<br><dt><code>fudgetime1</code><dd>fudge time 1
<br><dt><code>fudgetime2</code><dd>fudge time 2
<br><dt><code>stratum</code><dd>driver stratum
-<br><dt><code>refid</code><dd>driver reference ID
+<br><dt><code>refid</code><dd>driver reference id
<br><dt><code>flags</code><dd>driver flags
</dl>
@@ -770,12 +855,12 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p10-beta
+<pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p10
Usage: ntpq [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [ host ...]
Flg Arg Option-Name Description
- -4 no ipv4 Force IPv4 DNS name resolution
+ -4 no ipv4 Force IPv4 name resolution
- prohibits the option 'ipv6'
- -6 no ipv6 Force IPv6 DNS name resolution
+ -6 no ipv6 Force IPv6 name resolution
- prohibits the option 'ipv4'
-c Str command run a command and exit
- may appear multiple times
@@ -826,7 +911,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
<h4 class="subsection">ipv4 option (-4)</h4>
<p><a name="index-ntpq_002dipv4-4"></a>
-This is the &ldquo;force ipv4 dns name resolution&rdquo; option.
+This is the &ldquo;force ipv4 name resolution&rdquo; option.
<p class="noindent">This option has some usage constraints. It:
<ul>
@@ -834,7 +919,7 @@ This is the &ldquo;force ipv4 dns name resolution&rdquo; option.
ipv6.
</ul>
- <p>Force DNS resolution of following host names on the command line
+ <p>Force resolution of following host names on the command line
to the IPv4 namespace.
<div class="node">
<p><hr>
@@ -847,7 +932,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
<h4 class="subsection">ipv6 option (-6)</h4>
<p><a name="index-ntpq_002dipv6-5"></a>
-This is the &ldquo;force ipv6 dns name resolution&rdquo; option.
+This is the &ldquo;force ipv6 name resolution&rdquo; option.
<p class="noindent">This option has some usage constraints. It:
<ul>
@@ -855,7 +940,7 @@ This is the &ldquo;force ipv6 dns name resolution&rdquo; option.
ipv4.
</ul>
- <p>Force DNS resolution of following host names on the command line
+ <p>Force resolution of following host names on the command line
to the IPv6 namespace.
<div class="node">
<p><hr>
@@ -1185,7 +1270,7 @@ This must correspond to a key ID configured in <code>ntp.conf</code> for this pu
with default <code>MD5</code>.
If the OpenSSL library is installed,
digest can be be any message digest algorithm supported by the library.
-The current selections are: <code>MD2</code>, <code>MD4</code>, <code>MD5</code>, <code>MDC2</code>, <code>RIPEMD160</code>, <code>SHA</code> and <code>SHA1</code>.
+The current selections are: <code>AES128CMAC</code>, <code>MD2</code>, <code>MD4</code>, <code>MD5</code>, <code>MDC2</code>, <code>RIPEMD160</code>, <code>SHA</code> and <code>SHA1</code>.
<br><dt><code><a name="ntpversion"></a> ntpversion 1 | 2 | 3 | 4</code><dd>Sets the NTP version number which <code>ntpq</code> claims in packets.
Defaults to 2.
diff --git a/contrib/ntp/ntpq/ntpq.man.in b/contrib/ntp/ntpq/ntpq.man.in
index 60c62a7..d28d30c 100644
--- a/contrib/ntp/ntpq/ntpq.man.in
+++ b/contrib/ntp/ntpq/ntpq.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpq @NTPQ_MS@ "21 Mar 2017" "4.2.8p10" "User Commands"
+.TH ntpq @NTPQ_MS@ "27 Feb 2018" "4.2.8p11" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-P4aWgw/ag-p5aWew)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-D4aGRT/ag-Q4ayQT)
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:45:26 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:15:22 PM by AutoGen 5.18.5
.\" From the definitions ntpq-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -31,15 +31,14 @@
.ne 2
.SH DESCRIPTION
+.sp \n(Ppu
+.ne 2
+
The
\f\*[B-Font]ntpq\fP
-utility program is used to query NTP servers which
-implement the standard NTP mode 6 control message formats defined
-in Appendix B of the NTPv3 specification RFC1305, requesting
+utility program is used to query NTP servers to monitor NTP operations
+and performance, requesting
information about current state and/or changes in that state.
-The same formats are used in NTPv4, although some of the
-variables have changed and new ones added. The description on this
-page is for the NTPv4 variables.
The program may be run either in interactive mode or controlled using
command line arguments.
Requests to read and write arbitrary
@@ -50,6 +49,9 @@ The
utility can also obtain and print a
list of peers in a common format by sending multiple queries to the
server.
+.sp \n(Ppu
+.ne 2
+
If one or more request options is included on the command line
when
\f\*[B-Font]ntpq\fP
@@ -67,6 +69,9 @@ The
\f\*[B-Font]ntpq\fP
utility will prompt for
commands if the standard input is a terminal device.
+.sp \n(Ppu
+.ne 2
+
\f\*[B-Font]ntpq\fP
uses NTP mode 6 packets to communicate with the
NTP server, and hence can be used to query any compatible server on
@@ -80,6 +85,21 @@ utility makes
one attempt to retransmit requests, and will time requests out if
the remote host is not heard from within a suitable timeout
time.
+.sp \n(Ppu
+.ne 2
+
+Note that in contexts where a host name is expected, a
+\f\*[B-Font]\-4\f[]
+qualifier preceding the host name forces resolution to the IPv4
+namespace, while a
+\f\*[B-Font]\-6\f[]
+qualifier forces resolution to the IPv6 namespace.
+For examples and usage, see the
+\*[Lq]NTP Debugging Techniques\*[Rq]
+page.
+.sp \n(Ppu
+.ne 2
+
Specifying a
command line option other than
\f\*[B-Font]\-i\f[]
@@ -93,64 +113,65 @@ Otherwise,
will attempt to read
interactive format commands from the standard input.
.SS "Internal Commands"
+.sp \n(Ppu
+.ne 2
+
Interactive format commands consist of a keyword followed by zero
to four arguments.
Only enough characters of the full keyword to
uniquely identify the command need be typed.
+.sp \n(Ppu
+.ne 2
+
A
number of interactive format commands are executed entirely within
the
\f\*[B-Font]ntpq\fP
-utility itself and do not result in NTP mode 6
+utility itself and do not result in NTP
requests being sent to a server.
These are described following.
-.TP 20
-.NOP \f\*[B-Font]?\f[] [\f\*[I-Font]command_keyword\f[]]
+.TP 15
+.NOP \f\*[B-Font]?\f[] [\f\*[I-Font]command\f[]]
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]help\f[] [\f\*[I-Font]command_keyword\f[]]
+.TP 15
+.NOP \f\*[B-Font]help\f[] [\f\*[I-Font]command\f[]]
A
\[oq]\&?\[cq]
-by itself will print a list of all the command
-keywords known to this incarnation of
+by itself will print a list of all the commands
+known to
\f\*[B-Font]ntpq\fP.
A
\[oq]\&?\[cq]
-followed by a command keyword will print function and usage
+followed by a command name will print function and usage
information about the command.
-This command is probably a better
-source of information about
-\f\*[B-Font]ntpq\fP
-than this manual
-page.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]addvars\f[] \f\*[I-Font]variable_name\f[][\f\*[B-Font]=value\f[]] \f\*[B-Font]...\f[]
+.TP 15
+.NOP \f\*[B-Font]addvars\f[] \f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]][,...]
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]rmvars\f[] \f\*[I-Font]variable_name\f[] \f\*[B-Font]...\f[]
+.TP 15
+.NOP \f\*[B-Font]rmvars\f[] \f\*[I-Font]name\f[][,...]
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]clearvars\f[]
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]showvars\f[]
-The data carried by NTP mode 6 messages consists of a list of
+The arguments to this command consist of a list of
items of the form
-\[oq]variable_name=value\[cq],
+\f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]],
where the
-\[oq]=value\[cq]
+.NOP \&=\f\*[I-Font]value\f[]
is ignored, and can be omitted,
in requests to the server to read variables.
The
\f\*[B-Font]ntpq\fP
-utility maintains an internal list in which data to be included in control
-messages can be assembled, and sent using the
+utility maintains an internal list in which data to be included in
+messages can be assembled, and displayed or set using the
\f\*[B-Font]readlist\f[]
and
\f\*[B-Font]writelist\f[]
@@ -165,7 +186,7 @@ The
\f\*[B-Font]rmvars\f[]
command can be used to remove individual variables from the list,
while the
-\f\*[B-Font]clearlist\f[]
+\f\*[B-Font]clearvars\f[]
command removes all variables from the
list.
The
@@ -173,33 +194,29 @@ The
command displays the current list of optional variables.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]authenticate\f[] [yes | no]
+.TP 15
+.NOP \f\*[B-Font]authenticate\f[] [\f\*[B-Font]yes\f[]|\f\*[B-Font]no\f[]]
Normally
\f\*[B-Font]ntpq\fP
does not authenticate requests unless
they are write requests.
The command
-\[oq]authenticate yes\[cq]
+\f\*[B-Font]authenticate\f[] \f\*[B-Font]yes\f[]
causes
\f\*[B-Font]ntpq\fP
to send authentication with all requests it
makes.
Authenticated requests causes some servers to handle
-requests slightly differently, and can occasionally melt the CPU in
-fuzzballs if you turn authentication on before doing a
-\f\*[B-Font]peer\f[]
-display.
+requests slightly differently.
The command
-\[oq]authenticate\[cq]
+\f\*[B-Font]authenticate\f[]
causes
\f\*[B-Font]ntpq\fP
to display whether or not
-\f\*[B-Font]ntpq\fP
-is currently autheinticating requests.
+it is currently authenticating requests.
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]cooked\f[]
Causes output from query commands to be "cooked", so that
variables which are recognized by
@@ -208,19 +225,19 @@ will have their
values reformatted for human consumption.
Variables which
\f\*[B-Font]ntpq\fP
-thinks should have a decodable value but didn't are
+could not decode completely are
marked with a trailing
\[oq]\&?\[cq].
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]debug\f[] [\f\*[B-Font]more\f[] | \f\*[B-Font]less\f[] | \f\*[B-Font]off\f[]]
+.TP 15
+.NOP \f\*[B-Font]debug\f[] [\f\*[B-Font]more\f[]|\f\*[B-Font]less\f[]|\f\*[B-Font]off\f[]]
With no argument, displays the current debug level.
-Otherwise, the debug level is changed to the indicated level.
+Otherwise, the debugging level is changed as indicated.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]delay\f[] \f\*[I-Font]milliseconds\f[]
+.TP 15
+.NOP \f\*[B-Font]delay\f[] [\f\*[I-Font]milliseconds\f[]]
Specify a time interval to be added to timestamps included in
requests which require authentication.
This is used to enable
@@ -229,23 +246,33 @@ or between machines whose clocks are unsynchronized.
Actually the
server does not now require timestamps in authenticated requests,
so this command may be obsolete.
+Without any arguments, displays the current delay.
+.br
+.ns
+.TP 15
+.NOP \f\*[B-Font]drefid\f[] [\f\*[B-Font]hash\f[]|\f\*[B-Font]ipv4\f[]]
+Display refids as IPv4 or hash.
+Without any arguments, displays whether refids are shown as IPv4
+addresses or hashes.
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]exit\f[]
Exit
\f\*[B-Font]ntpq\fP.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]host\f[] \f\*[I-Font]hostname\f[]
+.TP 15
+.NOP \f\*[B-Font]host\f[] [\f\*[I-Font]name\f[]]
Set the host to which future queries will be sent.
-\f\*[I-Font]hostname\f[]
+The
+\f\*[I-Font]name\f[]
may be either a host name or a numeric address.
+Without any arguments, displays the current host.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]hostnames\f[] [\f\*[B-Font]yes\f[] | \f\*[B-Font]no\f[]]
+.TP 15
+.NOP \f\*[B-Font]hostnames\f[] [\f\*[B-Font]yes\f[]|\f\*[B-Font]no\f[]]
If
\f\*[B-Font]yes\f[]
is specified, host names are printed in
@@ -260,10 +287,12 @@ unless
modified using the command line
\f\*[B-Font]\-n\f[]
switch.
+Without any arguments, displays whether host names or numeric addresses
+are shown.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]keyid\f[] \f\*[I-Font]keyid\f[]
+.TP 15
+.NOP \f\*[B-Font]keyid\f[] [\f\*[I-Font]keyid\f[]]
This command allows the specification of a key number to be
used to authenticate configuration requests.
This must correspond
@@ -271,24 +300,26 @@ to the
\f\*[B-Font]controlkey\f[]
key number the server has been configured to use for this
purpose.
+Without any arguments, displays the current
+\f\*[I-Font]keyid\f[].
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]keytype\f[] [\f\*[B-Font]md5\f[] | \f\*[B-Font]OpenSSLDigestType\f[]]
-Specify the type of key to use for authenticating requests.
-\f\*[B-Font]md5\f[]
-is alway supported.
+.TP 15
+.NOP \f\*[B-Font]keytype\f[] [\f\*[I-Font]digest\f[]]
+Specify the digest algorithm to use for authenticating requests, with default
+\f\*[B-Font]MD5\f[].
If
\f\*[B-Font]ntpq\fP
-was built with OpenSSL support,
-any digest type supported by OpenSSL can also be provided.
+was built with OpenSSL support, and OpenSSL is installed,
+\f\*[I-Font]digest\f[]
+can be any message digest algorithm supported by OpenSSL.
If no argument is given, the current
-\f\*[B-Font]keytype\f[]
-is displayed.
+\f\*[B-Font]keytype\f[] \f\*[I-Font]digest\f[]
+algorithm used is displayed.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]ntpversion\f[] [\f\*[B-Font]1\f[] | \f\*[B-Font]2\f[] | \f\*[B-Font]3\f[] | \f\*[B-Font]4\f[]]
+.TP 15
+.NOP \f\*[B-Font]ntpversion\f[] [\f\*[B-Font]1\f[]|\f\*[B-Font]2\f[]|\f\*[B-Font]3\f[]|\f\*[B-Font]4\f[]]
Sets the NTP version number which
\f\*[B-Font]ntpq\fP
claims in
@@ -301,7 +332,7 @@ With no argument, displays the current NTP version that will be used
when communicating with servers.
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]passwd\f[]
This command prompts you to type in a password (which will not
be echoed) which will be used to authenticate configuration
@@ -309,22 +340,23 @@ requests.
The password must correspond to the key configured for
use by the NTP server for this purpose if such requests are to be
successful.
-.\" Not yet implemented.
-.\" .It Ic poll
-.\" .Op Ar n
-.\" .Op Ic verbose
-.\" Poll an NTP server in client mode
-.\" .Ar n
-.\" times.
.br
.ns
-.TP 20
+.TP 15
+.NOP \f\*[B-Font]poll\f[] [\f\*[I-Font]n\f[]] [\f\*[B-Font]verbose\f[]]
+Poll an NTP server in client mode
+\f\*[I-Font]n\f[]
+times.
+Poll not implemented yet.
+.br
+.ns
+.TP 15
.NOP \f\*[B-Font]quit\f[]
Exit
\f\*[B-Font]ntpq\fP.
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]raw\f[]
Causes all output from query commands is printed as received
from the remote server.
@@ -333,130 +365,214 @@ the data is to transform nonascii data into a printable (but barely
understandable) form.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]timeout\f[] \f\*[I-Font]milliseconds\f[]
+.TP 15
+.NOP \f\*[B-Font]timeout\f[] [\f\*[I-Font]milliseconds\f[]]
Specify a timeout period for responses to server queries.
The
default is about 5000 milliseconds.
+Without any arguments, displays the current timeout period.
Note that since
\f\*[B-Font]ntpq\fP
retries each query once after a timeout, the total waiting time for
a timeout will be twice the timeout value set.
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]version\f[]
-Print the version of the
+Display the version of the
\f\*[B-Font]ntpq\fP
program.
.PP
.SS "Control Message Commands"
-Association IDs are used to identify system, peer and clock variables.
-System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace.
-Most control commands send a single mode-6 message to the server and expect a single response message.
+Association ids are used to identify system, peer and clock variables.
+System variables are assigned an association id of zero and system name
+space, while each association is assigned a nonzero association id and
+peer namespace.
+Most control commands send a single message to the server and expect a
+single response message.
The exceptions are the
-\f[C]peers\f[]
+\f\*[B-Font]peers\f[]
command, which sends a series of messages,
and the
-\f[C]mreadlist\f[]
+\f\*[B-Font]mreadlist\f[]
and
-\f[C]mreadvar\f[]
+\f\*[B-Font]mreadvar\f[]
commands, which iterate over a range of associations.
.TP 10
+.NOP \f\*[B-Font]apeers\f[]
+Display a list of peers in the form:
+.Dl [tally]remote refid assid st t when pool reach delay offset jitter
+where the output is just like the
+\f\*[B-Font]peers\f[]
+command except that the
+\f\*[B-Font]refid\f[]
+is displayed in hex format and the association number is also displayed.
+.br
+.ns
+.TP 10
.NOP \f\*[B-Font]associations\f[]
Display a list of mobilized associations in the form:
.Dl ind assid status conf reach auth condition last_event cnt
.RS
.IP \fB\(bu\fP 2
-.IP \fB\(bu\fP 2 \f[C]ind\f[] \f[C]Ta\f[] \f[C]index\f[] \f[C]on\f[] \f[C]this\f[] \f[C]list\f[]
-.IP \fB\(bu\fP 2 \f[C]assid\f[] \f[C]Ta\f[] \f[C]association\f[] \f[C]ID\f[]
-.IP \fB\(bu\fP 2 \f[C]status\f[] \f[C]Ta\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word\f[]
-.IP \fB\(bu\fP 2 \f[C]conf\f[] \f[C]Ta\f[] \f[C]yes\f[]: \f[C]persistent,\f[] \f[C]no\f[]: \f[C]ephemeral\f[]
-.IP \fB\(bu\fP 2 \f[C]reach\f[] \f[C]Ta\f[] \f[C]yes\f[]: \f[C]reachable,\f[] \f[C]no\f[]: \f[C]unreachable\f[]
-.IP \fB\(bu\fP 2 \f[C]auth\f[] \f[C]Ta\f[] \f[C]ok\f[], \f[C]yes\f[], \f[C]bad\f[] \f[C]and\f[] \f[C]none\f[]
-.IP \fB\(bu\fP 2 \f[C]condition\f[] \f[C]Ta\f[] \f[C]selection\f[] \f[C]status\f[] \f[C](see\f[] \f[C]the\f[] \f[C]select\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
-.IP \fB\(bu\fP 2 \f[C]last_event\f[] \f[C]Ta\f[] \f[C]event\f[] \f[C]report\f[] \f[C](see\f[] \f[C]the\f[] \f[C]event\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
-.IP \fB\(bu\fP 2 \f[C]cnt\f[] \f[C]Ta\f[] \f[C]event\f[] \f[C]count\f[] \f[C](see\f[] \f[C]the\f[] \f[C]count\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]ind\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]index\f[] \f\*[B-Font]on\f[] \f\*[B-Font]this\f[] \f\*[B-Font]list\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]assid\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]association\f[] \f\*[B-Font]id\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]status\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]conf\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]yes\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]persistent,\f[] \f\*[B-Font]no\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]ephemeral\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]reach\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]yes\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]reachable,\f[] \f\*[B-Font]no\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]unreachable\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]auth\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]ok\f[], \f\*[B-Font]yes\f[], \f\*[B-Font]bad\f[] \f\*[B-Font]No\f[] \f\*[B-Font]and\f[] \f\*[B-Font]none\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]condition\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]selection\f[] \f\*[B-Font]status\f[] \f\*[B-Font]\&(see\f[] \f\*[B-Font]the\f[] \f\*[B-Font]select\f[] \f\*[B-Font]No\f[] \f\*[B-Font]field\f[] \f\*[B-Font]of\f[] \f\*[B-Font]the\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\&)\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]last_event\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]event\f[] \f\*[B-Font]report\f[] \f\*[B-Font]\&(see\f[] \f\*[B-Font]the\f[] \f\*[B-Font]event\f[] \f\*[B-Font]No\f[] \f\*[B-Font]field\f[] \f\*[B-Font]of\f[] \f\*[B-Font]the\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\&)\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]cnt\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]event\f[] \f\*[B-Font]count\f[] \f\*[B-Font]\&(see\f[] \f\*[B-Font]the\f[] \f\*[B-Font]count\f[] \f\*[B-Font]No\f[] \f\*[B-Font]field\f[] \f\*[B-Font]of\f[] \f\*[B-Font]the\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\&)\f[]
.RE
.br
.ns
.TP 10
.NOP \f\*[B-Font]authinfo\f[]
-Display the authentication statistics.
+Display the authentication statistics counters:
+time since reset, stored keys, free keys, key lookups, keys not found,
+uncached keys, expired keys, encryptions, decryptions.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]clocklist\f[] [\f\*[I-Font]associd\f[]]
.br
.ns
.TP 10
-.NOP \f\*[B-Font]clockvar\f[] \f\*[I-Font]assocID\f[] [\f\*[I-Font]name\f[][\f\*[B-Font]=\f[]\f\*[I-Font]value\f[]] [] ...]
+.NOP \f\*[B-Font]cl\f[] [\f\*[I-Font]associd\f[]]
+Display all clock variables in the variable list for those associations
+supporting a reference clock.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]cv\f[] \f\*[I-Font]assocID\f[] [\f\*[I-Font]name\f[][\f\*[B-Font]=\f[]\f\*[I-Font]value\f[]] [] ...]
-Display a list of clock variables for those associations supporting a reference clock.
+.NOP \f\*[B-Font]clockvar\f[] [\f\*[I-Font]associd\f[]] [\f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]][] ,...]
.br
.ns
.TP 10
-.NOP \f\*[B-Font]:config\f[] [...]
-Send the remainder of the command line, including whitespace, to the server as a run-time configuration command in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.
+.NOP \f\*[B-Font]cv\f[] [\f\*[I-Font]associd\f[]] [\f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]][] ,...]
+Display a list of clock variables for those associations supporting a
+reference clock.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]:config\f[] \f\*[I-Font]configuration command line\f[]
+Send the remainder of the command line, including whitespace, to the
+server as a run-time configuration command in the same format as a line
+in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is of course required.
.br
.ns
.TP 10
.NOP \f\*[B-Font]config-from-file\f[] \f\*[I-Font]filename\f[]
-Send the each line of
+Send each line of
\f\*[I-Font]filename\f[]
-to the server as run-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required.
+to the server as run-time configuration commands in the same format as
+lines in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is required.
.br
.ns
.TP 10
.NOP \f\*[B-Font]ifstats\f[]
-Display statistics for each local network address. Authentication is required.
+Display status and statistics counters for each local network interface address:
+interface number, interface name and address or broadcast, drop, flag,
+ttl, mc, received, sent, send failed, peers, uptime.
+Authentication is required.
.br
.ns
.TP 10
.NOP \f\*[B-Font]iostats\f[]
-Display network and reference clock I/O statistics.
+Display network and reference clock I/O statistics:
+time since reset, receive buffers, free receive buffers, used receive buffers,
+low water refills, dropped packets, ignored packets, received packets,
+packets sent, packet send failures, input wakeups, useful input wakeups.
.br
.ns
.TP 10
.NOP \f\*[B-Font]kerninfo\f[]
-Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.
+Display kernel loop and PPS statistics:
+associd, status, pll offset, pll frequency, maximum error,
+estimated error, kernel status, pll time constant, precision,
+frequency tolerance, pps frequency, pps stability, pps jitter,
+calibration interval, calibration cycles, jitter exceeded,
+stability exceeded, calibration errors.
+As with other ntpq output, times are in milliseconds; very small values
+may be shown as exponentials.
+The precision value displayed is in milliseconds as well, unlike the
+precision system variable.
.br
.ns
.TP 10
.NOP \f\*[B-Font]lassociations\f[]
-Perform the same function as the associations command, except display mobilized and unmobilized associations.
+Perform the same function as the associations command, except display
+mobilized and unmobilized associations, including all clients.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]lopeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
-Obtain and print a list of all peers and clients showing
-\f\*[I-Font]dstadr\f[]
-(associated with any given IP version).
+.NOP \f\*[B-Font]lopeers\f[] [\f\*[B-Font]\-4\f[]|\f\*[B-Font]\-6\f[]]
+Display a list of all peers and clients showing
+\f\*[B-Font]dstadr\f[]
+(associated with the given IP version).
.br
.ns
.TP 10
-.NOP \f\*[B-Font]lpeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
-Print a peer spreadsheet for the appropriate IP version(s).
-\f\*[I-Font]dstadr\f[]
-(associated with any given IP version).
+.NOP \f\*[B-Font]lpassociations\f[]
+Display the last obtained list of associations, including all clients.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]lpeers\f[] [\f\*[B-Font]\-4\f[]|\f\*[B-Font]\-6\f[]]
+Display a list of all peers and clients (associated with the given IP version).
.br
.ns
.TP 10
.NOP \f\*[B-Font]monstats\f[]
-Display monitor facility statistics.
+Display monitor facility status, statistics, and limits:
+enabled, addresses, peak addresses, maximum addresses,
+reclaim above count, reclaim older than, kilobytes, maximum kilobytes.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mreadlist\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[]
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mrl\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[]
+Perform the same function as the
+\f\*[B-Font]readlist\f[]
+command for a range of association ids.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mreadvar\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[] [\f\*[I-Font]name\f[]][,...]
+This range may be determined from the list displayed by any
+command showing associations.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]mrulist\f[] [\f\*[B-Font]limited\f[] | \f\*[B-Font]kod\f[] | \f\*[B-Font]mincount\f[]=\f\*[I-Font]count\f[] | \f\*[B-Font]laddr\f[]=\f\*[I-Font]localaddr\f[] | \f\*[B-Font]sort\f[]=\f\*[I-Font]sortorder\f[] | \f\*[B-Font]resany\f[]=\f\*[I-Font]hexmask\f[] | \f\*[B-Font]resall\f[]=\f\*[I-Font]hexmask\f[]]
-Obtain and print traffic counts collected and maintained by the monitor facility.
+.NOP \f\*[B-Font]mrv\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[] [\f\*[I-Font]name\f[]][,...]
+Perform the same function as the
+\f\*[B-Font]readvar\f[]
+command for a range of association ids.
+This range may be determined from the list displayed by any
+command showing associations.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mrulist\f[] [\f\*[B-Font]limited\f[] | \f\*[B-Font]kod\f[] | \f\*[B-Font]mincount\f[]\&=\f\*[I-Font]count\f[] | \f\*[B-Font]laddr\f[]\&=\f\*[I-Font]localaddr\f[] | \f\*[B-Font]sort\f[]\&=[\&-]\f\*[I-Font]sortorder\f[] | \f\*[B-Font]resany\f[]\&=\f\*[I-Font]hexmask\f[] | \f\*[B-Font]resall\f[]\&=\f\*[I-Font]hexmask\f[]]
+Display traffic counts of the most recently seen source addresses
+collected and maintained by the monitor facility.
With the exception of
-\f\*[B-Font]sort\f[]=\f\*[I-Font]sortorder\f[],
+\f\*[B-Font]sort\f[]\&=[\&-]\f\*[I-Font]sortorder\f[],
the options filter the list returned by
-\f\*[B-Font]ntpd.\f[]
+\fCntpd\f[]\fR(8)\f[].
The
\f\*[B-Font]limited\f[]
and
\f\*[B-Font]kod\f[]
-options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
+options return only entries representing client addresses from which the
+last packet received triggered either discarding or a KoD response.
The
\f\*[B-Font]mincount\f[]=\f\*[I-Font]count\f[]
option filters entries representing less than
@@ -477,12 +593,14 @@ The
\f\*[I-Font]sortorder\f[]
defaults to
\f\*[B-Font]lstint\f[]
-and may be any of
+and may be
\f\*[B-Font]addr\f[],
-\f\*[B-Font]count\f[],
\f\*[B-Font]avgint\f[],
+\f\*[B-Font]count\f[],
\f\*[B-Font]lstint\f[],
-or any of those preceded by a minus sign (hyphen) to reverse the sort order.
+or any of those preceded by
+\[oq]\&-\[cq]
+to reverse the sort order.
The output columns are:
.RS
.TP 10
@@ -492,7 +610,8 @@ Description
.ns
.TP 10
.NOP \f\*[B-Font]lstint\f[]
-Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by
+Interval in seconds between the receipt of the most recent packet from
+this address and the completion of the retrieval of the MRU list by
\f\*[B-Font]ntpq\fP.
.br
.ns
@@ -506,7 +625,8 @@ Average interval in s between packets from this address.
Restriction flags associated with this address.
Most are copied unchanged from the matching
\f\*[B-Font]restrict\f[]
-command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
+command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless
+the last packet from this address triggered a rate control response.
.br
.ns
.TP 10
@@ -542,32 +662,18 @@ Source port of last packet from this address.
.ns
.TP 10
.NOP \f\*[B-Font]remote\f[] \f\*[B-Font]address\f[]
-DNS name, numeric address, or address followed by
+host or DNS name, numeric address, or address followed by
claimed DNS name which could not be verified in parentheses.
.RE
.br
.ns
.TP 10
-.NOP \f\*[B-Font]mreadvar\f[] \f\*[B-Font]assocID\f[] \f\*[B-Font]assocID\f[] [\f\*[I-Font]variable_name\f[][=\f\*[I-Font]value\f[]]] ...
-.br
-.ns
-.TP 10
-.NOP \f\*[B-Font]mrv\f[] \f\*[B-Font]assocID\f[] \f\*[B-Font]assocID\f[] [\f\*[I-Font]variable_name\f[][=\f\*[I-Font]value\f[]]] ...
-Perform the same function as the
-\f\*[B-Font]readvar\f[]
-command, except for a range of association IDs.
-This range is determined from the association list cached by the most recent
-\f\*[B-Font]associations\f[]
-command.
-.br
-.ns
-.TP 10
.NOP \f\*[B-Font]opeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
Obtain and print the old-style list of all peers and clients showing
-\f\*[I-Font]dstadr\f[]
-(associated with any given IP version),
+\f\*[B-Font]dstadr\f[]
+(associated with the given IP version),
rather than the
-\f\*[I-Font]refid\f[].
+\f\*[B-Font]refid\f[].
.br
.ns
.TP 10
@@ -599,22 +705,24 @@ field of the
.TP 10
.NOP \f\*[B-Font]remote\f[]
host name (or IP number) of peer.
-The value displayed will be truncated to 15 characters unless the
+The value displayed will be truncated to 15 characters unless the
+\f\*[B-Font]ntpq\fP
\f\*[B-Font]\-w\f[]
-flag is given, in which case the full value will be displayed
-on the first line,
-and the remaining data is displayed on the next line.
+option is given, in which case the full value will be displayed
+on the first line, and if too long,
+the remaining data will be displayed on the next line.
.br
.ns
.TP 10
.NOP \f\*[B-Font]refid\f[]
-association ID or
+source IP address or
.Lk decode.html#kiss "'kiss code"
.br
.ns
.TP 10
.NOP \f\*[B-Font]st\f[]
-stratum
+stratum: 0 for local reference clocks, 1 for servers with local
+reference clocks, ..., 16 for unsynchronized server clocks
.br
.ns
.TP 10
@@ -623,6 +731,8 @@ stratum
unicast or manycast client,
\f\*[B-Font]b\f[]:
broadcast or multicast client,
+\f\*[B-Font]p\f[]:
+pool source,
\f\*[B-Font]l\f[]:
local (reference clock),
\f\*[B-Font]s\f[]:
@@ -637,12 +747,15 @@ multicast server
.ns
.TP 10
.NOP \f\*[B-Font]when\f[]
-sec/min/hr since last received packet
+time in seconds, minutes, hours, or days since the last packet
+was received, or
+\[oq]\&-\[cq]
+if a packet has never been received
.br
.ns
.TP 10
.NOP \f\*[B-Font]poll\f[]
-poll interval (log2 s)
+poll interval (s)
.br
.ns
.TP 10
@@ -662,143 +775,159 @@ offset of server relative to this host
.ns
.TP 10
.NOP \f\*[B-Font]jitter\f[]
-jitter
+offset RMS error estimate.
.RE
.br
.ns
.TP 10
-.NOP \f\*[B-Font]apeers\f[]
-Display a list of peers in the form:
-.Dl [tally]remote refid assid st t when pool reach delay offset jitter
-where the output is just like the
-\f\*[B-Font]peers\f[]
-command except that the
-\f\*[B-Font]refid\f[]
-is displayed in hex format and the association number is also displayed.
-.br
-.ns
-.TP 10
-.NOP \f\*[B-Font]pstats\f[] \f\*[I-Font]assocID\f[]
-Show the statistics for the peer with the given
-\f\*[I-Font]assocID\f[].
+.NOP \f\*[B-Font]pstats\f[] \f\*[I-Font]associd\f[]
+Display the statistics for the peer with the given
+\f\*[I-Font]associd\f[]:
+associd, status, remote host, local address, time last received,
+time until next send, reachability change, packets sent,
+packets received, bad authentication, bogus origin, duplicate,
+bad dispersion, bad reference time, candidate order.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]readlist\f[] \f\*[I-Font]assocID\f[]
+.NOP \f\*[B-Font]readlist\f[] [\f\*[I-Font]associd\f[]]
.br
.ns
.TP 10
-.NOP \f\*[B-Font]rl\f[] \f\*[I-Font]assocID\f[]
-Read the system or peer variables included in the variable list.
+.NOP \f\*[B-Font]rl\f[] [\f\*[I-Font]associd\f[]]
+Display all system or peer variables.
+If the
+\f\*[I-Font]associd\f[]
+is omitted, it is assumed to be zero.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]readvar\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]
+.NOP \f\*[B-Font]readvar\f[] [\f\*[I-Font]associd\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]]
.br
.ns
.TP 10
-.NOP \f\*[B-Font]rv\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]
-Display the specified variables.
+.NOP \f\*[B-Font]rv\f[] [\f\*[I-Font]associd\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]]
+Display the specified system or peer variables.
If
-\f\*[I-Font]assocID\f[]
+\f\*[I-Font]associd\f[]
is zero, the variables are from the
\fISystem\f[] \fIVariables\f[]
name space, otherwise they are from the
\fIPeer\f[] \fIVariables\f[]
name space.
The
-\f\*[I-Font]assocID\f[]
+\f\*[I-Font]associd\f[]
is required, as the same name can occur in both spaces.
If no
\f\*[I-Font]name\f[]
is included, all operative variables in the name space are displayed.
In this case only, if the
-\f\*[I-Font]assocID\f[]
-is omitted, it is assumed zero.
+\f\*[I-Font]associd\f[]
+is omitted, it is assumed to be zero.
Multiple names are specified with comma separators and without whitespace.
Note that time values are represented in milliseconds
and frequency values in parts-per-million (PPM).
Some NTP timestamps are represented in the format
-YYYYMMDDTTTT ,
-where YYYY is the year,
-MM the month of year,
-DD the day of month and
-TTTT the time of day.
+\f\*[I-Font]YYYY\f[]\f\*[I-Font]MM\f[] \f\*[I-Font]DD\f[] \f\*[I-Font]TTTT\f[],
+where
+\f\*[I-Font]YYYY\f[]
+is the year,
+\f\*[I-Font]MM\f[]
+the month of year,
+\f\*[I-Font]DD\f[]
+the day of month and
+\f\*[I-Font]TTTT\f[]
+the time of day.
.br
.ns
.TP 10
.NOP \f\*[B-Font]reslist\f[]
-Show the access control (restrict) list for
+Display the access control (restrict) list for
\f\*[B-Font]ntpq\fP.
+Authentication is required.
.br
.ns
.TP 10
.NOP \f\*[B-Font]saveconfig\f[] \f\*[I-Font]filename\f[]
-Write the current configuration,
-including any runtime modifications given with
+Save the current configuration,
+including any runtime modifications made by
\f\*[B-Font]:config\f[]
or
\f\*[B-Font]config-from-file\f[],
-to the ntpd host's file
+to the NTP server host file
\f\*[I-Font]filename\f[].
This command will be rejected by the server unless
.Lk miscopt.html#saveconfigdir "saveconfigdir"
appears in the
-\f\*[B-Font]ntpd\f[]
+\fCntpd\f[]\fR(8)\f[]
configuration file.
\f\*[I-Font]filename\f[]
can use
-\fCstrftime\f[]\fR()\f[]
-format specifies to substitute the current date and time, for example,
-\f\*[B-Font]q]saveconfig\f[] \f\*[B-Font]ntp-%Y%m%d-%H%M%S.confq]\f[].
+\fCdate\f[]\fR(1)\f[]
+format specifiers to substitute the current date and time, for
+example,
+.in +4
+\f\*[B-Font]saveconfig\f[] \fIntp-%Y%m%d-%H%M%S.conf\f[].
+.in -4
The filename used is stored in system variable
\f\*[B-Font]savedconfig\f[].
Authentication is required.
.br
.ns
.TP 10
+.NOP \f\*[B-Font]sysinfo\f[]
+Display system operational summary:
+associd, status, system peer, system peer mode, leap indicator,
+stratum, log2 precision, root delay, root dispersion,
+reference id, reference time, system jitter, clock jitter,
+clock wander, broadcast delay, symm. auth. delay.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]sysstats\f[]
+Display system uptime and packet counts maintained in the
+protocol module:
+uptime, sysstats reset, packets received, current version,
+older version, bad length or format, authentication failed,
+declined, restricted, rate limited, KoD responses,
+processed for time.
+.br
+.ns
+.TP 10
.NOP \f\*[B-Font]timerstats\f[]
-Display interval timer counters.
+Display interval timer counters:
+time since reset, timer overruns, calls to transmit.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]writelist\f[] \f\*[I-Font]assocID\f[]
-Write the system or peer variables included in the variable list.
+.NOP \f\*[B-Font]writelist\f[] \f\*[I-Font]associd\f[]
+Set all system or peer variables included in the variable list.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]writevar\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[]=\f\*[I-Font]value\f[] [, ...]
-Write the specified variables.
+.NOP \f\*[B-Font]writevar\f[] \f\*[I-Font]associd\f[] \f\*[I-Font]name\f[]=\f\*[I-Font]value\f[] [, ...]
+Set the specified variables in the variable list.
If the
-\f\*[I-Font]assocID\f[]
+\f\*[I-Font]associd\f[]
is zero, the variables are from the
\fISystem\f[] \fIVariables\f[]
name space, otherwise they are from the
\fIPeer\f[] \fIVariables\f[]
name space.
The
-\f\*[I-Font]assocID\f[]
+\f\*[I-Font]associd\f[]
is required, as the same name can occur in both spaces.
-.br
-.ns
-.TP 10
-.NOP \f\*[B-Font]sysinfo\f[]
-Display operational summary.
-.br
-.ns
-.TP 10
-.NOP \f\*[B-Font]sysstats\f[]
-Print statistics counters maintained in the protocol module.
+Authentication is required.
.PP
.SS Status Words and Kiss Codes
The current state of the operating program is shown
in a set of status words
maintained by the system.
Status information is also available on a per-association basis.
-These words are displayed in the
-\f\*[B-Font]rv\f[]
+These words are displayed by the
+\f\*[B-Font]readlist\f[]
and
-\f\*[B-Font]as\f[]
+\f\*[B-Font]associations\f[]
commands both in hexadecimal and in decoded short tip strings.
The codes, tips and short explanations are documented on the
.Lk decode.html "Event Messages and Status Words"
@@ -817,9 +946,12 @@ They are now displayed, when appropriate,
in the reference identifier field in various billboards.
.SS System Variables
The following system variables appear in the
-\f\*[B-Font]rv\f[]
+\f\*[B-Font]readlist\f[]
billboard.
Not all variables are displayed in some configurations.
+.sp \n(Ppu
+.ne 2
+
.TP 10
.NOP Variable
Description
@@ -871,49 +1003,49 @@ total dispersion to the primary reference clock
.br
.ns
.TP 10
-.NOP \f\*[B-Font]peer\f[]
-system peer association ID
+.NOP \f\*[B-Font]refid\f[]
+reference id or
+.Lk decode.html#kiss "kiss code"
.br
.ns
.TP 10
-.NOP \f\*[B-Font]tc\f[]
-time constant and poll exponent (log2 s) (3-17)
+.NOP \f\*[B-Font]reftime\f[]
+reference time
.br
.ns
.TP 10
-.NOP \f\*[B-Font]mintc\f[]
-minimum time constant (log2 s) (3-10)
+.NOP \f\*[B-Font]clock\f[]
+date and time of day
.br
.ns
.TP 10
-.NOP \f\*[B-Font]clock\f[]
-date and time of day
+.NOP \f\*[B-Font]peer\f[]
+system peer association id
.br
.ns
.TP 10
-.NOP \f\*[B-Font]refid\f[]
-reference ID or
-.Lk decode.html#kiss "kiss code"
+.NOP \f\*[B-Font]tc\f[]
+time constant and poll exponent (log2 s) (3-17)
.br
.ns
.TP 10
-.NOP \f\*[B-Font]reftime\f[]
-reference time
+.NOP \f\*[B-Font]mintc\f[]
+minimum time constant (log2 s) (3-10)
.br
.ns
.TP 10
.NOP \f\*[B-Font]offset\f[]
-combined offset of server relative to this host
+combined offset of server relative to this host
.br
.ns
.TP 10
-.NOP \f\*[B-Font]sys_jitter\f[]
-combined system jitter
+.NOP \f\*[B-Font]frequency\f[]
+frequency drift (PPM) relative to hardware clock
.br
.ns
.TP 10
-.NOP \f\*[B-Font]frequency\f[]
-frequency offset (PPM) relative to hardware clock
+.NOP \f\*[B-Font]sys_jitter\f[]
+combined system jitter
.br
.ns
.TP 10
@@ -996,9 +1128,12 @@ NTP seconds when the certificate expires
.PP
.SS Peer Variables
The following peer variables appear in the
-\f\*[B-Font]rv\f[]
+\f\*[B-Font]readlist\f[]
billboard for each association.
Not all variables are displayed in some configurations.
+.sp \n(Ppu
+.ne 2
+
.TP 10
.NOP Variable
Description
@@ -1006,7 +1141,7 @@ Description
.ns
.TP 10
.NOP \f\*[B-Font]associd\f[]
-association ID
+association id
.br
.ns
.TP 10
@@ -1061,7 +1196,7 @@ total root dispersion to the primary reference clock
.ns
.TP 10
.NOP \f\*[B-Font]refid\f[]
-reference ID or
+reference id or
.Lk decode.html#kiss "kiss code"
.br
.ns
@@ -1071,6 +1206,11 @@ reference time
.br
.ns
.TP 10
+.NOP \f\*[B-Font]rec\f[]
+last packet received time
+.br
+.ns
+.TP 10
.NOP \f\*[B-Font]reach\f[]
reach register (octal)
.br
@@ -1112,6 +1252,11 @@ headway (see
.br
.ns
.TP 10
+.NOP \f\*[B-Font]keyid\f[]
+symmetric key id
+.br
+.ns
+.TP 10
.NOP \f\*[B-Font]offset\f[]
filter offset
.br
@@ -1132,11 +1277,6 @@ filter jitter
.br
.ns
.TP 10
-.NOP \f\*[B-Font]ident\f[]
-Autokey group name for this association
-.br
-.ns
-.TP 10
.NOP \f\*[B-Font]bias\f[]
unicast/broadcast bias
.br
@@ -1150,7 +1290,8 @@ The
\f\*[B-Font]bias\f[]
variable is calculated when the first broadcast packet is received
after the calibration volley.
-It represents the offset of the broadcast subgraph relative to the unicast subgraph.
+It represents the offset of the broadcast subgraph relative to the
+unicast subgraph.
The
\f\*[B-Font]xleave\f[]
variable appears only for the interleaved symmetric and interleaved modes.
@@ -1188,7 +1329,7 @@ OpenSSL digest/signature scheme
.ns
.TP 10
.NOP \f\*[B-Font]initsequence\f[]
-initial key ID
+initial key id
.br
.ns
.TP 10
@@ -1199,10 +1340,15 @@ initial key index
.TP 10
.NOP \f\*[B-Font]timestamp\f[]
Autokey signature timestamp
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]ident\f[]
+Autokey group name for this association
.PP
.SS Clock Variables
The following clock variables appear in the
-\f\*[B-Font]cv\f[]
+\f\*[B-Font]clocklist\f[]
billboard for each association with a reference clock.
Not all variables are displayed in some configurations.
.TP 10
@@ -1212,7 +1358,7 @@ Description
.ns
.TP 10
.NOP \f\*[B-Font]associd\f[]
-association ID
+association id
.br
.ns
.TP 10
@@ -1267,7 +1413,7 @@ driver stratum
.ns
.TP 10
.NOP \f\*[B-Font]refid\f[]
-driver reference ID
+driver reference id
.br
.ns
.TP 10
@@ -1277,19 +1423,19 @@ driver flags
.SH "OPTIONS"
.TP
.NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
-Force IPv4 DNS name resolution.
+Force IPv4 name resolution.
This option must not appear in combination with any of the following options:
ipv6.
.sp
-Force DNS resolution of following host names on the command line
+Force resolution of following host names on the command line
to the IPv4 namespace.
.TP
.NOP \f\*[B-Font]\-6\f[], \f\*[B-Font]\-\-ipv6\f[]
-Force IPv6 DNS name resolution.
+Force IPv6 name resolution.
This option must not appear in combination with any of the following options:
ipv4.
.sp
-Force DNS resolution of following host names on the command line
+Force resolution of following host names on the command line
to the IPv6 namespace.
.TP
.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]cmd\f[], \f\*[B-Font]\-\-command\f[]=\f\*[I-Font]cmd\f[]
@@ -1324,7 +1470,7 @@ commands read from the standard input.
numeric host addresses.
.sp
Output all host addresses in dotted-quad numeric format rather than
-converting to the canonical host names.
+converting to the canonical host names.
.TP
.NOP \f\*[B-Font]\-\-old\-rv\f[]
Always output status line with readvar.
diff --git a/contrib/ntp/ntpq/ntpq.mdoc.in b/contrib/ntp/ntpq/ntpq.mdoc.in
index 4ad00f8..e0804f1 100644
--- a/contrib/ntp/ntpq/ntpq.mdoc.in
+++ b/contrib/ntp/ntpq/ntpq.mdoc.in
@@ -1,9 +1,9 @@
-.Dd March 21 2017
+.Dd February 27 2018
.Dt NTPQ @NTPQ_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\"
-.\" It has been AutoGen-ed March 21, 2017 at 10:45:31 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed February 27, 2018 at 05:15:28 PM by AutoGen 5.18.5
.\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -18,15 +18,12 @@
[ host ...]
.Pp
.Sh DESCRIPTION
+.Pp
The
.Nm
-utility program is used to query NTP servers which
-implement the standard NTP mode 6 control message formats defined
-in Appendix B of the NTPv3 specification RFC1305, requesting
+utility program is used to query NTP servers to monitor NTP operations
+and performance, requesting
information about current state and/or changes in that state.
-The same formats are used in NTPv4, although some of the
-variables have changed and new ones added. The description on this
-page is for the NTPv4 variables.
The program may be run either in interactive mode or controlled using
command line arguments.
Requests to read and write arbitrary
@@ -37,6 +34,7 @@ The
utility can also obtain and print a
list of peers in a common format by sending multiple queries to the
server.
+.Pp
If one or more request options is included on the command line
when
.Nm
@@ -54,6 +52,7 @@ The
.Nm
utility will prompt for
commands if the standard input is a terminal device.
+.Pp
.Nm
uses NTP mode 6 packets to communicate with the
NTP server, and hence can be used to query any compatible server on
@@ -67,6 +66,17 @@ utility makes
one attempt to retransmit requests, and will time requests out if
the remote host is not heard from within a suitable timeout
time.
+.Pp
+Note that in contexts where a host name is expected, a
+.Fl 4
+qualifier preceding the host name forces resolution to the IPv4
+namespace, while a
+.Fl 6
+qualifier forces resolution to the IPv6 namespace.
+For examples and usage, see the
+.Dq NTP Debugging Techniques
+page.
+.Pp
Specifying a
command line option other than
.Fl i
@@ -80,51 +90,46 @@ Otherwise,
will attempt to read
interactive format commands from the standard input.
.Ss "Internal Commands"
+.Pp
Interactive format commands consist of a keyword followed by zero
to four arguments.
Only enough characters of the full keyword to
uniquely identify the command need be typed.
+.Pp
A
number of interactive format commands are executed entirely within
the
.Nm
-utility itself and do not result in NTP mode 6
+utility itself and do not result in NTP
requests being sent to a server.
These are described following.
-.Bl -tag -width "? [command_keyword]" -compact -offset indent
-.It Ic ? Op Ar command_keyword
-.It Ic help Op Ar command_keyword
+.Bl -tag -width "help [command]" -compact -offset indent
+.It Ic ? Op Ar command
+.It Ic help Op Ar command
A
.Ql \&?
-by itself will print a list of all the command
-keywords known to this incarnation of
+by itself will print a list of all the commands
+known to
.Nm .
A
.Ql \&?
-followed by a command keyword will print function and usage
+followed by a command name will print function and usage
information about the command.
-This command is probably a better
-source of information about
-.Nm
-than this manual
-page.
-.It Ic addvars Ar variable_name Ns Xo Op Ic =value
-.Ic ...
-.Xc
-.It Ic rmvars Ar variable_name Ic ...
+.It Ic addvars Ar name Ns Oo \&= Ns Ar value Oc Ns Op ,...
+.It Ic rmvars Ar name Ns Op ,...
.It Ic clearvars
.It Ic showvars
-The data carried by NTP mode 6 messages consists of a list of
+The arguments to this command consist of a list of
items of the form
-.Ql variable_name=value ,
+.Ar name Ns Op \&= Ns Ar value ,
where the
-.Ql =value
+.No \&= Ns Ar value
is ignored, and can be omitted,
in requests to the server to read variables.
The
.Nm
-utility maintains an internal list in which data to be included in control
-messages can be assembled, and sent using the
+utility maintains an internal list in which data to be included in
+messages can be assembled, and displayed or set using the
.Ic readlist
and
.Ic writelist
@@ -139,35 +144,31 @@ The
.Ic rmvars
command can be used to remove individual variables from the list,
while the
-.Ic clearlist
+.Ic clearvars
command removes all variables from the
list.
The
.Ic showvars
command displays the current list of optional variables.
-.It Ic authenticate Op yes | no
+.It Ic authenticate Op Cm yes Ns | Ns Cm no
Normally
.Nm
does not authenticate requests unless
they are write requests.
The command
-.Ql authenticate yes
+.Ic authenticate Cm yes
causes
.Nm
to send authentication with all requests it
makes.
Authenticated requests causes some servers to handle
-requests slightly differently, and can occasionally melt the CPU in
-fuzzballs if you turn authentication on before doing a
-.Ic peer
-display.
+requests slightly differently.
The command
-.Ql authenticate
+.Ic authenticate
causes
.Nm
to display whether or not
-.Nm
-is currently autheinticating requests.
+it is currently authenticating requests.
.It Ic cooked
Causes output from query commands to be "cooked", so that
variables which are recognized by
@@ -176,20 +177,13 @@ will have their
values reformatted for human consumption.
Variables which
.Nm
-thinks should have a decodable value but didn't are
+could not decode completely are
marked with a trailing
.Ql \&? .
-.It Xo
-.Ic debug
-.Oo
-.Cm more |
-.Cm less |
-.Cm off
-.Oc
-.Xc
+.It Ic debug Op Cm more Ns | Ns Cm less Ns | Ns Cm off
With no argument, displays the current debug level.
-Otherwise, the debug level is changed to the indicated level.
-.It Ic delay Ar milliseconds
+Otherwise, the debugging level is changed as indicated.
+.It Ic delay Op Ar milliseconds
Specify a time interval to be added to timestamps included in
requests which require authentication.
This is used to enable
@@ -198,14 +192,21 @@ or between machines whose clocks are unsynchronized.
Actually the
server does not now require timestamps in authenticated requests,
so this command may be obsolete.
+Without any arguments, displays the current delay.
+.It Ic drefid Op Cm hash Ns | Ns Cm ipv4
+Display refids as IPv4 or hash.
+Without any arguments, displays whether refids are shown as IPv4
+addresses or hashes.
.It Ic exit
Exit
.Nm .
-.It Ic host Ar hostname
+.It Ic host Op Ar name
Set the host to which future queries will be sent.
-.Ar hostname
+The
+.Ar name
may be either a host name or a numeric address.
-.It Ic hostnames Op Cm yes | Cm no
+Without any arguments, displays the current host.
+.It Ic hostnames Op Cm yes Ns | Ns Cm no
If
.Cm yes
is specified, host names are printed in
@@ -220,7 +221,9 @@ unless
modified using the command line
.Fl n
switch.
-.It Ic keyid Ar keyid
+Without any arguments, displays whether host names or numeric addresses
+are shown.
+.It Ic keyid Op Ar keyid
This command allows the specification of a key number to be
used to authenticate configuration requests.
This must correspond
@@ -228,28 +231,20 @@ to the
.Cm controlkey
key number the server has been configured to use for this
purpose.
-.It Ic keytype Xo Oo
-.Cm md5 |
-.Cm OpenSSLDigestType
-.Oc
-.Xc
-Specify the type of key to use for authenticating requests.
-.Cm md5
-is alway supported.
+Without any arguments, displays the current
+.Ar keyid .
+.It Ic keytype Op Ar digest
+Specify the digest algorithm to use for authenticating requests, with default
+.Cm MD5 .
If
.Nm
-was built with OpenSSL support,
-any digest type supported by OpenSSL can also be provided.
+was built with OpenSSL support, and OpenSSL is installed,
+.Ar digest
+can be any message digest algorithm supported by OpenSSL.
If no argument is given, the current
-.Ic keytype
-is displayed.
-.It Ic ntpversion Xo Oo
-.Cm 1 |
-.Cm 2 |
-.Cm 3 |
-.Cm 4
-.Oc
-.Xc
+.Ic keytype Ar digest
+algorithm used is displayed.
+.It Ic ntpversion Op Cm 1 Ns | Ns Cm 2 Ns | Ns Cm 3 Ns | Ns Cm 4
Sets the NTP version number which
.Nm
claims in
@@ -267,13 +262,11 @@ requests.
The password must correspond to the key configured for
use by the NTP server for this purpose if such requests are to be
successful.
-.\" Not yet implemented.
-.\" .It Ic poll
-.\" .Op Ar n
-.\" .Op Ic verbose
-.\" Poll an NTP server in client mode
-.\" .Ar n
-.\" times.
+.It Ic poll Oo Ar n Oc Op Cm verbose
+Poll an NTP server in client mode
+.Ar n
+times.
+Poll not implemented yet.
.It Ic quit
Exit
.Nm .
@@ -283,95 +276,150 @@ from the remote server.
The only formating/interpretation done on
the data is to transform nonascii data into a printable (but barely
understandable) form.
-.It Ic timeout Ar milliseconds
+.It Ic timeout Op Ar milliseconds
Specify a timeout period for responses to server queries.
The
default is about 5000 milliseconds.
+Without any arguments, displays the current timeout period.
Note that since
.Nm
retries each query once after a timeout, the total waiting time for
a timeout will be twice the timeout value set.
.It Ic version
-Print the version of the
+Display the version of the
.Nm
program.
.El
.Ss "Control Message Commands"
-Association IDs are used to identify system, peer and clock variables.
-System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace.
-Most control commands send a single mode\-6 message to the server and expect a single response message.
+Association ids are used to identify system, peer and clock variables.
+System variables are assigned an association id of zero and system name
+space, while each association is assigned a nonzero association id and
+peer namespace.
+Most control commands send a single message to the server and expect a
+single response message.
The exceptions are the
-.Li peers
+.Ic peers
command, which sends a series of messages,
and the
-.Li mreadlist
+.Ic mreadlist
and
-.Li mreadvar
+.Ic mreadvar
commands, which iterate over a range of associations.
.Bl -tag -width "something" -compact -offset indent
-.It Cm associations
+.It Ic apeers
+Display a list of peers in the form:
+.Dl [tally]remote refid assid st t when pool reach delay offset jitter
+where the output is just like the
+.Ic peers
+command except that the
+.Cm refid
+is displayed in hex format and the association number is also displayed.
+.It Ic associations
Display a list of mobilized associations in the form:
.Dl ind assid status conf reach auth condition last_event cnt
-.Bl -column -offset indent ".Sy Variable" ".Sy Description"
-.It Sy String Ta Sy Description
-.It Li ind Ta index on this list
-.It Li assid Ta association ID
-.It Li status Ta peer status word
-.It Li conf Ta Li yes : persistent, Li no : ephemeral
-.It Li reach Ta Li yes : reachable, Li no : unreachable
-.It Li auth Ta Li ok , Li yes , Li bad and Li none
-.It Li condition Ta selection status (see the Li select field of the peer status word)
-.It Li last_event Ta event report (see the Li event field of the peer status word)
-.It Li cnt Ta event count (see the Li count field of the peer status word)
+.Bl -column -offset indent ".Sy Variable" "see the select field of the peer status word"
+.It Sy Variable Ta Sy Description
+.It Cm ind Ta index on this list
+.It Cm assid Ta association id
+.It Cm status Ta peer status word
+.It Cm conf Ta Cm yes : No persistent, Cm no : No ephemeral
+.It Cm reach Ta Cm yes : No reachable, Cm no : No unreachable
+.It Cm auth Ta Cm ok , Cm yes , Cm bad No and Cm none
+.It Cm condition Ta selection status \&(see the Cm select No field of the peer status word\&)
+.It Cm last_event Ta event report \&(see the Cm event No field of the peer status word\&)
+.It Cm cnt Ta event count \&(see the Cm count No field of the peer status word\&)
.El
-.It Cm authinfo
-Display the authentication statistics.
-.It Cm clockvar Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ...
-.It Cm cv Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ...
-Display a list of clock variables for those associations supporting a reference clock.
-.It Cm :config Op ...
-Send the remainder of the command line, including whitespace, to the server as a run\-time configuration command in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.
-.It Cm config\-from\-file Ar filename
-Send the each line of
+.It Ic authinfo
+Display the authentication statistics counters:
+time since reset, stored keys, free keys, key lookups, keys not found,
+uncached keys, expired keys, encryptions, decryptions.
+.It Ic clocklist Op Ar associd
+.It Ic cl Op Ar associd
+Display all clock variables in the variable list for those associations
+supporting a reference clock.
+.It Ic clockvar Oo Ar associd Oc Oo Ar name Ns Oo \&= Ns Ar value Oc Ns Oc Ns Op ,...
+.It Ic cv Oo Ar associd Oc Oo Ar name Ns Oo \&= Ns Ar value Oc Ns Oc Ns Op ,...
+Display a list of clock variables for those associations supporting a
+reference clock.
+.It Ic :config Ar "configuration command line"
+Send the remainder of the command line, including whitespace, to the
+server as a run\-time configuration command in the same format as a line
+in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is of course required.
+.It Ic config\-from\-file Ar filename
+Send each line of
.Ar filename
-to the server as run\-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required.
+to the server as run\-time configuration commands in the same format as
+lines in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is required.
.It Ic ifstats
-Display statistics for each local network address. Authentication is required.
+Display status and statistics counters for each local network interface address:
+interface number, interface name and address or broadcast, drop, flag,
+ttl, mc, received, sent, send failed, peers, uptime.
+Authentication is required.
.It Ic iostats
-Display network and reference clock I/O statistics.
+Display network and reference clock I/O statistics:
+time since reset, receive buffers, free receive buffers, used receive buffers,
+low water refills, dropped packets, ignored packets, received packets,
+packets sent, packet send failures, input wakeups, useful input wakeups.
.It Ic kerninfo
-Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.
+Display kernel loop and PPS statistics:
+associd, status, pll offset, pll frequency, maximum error,
+estimated error, kernel status, pll time constant, precision,
+frequency tolerance, pps frequency, pps stability, pps jitter,
+calibration interval, calibration cycles, jitter exceeded,
+stability exceeded, calibration errors.
+As with other ntpq output, times are in milliseconds; very small values
+may be shown as exponentials.
+The precision value displayed is in milliseconds as well, unlike the
+precision system variable.
.It Ic lassociations
-Perform the same function as the associations command, except display mobilized and unmobilized associations.
-.It Ic lopeers Xo
-.Oo Ic \-4 |
-.Ic \-6
-.Oc
-.Xc
-Obtain and print a list of all peers and clients showing
-.Ar dstadr
-(associated with any given IP version).
-.It Ic lpeers Xo
-.Oo Ic \-4 |
-.Ic \-6
-.Oc
-.Xc
-Print a peer spreadsheet for the appropriate IP version(s).
-.Ar dstadr
-(associated with any given IP version).
+Perform the same function as the associations command, except display
+mobilized and unmobilized associations, including all clients.
+.It Ic lopeers Op Fl 4 Ns | Ns Fl 6
+Display a list of all peers and clients showing
+.Cm dstadr
+(associated with the given IP version).
+.It Ic lpassociations
+Display the last obtained list of associations, including all clients.
+.It Ic lpeers Op Fl 4 Ns | Ns Fl 6
+Display a list of all peers and clients (associated with the given IP version).
.It Ic monstats
-Display monitor facility statistics.
-.It Ic mrulist Oo Ic limited | Ic kod | Ic mincount Ns = Ns Ar count | Ic laddr Ns = Ns Ar localaddr | Ic sort Ns = Ns Ar sortorder | Ic resany Ns = Ns Ar hexmask | Ic resall Ns = Ns Ar hexmask Oc
-Obtain and print traffic counts collected and maintained by the monitor facility.
+Display monitor facility status, statistics, and limits:
+enabled, addresses, peak addresses, maximum addresses,
+reclaim above count, reclaim older than, kilobytes, maximum kilobytes.
+.It Ic mreadlist Ar associdlo Ar associdhi
+.It Ic mrl Ar associdlo Ar associdhi
+Perform the same function as the
+.Ic readlist
+command for a range of association ids.
+.It Ic mreadvar Ar associdlo Ar associdhi Oo Ar name Oc Ns Op ,...
+This range may be determined from the list displayed by any
+command showing associations.
+.It Ic mrv Ar associdlo Ar associdhi Oo Ar name Oc Ns Op ,...
+Perform the same function as the
+.Ic readvar
+command for a range of association ids.
+This range may be determined from the list displayed by any
+command showing associations.
+.It Xo Ic mrulist Oo Cm limited | Cm kod | Cm mincount Ns \&= Ns Ar count |
+.Cm laddr Ns \&= Ns Ar localaddr | Cm sort Ns \&= Ns Oo \&\- Oc Ns Ar sortorder |
+.Cm resany Ns \&= Ns Ar hexmask | Cm resall Ns \&= Ns Ar hexmask Oc
+.Xc
+Display traffic counts of the most recently seen source addresses
+collected and maintained by the monitor facility.
With the exception of
-.Cm sort Ns = Ns Ar sortorder ,
+.Cm sort Ns \&= Ns Oo \&\- Oc Ns Ar sortorder ,
the options filter the list returned by
-.Cm ntpd.
+.Xr ntpd 8 .
The
.Cm limited
and
.Cm kod
-options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
+options return only entries representing client addresses from which the
+last packet received triggered either discarding or a KoD response.
The
.Cm mincount Ns = Ns Ar count
option filters entries representing less than
@@ -392,18 +440,21 @@ The
.Ar sortorder
defaults to
.Cm lstint
-and may be any of
+and may be
.Cm addr ,
-.Cm count ,
.Cm avgint ,
+.Cm count ,
.Cm lstint ,
-or any of those preceded by a minus sign (hyphen) to reverse the sort order.
+or any of those preceded by
+.Ql \&\-
+to reverse the sort order.
The output columns are:
.Bl -tag -width "something" -compact -offset indent
.It Column
Description
.It Ic lstint
-Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by
+Interval in seconds between the receipt of the most recent packet from
+this address and the completion of the retrieval of the MRU list by
.Nm .
.It Ic avgint
Average interval in s between packets from this address.
@@ -411,7 +462,8 @@ Average interval in s between packets from this address.
Restriction flags associated with this address.
Most are copied unchanged from the matching
.Ic restrict
-command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
+command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless
+the last packet from this address triggered a rate control response.
.It Ic r
Rate control indicator, either
a period,
@@ -429,27 +481,15 @@ Packets received from this address.
.It Ic rport
Source port of last packet from this address.
.It Ic remote address
-DNS name, numeric address, or address followed by
+host or DNS name, numeric address, or address followed by
claimed DNS name which could not be verified in parentheses.
.El
-.It Ic mreadvar assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ...
-.It Ic mrv assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ...
-Perform the same function as the
-.Ic readvar
-command, except for a range of association IDs.
-This range is determined from the association list cached by the most recent
-.Ic associations
-command.
-.It Ic opeers Xo
-.Oo Ic \-4 |
-.Ic \-6
-.Oc
-.Xc
+.It Ic opeers Op Fl 4 | Fl 6
Obtain and print the old\-style list of all peers and clients showing
-.Ar dstadr
-(associated with any given IP version),
+.Cm dstadr
+(associated with the given IP version),
rather than the
-.Ar refid .
+.Cm refid .
.It Ic passociations
Perform the same function as the
.Ic associations
@@ -461,28 +501,32 @@ Display a list of peers in the form:
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic [tally]
+.It Cm [tally]
single\-character code indicating current value of the
.Ic select
field of the
.Lk decode.html#peer "peer status word"
-.It Ic remote
+.It Cm remote
host name (or IP number) of peer.
-The value displayed will be truncated to 15 characters unless the
+The value displayed will be truncated to 15 characters unless the
+.Nm
.Fl w
-flag is given, in which case the full value will be displayed
-on the first line,
-and the remaining data is displayed on the next line.
-.It Ic refid
-association ID or
+option is given, in which case the full value will be displayed
+on the first line, and if too long,
+the remaining data will be displayed on the next line.
+.It Cm refid
+source IP address or
.Lk decode.html#kiss "'kiss code"
-.It Ic st
-stratum
-.It Ic t
+.It Cm st
+stratum: 0 for local reference clocks, 1 for servers with local
+reference clocks, ..., 16 for unsynchronized server clocks
+.It Cm t
.Ic u :
unicast or manycast client,
.Ic b :
broadcast or multicast client,
+.Ic p :
+pool source,
.Ic l :
local (reference clock),
.Ic s :
@@ -493,115 +537,135 @@ manycast server,
broadcast server,
.Ic M :
multicast server
-.It Ic when
-sec/min/hr since last received packet
-.It Ic poll
-poll interval (log2 s)
-.It Ic reach
+.It Cm when
+time in seconds, minutes, hours, or days since the last packet
+was received, or
+.Ql \&\-
+if a packet has never been received
+.It Cm poll
+poll interval (s)
+.It Cm reach
reach shift register (octal)
-.It Ic delay
+.It Cm delay
roundtrip delay
-.It Ic offset
+.It Cm offset
offset of server relative to this host
-.It Ic jitter
-jitter
+.It Cm jitter
+offset RMS error estimate.
.El
-.It Ic apeers
-Display a list of peers in the form:
-.Dl [tally]remote refid assid st t when pool reach delay offset jitter
-where the output is just like the
-.Ic peers
-command except that the
-.Ic refid
-is displayed in hex format and the association number is also displayed.
-.It Ic pstats Ar assocID
-Show the statistics for the peer with the given
-.Ar assocID .
-.It Ic readlist Ar assocID
-.It Ic rl Ar assocID
-Read the system or peer variables included in the variable list.
-.It Ic readvar Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc
-.It Ic rv Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc
-Display the specified variables.
+.It Ic pstats Ar associd
+Display the statistics for the peer with the given
+.Ar associd :
+associd, status, remote host, local address, time last received,
+time until next send, reachability change, packets sent,
+packets received, bad authentication, bogus origin, duplicate,
+bad dispersion, bad reference time, candidate order.
+.It Ic readlist Op Ar associd
+.It Ic rl Op Ar associd
+Display all system or peer variables.
+If the
+.Ar associd
+is omitted, it is assumed to be zero.
+.It Ic readvar Op Ar associd Ar name Ns Oo Ns = Ns Ar value Oc Op , ...
+.It Ic rv Op Ar associd Ar name Ns Oo Ns = Ns Ar value Oc Op , ...
+Display the specified system or peer variables.
If
-.Ar assocID
+.Ar associd
is zero, the variables are from the
.Sx System Variables
name space, otherwise they are from the
.Sx Peer Variables
name space.
The
-.Ar assocID
+.Ar associd
is required, as the same name can occur in both spaces.
If no
.Ar name
is included, all operative variables in the name space are displayed.
In this case only, if the
-.Ar assocID
-is omitted, it is assumed zero.
+.Ar associd
+is omitted, it is assumed to be zero.
Multiple names are specified with comma separators and without whitespace.
Note that time values are represented in milliseconds
and frequency values in parts\-per\-million (PPM).
Some NTP timestamps are represented in the format
-YYYYMMDDTTTT ,
-where YYYY is the year,
-MM the month of year,
-DD the day of month and
-TTTT the time of day.
+.Ar YYYY Ns Ar MM Ar DD Ar TTTT ,
+where
+.Ar YYYY
+is the year,
+.Ar MM
+the month of year,
+.Ar DD
+the day of month and
+.Ar TTTT
+the time of day.
.It Ic reslist
-Show the access control (restrict) list for
+Display the access control (restrict) list for
.Nm .
+Authentication is required.
.It Ic saveconfig Ar filename
-Write the current configuration,
-including any runtime modifications given with
+Save the current configuration,
+including any runtime modifications made by
.Ic :config
or
.Ic config\-from\-file ,
-to the ntpd host's file
+to the NTP server host file
.Ar filename .
This command will be rejected by the server unless
.Lk miscopt.html#saveconfigdir "saveconfigdir"
appears in the
-.Ic ntpd
+.Xr ntpd 8
configuration file.
.Ar filename
can use
-.Xr strftime
-format specifies to substitute the current date and time, for example,
-.Ic q]saveconfig ntp\-%Y%m%d\-%H%M%S.confq] .
+.Xr date 1
+format specifiers to substitute the current date and time, for
+example,
+.D1 Ic saveconfig Pa ntp\-%Y%m%d\-%H%M%S.conf .
The filename used is stored in system variable
-.Ic savedconfig .
+.Cm savedconfig .
Authentication is required.
+.It Ic sysinfo
+Display system operational summary:
+associd, status, system peer, system peer mode, leap indicator,
+stratum, log2 precision, root delay, root dispersion,
+reference id, reference time, system jitter, clock jitter,
+clock wander, broadcast delay, symm. auth. delay.
+.It Ic sysstats
+Display system uptime and packet counts maintained in the
+protocol module:
+uptime, sysstats reset, packets received, current version,
+older version, bad length or format, authentication failed,
+declined, restricted, rate limited, KoD responses,
+processed for time.
.It Ic timerstats
-Display interval timer counters.
-.It Ic writelist Ar assocID
-Write the system or peer variables included in the variable list.
-.It Ic writevar Ar assocID Ar name Ns = Ns Ar value Op , ...
-Write the specified variables.
+Display interval timer counters:
+time since reset, timer overruns, calls to transmit.
+.It Ic writelist Ar associd
+Set all system or peer variables included in the variable list.
+.It Ic writevar Ar associd Ar name Ns = Ns Ar value Op , ...
+Set the specified variables in the variable list.
If the
-.Ar assocID
+.Ar associd
is zero, the variables are from the
.Sx System Variables
name space, otherwise they are from the
.Sx Peer Variables
name space.
The
-.Ar assocID
+.Ar associd
is required, as the same name can occur in both spaces.
-.It Ic sysinfo
-Display operational summary.
-.It Ic sysstats
-Print statistics counters maintained in the protocol module.
+Authentication is required.
.El
.Ss Status Words and Kiss Codes
The current state of the operating program is shown
in a set of status words
maintained by the system.
Status information is also available on a per\-association basis.
-These words are displayed in the
-.Ic rv
+These words are displayed by the
+.Ic readlist
and
-.Ic as
+.Ic associations
commands both in hexadecimal and in decoded short tip strings.
The codes, tips and short explanations are documented on the
.Lk decode.html "Event Messages and Status Words"
@@ -618,58 +682,59 @@ They are now displayed, when appropriate,
in the reference identifier field in various billboards.
.Ss System Variables
The following system variables appear in the
-.Ic rv
+.Ic readlist
billboard.
Not all variables are displayed in some configurations.
+.Pp
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic status
+.It Cm status
.Lk decode.html#sys "system status word"
-.It Ic version
+.It Cm version
NTP software version and build time
-.It Ic processor
+.It Cm processor
hardware platform and version
-.It Ic system
+.It Cm system
operating system and version
-.It Ic leap
+.It Cm leap
leap warning indicator (0\-3)
-.It Ic stratum
+.It Cm stratum
stratum (1\-15)
-.It Ic precision
+.It Cm precision
precision (log2 s)
-.It Ic rootdelay
+.It Cm rootdelay
total roundtrip delay to the primary reference clock
-.It Ic rootdisp
+.It Cm rootdisp
total dispersion to the primary reference clock
-.It Ic peer
-system peer association ID
-.It Ic tc
-time constant and poll exponent (log2 s) (3\-17)
-.It Ic mintc
-minimum time constant (log2 s) (3\-10)
-.It Ic clock
-date and time of day
-.It Ic refid
-reference ID or
+.It Cm refid
+reference id or
.Lk decode.html#kiss "kiss code"
-.It Ic reftime
+.It Cm reftime
reference time
-.It Ic offset
-combined offset of server relative to this host
-.It Ic sys_jitter
+.It Ic clock
+date and time of day
+.It Cm peer
+system peer association id
+.It Cm tc
+time constant and poll exponent (log2 s) (3\-17)
+.It Cm mintc
+minimum time constant (log2 s) (3\-10)
+.It Cm offset
+combined offset of server relative to this host
+.It Cm frequency
+frequency drift (PPM) relative to hardware clock
+.It Cm sys_jitter
combined system jitter
-.It Ic frequency
-frequency offset (PPM) relative to hardware clock
-.It Ic clk_wander
+.It Cm clk_wander
clock frequency wander (PPM)
-.It Ic clk_jitter
+.It Cm clk_jitter
clock jitter
-.It Ic tai
+.It Cm tai
TAI\-UTC offset (s)
-.It Ic leapsec
+.It Cm leapsec
NTP seconds when the next leap second is/was inserted
-.It Ic expire
+.It Cm expire
NTP seconds when the NIST leapseconds file expires
.El
The jitter and wander statistics are exponentially\-weighted RMS averages.
@@ -683,98 +748,102 @@ depending on the particular Autokey dance:
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic host
+.It Cm host
Autokey host name for this host
-.It Ic ident
+.It Cm ident
Autokey group name for this host
-.It Ic flags
+.It Cm flags
host flags (see Autokey specification)
-.It Ic digest
+.It Cm digest
OpenSSL message digest algorithm
-.It Ic signature
+.It Cm signature
OpenSSL digest/signature scheme
-.It Ic update
+.It Cm update
NTP seconds at last signature update
-.It Ic cert
+.It Cm cert
certificate subject, issuer and certificate flags
-.It Ic until
+.It Cm until
NTP seconds when the certificate expires
.El
.Ss Peer Variables
The following peer variables appear in the
-.Ic rv
+.Ic readlist
billboard for each association.
Not all variables are displayed in some configurations.
+.Pp
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic associd
-association ID
-.It Ic status
+.It Cm associd
+association id
+.It Cm status
.Lk decode.html#peer "peer status word"
-.It Ic srcadr
+.It Cm srcadr
source (remote) IP address
-.It Ic srcport
+.It Cm srcport
source (remote) port
-.It Ic dstadr
+.It Cm dstadr
destination (local) IP address
-.It Ic dstport
+.It Cm dstport
destination (local) port
-.It Ic leap
+.It Cm leap
leap indicator (0\-3)
-.It Ic stratum
+.It Cm stratum
stratum (0\-15)
-.It Ic precision
+.It Cm precision
precision (log2 s)
-.It Ic rootdelay
+.It Cm rootdelay
total roundtrip delay to the primary reference clock
-.It Ic rootdisp
+.It Cm rootdisp
total root dispersion to the primary reference clock
-.It Ic refid
-reference ID or
+.It Cm refid
+reference id or
.Lk decode.html#kiss "kiss code"
-.It Ic reftime
+.It Cm reftime
reference time
-.It Ic reach
+.It Cm rec
+last packet received time
+.It Cm reach
reach register (octal)
-.It Ic unreach
+.It Cm unreach
unreach counter
-.It Ic hmode
+.It Cm hmode
host mode (1\-6)
-.It Ic pmode
+.It Cm pmode
peer mode (1\-5)
-.It Ic hpoll
+.It Cm hpoll
host poll exponent (log2 s) (3\-17)
-.It Ic ppoll
+.It Cm ppoll
peer poll exponent (log2 s) (3\-17)
-.It Ic headway
+.It Cm headway
headway (see
.Lk rate.html "Rate Management and the Kiss\-o'\-Death Packet" )
-.It Ic flash
+.It Cm flash
.Lk decode.html#flash "flash status word"
-.It Ic offset
+.It Cm keyid
+symmetric key id
+.It Cm offset
filter offset
-.It Ic delay
+.It Cm delay
filter delay
-.It Ic dispersion
+.It Cm dispersion
filter dispersion
-.It Ic jitter
+.It Cm jitter
filter jitter
-.It Ic ident
-Autokey group name for this association
-.It Ic bias
+.It Cm bias
unicast/broadcast bias
-.It Ic xleave
+.It Cm xleave
interleave delay (see
.Lk xleave.html "NTP Interleaved Modes" )
.El
The
-.Ic bias
+.Cm bias
variable is calculated when the first broadcast packet is received
after the calibration volley.
-It represents the offset of the broadcast subgraph relative to the unicast subgraph.
+It represents the offset of the broadcast subgraph relative to the
+unicast subgraph.
The
-.Ic xleave
+.Cm xleave
variable appears only for the interleaved symmetric and interleaved modes.
It represents the internal queuing, buffering and transmission delays
for the preceding packet.
@@ -784,71 +853,73 @@ additional peer variables are displayed, including the following:
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic flags
+.It Cm flags
peer flags (see Autokey specification)
-.It Ic host
+.It Cm host
Autokey server name
-.It Ic flags
+.It Cm flags
peer flags (see Autokey specification)
-.It Ic signature
+.It Cm signature
OpenSSL digest/signature scheme
-.It Ic initsequence
-initial key ID
-.It Ic initkey
+.It Cm initsequence
+initial key id
+.It Cm initkey
initial key index
-.It Ic timestamp
+.It Cm timestamp
Autokey signature timestamp
+.It Cm ident
+Autokey group name for this association
.El
.Ss Clock Variables
The following clock variables appear in the
-.Ic cv
+.Ic clocklist
billboard for each association with a reference clock.
Not all variables are displayed in some configurations.
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic associd
-association ID
-.It Ic status
+.It Cm associd
+association id
+.It Cm status
.Lk decode.html#clock "clock status word"
-.It Ic device
+.It Cm device
device description
-.It Ic timecode
+.It Cm timecode
ASCII time code string (specific to device)
-.It Ic poll
+.It Cm poll
poll messages sent
-.It Ic noreply
+.It Cm noreply
no reply
-.It Ic badformat
+.It Cm badformat
bad format
-.It Ic baddata
+.It Cm baddata
bad date or time
-.It Ic fudgetime1
+.It Cm fudgetime1
fudge time 1
-.It Ic fudgetime2
+.It Cm fudgetime2
fudge time 2
-.It Ic stratum
+.It Cm stratum
driver stratum
-.It Ic refid
-driver reference ID
-.It Ic flags
+.It Cm refid
+driver reference id
+.It Cm flags
driver flags
.El
.Sh "OPTIONS"
.Bl -tag
.It Fl 4 , Fl \-ipv4
-Force IPv4 DNS name resolution.
+Force IPv4 name resolution.
This option must not appear in combination with any of the following options:
ipv6.
.sp
-Force DNS resolution of following host names on the command line
+Force resolution of following host names on the command line
to the IPv4 namespace.
.It Fl 6 , Fl \-ipv6
-Force IPv6 DNS name resolution.
+Force IPv6 name resolution.
This option must not appear in combination with any of the following options:
ipv4.
.sp
-Force DNS resolution of following host names on the command line
+Force resolution of following host names on the command line
to the IPv6 namespace.
.It Fl c Ar cmd , Fl \-command Ns = Ns Ar cmd
run a command and exit.
@@ -878,7 +949,7 @@ commands read from the standard input.
numeric host addresses.
.sp
Output all host addresses in dotted\-quad numeric format rather than
-converting to the canonical host names.
+converting to the canonical host names.
.It Fl \-old\-rv
Always output status line with readvar.
.sp
diff --git a/contrib/ntp/ntpq/ntpq.texi b/contrib/ntp/ntpq/ntpq.texi
index ac79dcc..5526178 100644
--- a/contrib/ntp/ntpq/ntpq.texi
+++ b/contrib/ntp/ntpq/ntpq.texi
@@ -168,7 +168,7 @@ Specify the digest algorithm to use for authenticated requests,
with default @code{MD5}.
If the OpenSSL library is installed,
digest can be be any message digest algorithm supported by the library.
-The current selections are: @code{MD2}, @code{MD4}, @code{MD5}, @code{MDC2}, @code{RIPEMD160}, @code{SHA} and @code{SHA1}.
+The current selections are: @code{AES128CMAC}, @code{MD2}, @code{MD4}, @code{MD5}, @code{MDC2}, @code{RIPEMD160}, @code{SHA} and @code{SHA1}.
@item @anchor{ntpversion} @code{ntpversion 1 | 2 | 3 | 4}
Sets the NTP version number which @code{ntpq} claims in packets.
OpenPOWER on IntegriCloud