+* [Bug 1128] ntpq truncates "remote" host information.
(4.2.7p460) 2014/08/13 Released by Harlan Stenn <stenn@ntp.org>
* More autogen-5.18.4pre14 cleanup.
(4.2.7p459) 2014/08/12 Released by Harlan Stenn <stenn@ntp.org>
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpq.texi)
#
-# It has been AutoGen-ed August 13, 2014 at 11:27:28 AM by AutoGen 5.18.4pre14
+# It has been AutoGen-ed August 14, 2014 at 07:57:37 AM by AutoGen 5.18.4pre14
# From the definitions ntpq-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
field of the
.Lk decode.html#peer "peer status word"
@item @code{remote}
-host name (or IP number) of peer
+host name (or IP number) of peer.
+The value displayed will be truncated to 15 characters unless the
+@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.
@item @code{refid}
association ID or
.Lk decode.html#kiss "'kiss code"
* ntpq ipv4:: ipv4 option (-4)
* ntpq ipv6:: ipv6 option (-6)
* ntpq command:: command option (-c)
-* ntpq peers:: peers option (-p)
* ntpq interactive:: interactive option (-i)
* ntpq numeric:: numeric option (-n)
* ntpq old-rv:: old-rv option
+* ntpq peers:: peers option (-p)
+* ntpq wide:: wide option (-w)
* ntpq config:: presetting/configuring ntpq
* ntpq exit status:: exit status
@end menu
-6 no ipv6 Force IPv6 DNS name resolution
- prohibits the option 'ipv4'
-c Str command run a command and exit
- - may appear up to 512 times
+ - may appear multiple times
-d no debug-level Increase debug verbosity level
- may appear multiple times
-D Num set-debug-level Set the debug verbosity level
- may appear multiple times
- -p no peers Print a list of the peers
- - prohibits the option 'interactive'
-i no interactive Force ntpq to operate in interactive mode
- prohibits these options:
command
peers
-n no numeric numeric host addresses
no old-rv Always output status line with readvar
+ -p no peers Print a list of the peers
+ - prohibits the option 'interactive'
+ -w no wide Display the full 'remote' value
opt version output version information and exit
-? no help display extended usage information and exit
-! no more-help extended usage information passed thru pager
This option has some usage constraints. It:
@itemize @bullet
@item
-may appear up to 512 times.
+may appear an unlimited number of times.
@end itemize
The following argument is interpreted as an interactive format command
and is added to the list of commands to be executed on the specified
host(s).
-@node ntpq peers
-@subsection peers option (-p)
-@cindex ntpq-peers
-
-This is the ``print a list of the peers'' option.
-
-@noindent
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-interactive.
-@end itemize
-
-Print a list of the peers known to the server as well as a summary
-of their state. This is equivalent to the 'peers' interactive command.
@node ntpq interactive
@subsection interactive option (-i)
@cindex ntpq-interactive
Using an environment variable to
preset this option in a script will enable both older and
newer @code{ntpq} to behave identically in this regard.
+@node ntpq peers
+@subsection peers option (-p)
+@cindex ntpq-peers
+
+This is the ``print a list of the peers'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must not appear in combination with any of the following options:
+interactive.
+@end itemize
+
+Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'peers' interactive command.
+@node ntpq wide
+@subsection wide option (-w)
+@cindex ntpq-wide
+
+This is the ``display the full 'remote' value'' option.
+Display the full value of the 'remote' value. If this requires
+more than 15 characters, display the full value, emit a newline,
+and continue the data display properly indented on the next line.
@node ntpq config
/**
* static const strings for ntpq options
*/
-static char const ntpq_opt_strs[1833] =
+static char const ntpq_opt_strs[1875] =
/* 0 */ "ntpq 4.2.7p460\n"
"Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
/* 1130 */ "Set the debug verbosity level\0"
/* 1160 */ "SET_DEBUG_LEVEL\0"
/* 1176 */ "set-debug-level\0"
-/* 1192 */ "Print a list of the peers\0"
-/* 1218 */ "PEERS\0"
-/* 1224 */ "peers\0"
-/* 1230 */ "Force ntpq to operate in interactive mode\0"
-/* 1272 */ "INTERACTIVE\0"
-/* 1284 */ "interactive\0"
-/* 1296 */ "numeric host addresses\0"
-/* 1319 */ "NUMERIC\0"
-/* 1327 */ "numeric\0"
-/* 1335 */ "Always output status line with readvar\0"
-/* 1374 */ "OLD_RV\0"
-/* 1381 */ "old-rv\0"
-/* 1388 */ "display extended usage information and exit\0"
-/* 1432 */ "help\0"
-/* 1437 */ "extended usage information passed thru pager\0"
-/* 1482 */ "more-help\0"
-/* 1492 */ "output version information and exit\0"
-/* 1528 */ "version\0"
-/* 1536 */ "save the option state to a config file\0"
-/* 1575 */ "save-opts\0"
-/* 1585 */ "load options from a config file\0"
-/* 1617 */ "LOAD_OPTS\0"
-/* 1627 */ "no-load-opts\0"
-/* 1640 */ "no\0"
-/* 1643 */ "NTPQ\0"
-/* 1648 */ "ntpq - standard NTP query program - Ver. 4.2.7p460\n"
+/* 1192 */ "Force ntpq to operate in interactive mode\0"
+/* 1234 */ "INTERACTIVE\0"
+/* 1246 */ "interactive\0"
+/* 1258 */ "numeric host addresses\0"
+/* 1281 */ "NUMERIC\0"
+/* 1289 */ "numeric\0"
+/* 1297 */ "Always output status line with readvar\0"
+/* 1336 */ "OLD_RV\0"
+/* 1343 */ "old-rv\0"
+/* 1350 */ "Print a list of the peers\0"
+/* 1376 */ "PEERS\0"
+/* 1382 */ "peers\0"
+/* 1388 */ "Display the full 'remote' value\0"
+/* 1420 */ "WIDE\0"
+/* 1425 */ "wide\0"
+/* 1430 */ "display extended usage information and exit\0"
+/* 1474 */ "help\0"
+/* 1479 */ "extended usage information passed thru pager\0"
+/* 1524 */ "more-help\0"
+/* 1534 */ "output version information and exit\0"
+/* 1570 */ "version\0"
+/* 1578 */ "save the option state to a config file\0"
+/* 1617 */ "save-opts\0"
+/* 1627 */ "load options from a config file\0"
+/* 1659 */ "LOAD_OPTS\0"
+/* 1669 */ "no-load-opts\0"
+/* 1682 */ "no\0"
+/* 1685 */ "NTPQ\0"
+/* 1690 */ "ntpq - standard NTP query program - Ver. 4.2.7p460\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
-/* 1769 */ "$HOME\0"
-/* 1775 */ ".\0"
-/* 1777 */ ".ntprc\0"
-/* 1784 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 1818 */ "ntpq 4.2.7p460";
+/* 1811 */ "$HOME\0"
+/* 1817 */ ".\0"
+/* 1819 */ ".ntprc\0"
+/* 1826 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 1860 */ "ntpq 4.2.7p460";
/**
* ipv4 option description with
#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
-/**
- * peers option description with
- * "Must also have options" and "Incompatible options":
- */
-/** Descriptive text for the peers option */
-#define PEERS_DESC (ntpq_opt_strs+1192)
-/** Upper-cased name for the peers option */
-#define PEERS_NAME (ntpq_opt_strs+1218)
-/** Name string for the peers option */
-#define PEERS_name (ntpq_opt_strs+1224)
-/** Other options that appear in conjunction with the peers option */
-static int const aPeersCantList[] = {
- INDEX_OPT_INTERACTIVE, NO_EQUIVALENT };
-/** Compiled in flag settings for the peers option */
-#define PEERS_FLAGS (OPTST_DISABLED)
-
/**
* interactive option description with
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the interactive option */
-#define INTERACTIVE_DESC (ntpq_opt_strs+1230)
+#define INTERACTIVE_DESC (ntpq_opt_strs+1192)
/** Upper-cased name for the interactive option */
-#define INTERACTIVE_NAME (ntpq_opt_strs+1272)
+#define INTERACTIVE_NAME (ntpq_opt_strs+1234)
/** Name string for the interactive option */
-#define INTERACTIVE_name (ntpq_opt_strs+1284)
+#define INTERACTIVE_name (ntpq_opt_strs+1246)
/** Other options that appear in conjunction with the interactive option */
static int const aInteractiveCantList[] = {
INDEX_OPT_COMMAND,
* numeric option description:
*/
/** Descriptive text for the numeric option */
-#define NUMERIC_DESC (ntpq_opt_strs+1296)
+#define NUMERIC_DESC (ntpq_opt_strs+1258)
/** Upper-cased name for the numeric option */
-#define NUMERIC_NAME (ntpq_opt_strs+1319)
+#define NUMERIC_NAME (ntpq_opt_strs+1281)
/** Name string for the numeric option */
-#define NUMERIC_name (ntpq_opt_strs+1327)
+#define NUMERIC_name (ntpq_opt_strs+1289)
/** Compiled in flag settings for the numeric option */
#define NUMERIC_FLAGS (OPTST_DISABLED)
* old-rv option description:
*/
/** Descriptive text for the old-rv option */
-#define OLD_RV_DESC (ntpq_opt_strs+1335)
+#define OLD_RV_DESC (ntpq_opt_strs+1297)
/** Upper-cased name for the old-rv option */
-#define OLD_RV_NAME (ntpq_opt_strs+1374)
+#define OLD_RV_NAME (ntpq_opt_strs+1336)
/** Name string for the old-rv option */
-#define OLD_RV_name (ntpq_opt_strs+1381)
+#define OLD_RV_name (ntpq_opt_strs+1343)
/** Compiled in flag settings for the old-rv option */
#define OLD_RV_FLAGS (OPTST_DISABLED)
+/**
+ * peers option description with
+ * "Must also have options" and "Incompatible options":
+ */
+/** Descriptive text for the peers option */
+#define PEERS_DESC (ntpq_opt_strs+1350)
+/** Upper-cased name for the peers option */
+#define PEERS_NAME (ntpq_opt_strs+1376)
+/** Name string for the peers option */
+#define PEERS_name (ntpq_opt_strs+1382)
+/** Other options that appear in conjunction with the peers option */
+static int const aPeersCantList[] = {
+ INDEX_OPT_INTERACTIVE, NO_EQUIVALENT };
+/** Compiled in flag settings for the peers option */
+#define PEERS_FLAGS (OPTST_DISABLED)
+
+/**
+ * wide option description:
+ */
+/** Descriptive text for the wide option */
+#define WIDE_DESC (ntpq_opt_strs+1388)
+/** Upper-cased name for the wide option */
+#define WIDE_NAME (ntpq_opt_strs+1420)
+/** Name string for the wide option */
+#define WIDE_name (ntpq_opt_strs+1425)
+/** 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+1388)
-#define HELP_name (ntpq_opt_strs+1432)
+#define HELP_DESC (ntpq_opt_strs+1430)
+#define HELP_name (ntpq_opt_strs+1474)
#ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC (ntpq_opt_strs+1437)
-#define MORE_HELP_name (ntpq_opt_strs+1482)
+#define MORE_HELP_DESC (ntpq_opt_strs+1479)
+#define MORE_HELP_name (ntpq_opt_strs+1524)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC HELP_DESC
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-#define VER_DESC (ntpq_opt_strs+1492)
-#define VER_name (ntpq_opt_strs+1528)
-#define SAVE_OPTS_DESC (ntpq_opt_strs+1536)
-#define SAVE_OPTS_name (ntpq_opt_strs+1575)
-#define LOAD_OPTS_DESC (ntpq_opt_strs+1585)
-#define LOAD_OPTS_NAME (ntpq_opt_strs+1617)
-#define NO_LOAD_OPTS_name (ntpq_opt_strs+1627)
-#define LOAD_OPTS_pfx (ntpq_opt_strs+1640)
+#define VER_DESC (ntpq_opt_strs+1534)
+#define VER_name (ntpq_opt_strs+1570)
+#define SAVE_OPTS_DESC (ntpq_opt_strs+1578)
+#define SAVE_OPTS_name (ntpq_opt_strs+1617)
+#define LOAD_OPTS_DESC (ntpq_opt_strs+1627)
+#define LOAD_OPTS_NAME (ntpq_opt_strs+1659)
+#define NO_LOAD_OPTS_name (ntpq_opt_strs+1669)
+#define LOAD_OPTS_pfx (ntpq_opt_strs+1682)
#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
/**
* Declare option callback procedures
{ /* entry idx, value */ 2, VALUE_OPT_COMMAND,
/* equiv idx, value */ 2, VALUE_OPT_COMMAND,
/* equivalenced to */ NO_EQUIVALENT,
- /* min, max, act ct */ 0, 512, 0,
+ /* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ COMMAND_FLAGS, 0,
/* last opt argumnt */ { NULL }, /* --command */
/* arg list/cookie */ NULL,
/* desc, NAME, name */ SET_DEBUG_LEVEL_DESC, SET_DEBUG_LEVEL_NAME, SET_DEBUG_LEVEL_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 5, VALUE_OPT_PEERS,
- /* equiv idx, value */ 5, VALUE_OPT_PEERS,
- /* equivalenced to */ NO_EQUIVALENT,
- /* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ PEERS_FLAGS, 0,
- /* last opt argumnt */ { NULL }, /* --peers */
- /* arg list/cookie */ NULL,
- /* must/cannot opts */ NULL, aPeersCantList,
- /* option proc */ PEERS_OPT_PROC,
- /* desc, NAME, name */ PEERS_DESC, PEERS_NAME, PEERS_name,
- /* disablement strs */ NULL, NULL },
-
- { /* entry idx, value */ 6, VALUE_OPT_INTERACTIVE,
- /* equiv idx, value */ 6, VALUE_OPT_INTERACTIVE,
+ { /* entry idx, value */ 5, VALUE_OPT_INTERACTIVE,
+ /* equiv idx, value */ 5, VALUE_OPT_INTERACTIVE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ INTERACTIVE_FLAGS, 0,
/* desc, NAME, name */ INTERACTIVE_DESC, INTERACTIVE_NAME, INTERACTIVE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 7, VALUE_OPT_NUMERIC,
- /* equiv idx, value */ 7, VALUE_OPT_NUMERIC,
+ { /* entry idx, value */ 6, VALUE_OPT_NUMERIC,
+ /* equiv idx, value */ 6, VALUE_OPT_NUMERIC,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ NUMERIC_FLAGS, 0,
/* desc, NAME, name */ NUMERIC_DESC, NUMERIC_NAME, NUMERIC_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 8, VALUE_OPT_OLD_RV,
- /* equiv idx, value */ 8, VALUE_OPT_OLD_RV,
+ { /* entry idx, value */ 7, VALUE_OPT_OLD_RV,
+ /* equiv idx, value */ 7, VALUE_OPT_OLD_RV,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ OLD_RV_FLAGS, 0,
/* desc, NAME, name */ OLD_RV_DESC, OLD_RV_NAME, OLD_RV_name,
/* disablement strs */ NULL, NULL },
+ { /* entry idx, value */ 8, VALUE_OPT_PEERS,
+ /* equiv idx, value */ 8, VALUE_OPT_PEERS,
+ /* equivalenced to */ NO_EQUIVALENT,
+ /* min, max, act ct */ 0, 1, 0,
+ /* opt state flags */ PEERS_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --peers */
+ /* arg list/cookie */ NULL,
+ /* must/cannot opts */ NULL, aPeersCantList,
+ /* option proc */ PEERS_OPT_PROC,
+ /* desc, NAME, name */ PEERS_DESC, PEERS_NAME, PEERS_name,
+ /* disablement strs */ NULL, NULL },
+
+ { /* entry idx, value */ 9, VALUE_OPT_WIDE,
+ /* equiv idx, value */ 9, VALUE_OPT_WIDE,
+ /* equivalenced to */ NO_EQUIVALENT,
+ /* min, max, act ct */ 0, 1, 0,
+ /* opt state flags */ WIDE_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --wide */
+ /* arg list/cookie */ NULL,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ NULL,
+ /* desc, NAME, name */ WIDE_DESC, WIDE_NAME, WIDE_name,
+ /* disablement strs */ NULL, NULL },
+
{ /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
/* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION,
/* equivalenced to */ NO_EQUIVALENT,
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of ntpq. */
-#define zPROGNAME (ntpq_opt_strs+1643)
+#define zPROGNAME (ntpq_opt_strs+1685)
/** Reference to the title line for ntpq usage. */
-#define zUsageTitle (ntpq_opt_strs+1648)
+#define zUsageTitle (ntpq_opt_strs+1690)
/** ntpq configuration file name. */
-#define zRcName (ntpq_opt_strs+1777)
+#define zRcName (ntpq_opt_strs+1819)
/** Directories to search for ntpq config files. */
static char const * const apzHomeList[3] = {
- ntpq_opt_strs+1769,
- ntpq_opt_strs+1775,
+ ntpq_opt_strs+1811,
+ ntpq_opt_strs+1817,
NULL };
/** The ntpq program bug email address. */
-#define zBugsAddr (ntpq_opt_strs+1784)
+#define zBugsAddr (ntpq_opt_strs+1826)
/** 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+1818)
+#define zFullVersion (ntpq_opt_strs+1860)
/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
NO_EQUIVALENT, /* '-#' option index */
NO_EQUIVALENT /* index of default opt */
},
- 14 /* full option count */, 9 /* user option count */,
+ 15 /* full option count */, 10 /* user option count */,
ntpq_full_usage, ntpq_short_usage,
NULL, NULL,
PKGDATADIR, ntpq_packager_info
/* referenced via ntpqOptions.pOptDesc->pzText */
puts(_("Set the debug verbosity level"));
- /* referenced via ntpqOptions.pOptDesc->pzText */
- puts(_("Print a list of the peers"));
-
/* referenced via ntpqOptions.pOptDesc->pzText */
puts(_("Force ntpq to operate in interactive mode"));
/* referenced via ntpqOptions.pOptDesc->pzText */
puts(_("Always output status line with readvar"));
+ /* referenced via ntpqOptions.pOptDesc->pzText */
+ puts(_("Print a list of the peers"));
+
+ /* referenced via ntpqOptions.pOptDesc->pzText */
+ puts(_("Display the full 'remote' value"));
+
/* referenced via ntpqOptions.pOptDesc->pzText */
puts(_("display extended usage information and exit"));
value = c;
arg-type = string;
descrip = "run a command and exit";
- max = 512;
+ max = NOLIMIT;
arg-name = cmd;
call-proc = ntpq_custom_opt_handler;
doc = <<- _EndOfDoc_
#include debug-opt.def
-flag = {
- name = peers;
- value = p;
- descrip = "Print a list of the peers";
- flags-cant = interactive;
- call-proc = ntpq_custom_opt_handler;
- doc = <<- _EndOfDoc_
- Print a list of the peers known to the server as well as a summary
- of their state. This is equivalent to the 'peers' interactive command.
- _EndOfDoc_;
-};
-
flag = {
name = interactive;
value = i;
_EndOfDoc_;
};
+flag = {
+ name = peers;
+ value = p;
+ descrip = "Print a list of the peers";
+ flags-cant = interactive;
+ call-proc = ntpq_custom_opt_handler;
+ doc = <<- _EndOfDoc_
+ Print a list of the peers known to the server as well as a summary
+ of their state. This is equivalent to the 'peers' interactive command.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = wide;
+ value = w;
+ descrip = "Display the full 'remote' value";
+ doc = <<- _EndOfDoc_
+ Display the full value of the 'remote' value. If this requires
+ more than 15 characters, display the full value, emit a newline,
+ and continue the data display properly indented on the next line.
+ _EndOfDoc_;
+};
+
doc-section = {
ds-type = 'DESCRIPTION';
ds-format = 'mdoc';
field of the
.Lk decode.html#peer "peer status word"
.It Ic remote
-host name (or IP number) of peer
+host name (or IP number) of peer.
+The value displayed will be truncated to 15 characters unless the
+.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
.Lk decode.html#kiss "'kiss code"
INDEX_OPT_COMMAND = 2,
INDEX_OPT_DEBUG_LEVEL = 3,
INDEX_OPT_SET_DEBUG_LEVEL = 4,
- INDEX_OPT_PEERS = 5,
- INDEX_OPT_INTERACTIVE = 6,
- INDEX_OPT_NUMERIC = 7,
- INDEX_OPT_OLD_RV = 8,
- INDEX_OPT_VERSION = 9,
- INDEX_OPT_HELP = 10,
- INDEX_OPT_MORE_HELP = 11,
- INDEX_OPT_SAVE_OPTS = 12,
- INDEX_OPT_LOAD_OPTS = 13
+ INDEX_OPT_INTERACTIVE = 5,
+ INDEX_OPT_NUMERIC = 6,
+ INDEX_OPT_OLD_RV = 7,
+ INDEX_OPT_PEERS = 8,
+ INDEX_OPT_WIDE = 9,
+ INDEX_OPT_VERSION = 10,
+ INDEX_OPT_HELP = 11,
+ INDEX_OPT_MORE_HELP = 12,
+ INDEX_OPT_SAVE_OPTS = 13,
+ INDEX_OPT_LOAD_OPTS = 14
} teOptIndex;
/** count of all options for ntpq */
-#define OPTION_CT 14
+#define OPTION_CT 15
/** ntpq version */
#define NTPQ_VERSION "4.2.7p460"
/** Full ntpq version text */
# warning undefining SET_DEBUG_LEVEL due to option name conflict
# undef SET_DEBUG_LEVEL
# endif
-# ifdef PEERS
-# warning undefining PEERS due to option name conflict
-# undef PEERS
-# endif
# ifdef INTERACTIVE
# warning undefining INTERACTIVE due to option name conflict
# undef INTERACTIVE
# warning undefining OLD_RV due to option name conflict
# undef OLD_RV
# endif
+# ifdef PEERS
+# warning undefining PEERS due to option name conflict
+# undef PEERS
+# endif
+# ifdef WIDE
+# warning undefining WIDE due to option name conflict
+# undef WIDE
+# endif
#else /* NO_OPTION_NAME_WARNINGS */
# undef IPV4
# undef IPV6
# undef COMMAND
# undef DEBUG_LEVEL
# undef SET_DEBUG_LEVEL
-# undef PEERS
# undef INTERACTIVE
# undef NUMERIC
# undef OLD_RV
+# undef PEERS
+# undef WIDE
#endif /* NO_OPTION_NAME_WARNINGS */
/**
#define VALUE_OPT_SET_DEBUG_LEVEL 'D'
#define OPT_VALUE_SET_DEBUG_LEVEL (DESC(SET_DEBUG_LEVEL).optArg.argInt)
-#define VALUE_OPT_PEERS 'p'
#define VALUE_OPT_INTERACTIVE 'i'
#define VALUE_OPT_NUMERIC 'n'
#define VALUE_OPT_OLD_RV 0x1001
+#define VALUE_OPT_PEERS 'p'
+#define VALUE_OPT_WIDE 'w'
/** option flag (value) for help-value option */
#define VALUE_OPT_HELP '?'
/** option flag (value) for more-help-value option */
* Imported from ntpq.c
*/
extern int showhostnames;
+extern int wideremote;
extern int rawmode;
extern struct servent *server_entry;
extern struct association *assoc_cache;
if (!have_srchost)
strlcpy(clock_name, nntohost(&srcadr),
sizeof(clock_name));
- fprintf(fp, "%c%-15.15s ", c, clock_name);
+ if (wideremote && 15 < strlen(clock_name))
+ fprintf(fp, "%c%s\n ", c, clock_name);
+ else
+ fprintf(fp, "%c%-15.15s ", c, clock_name);
if (!have_da_rid) {
drlen = 0;
} else {
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpq 1ntpqman "13 Aug 2014" "4.2.7p460" "User Commands"
+.TH ntpq 1ntpqman "14 Aug 2014" "4.2.7p460" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-7SaOpK/ag-iTaOoK)
+.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
.\" It has been AutoGen-ed
.\" From the definitions ntpq-opts.def
.ns
.TP 10
.NOP \f\*[B-Font]remote\f[]
-host name (or IP number) of peer
+host name (or IP number) of peer.
+The value displayed will be truncated to 15 characters unless the
+\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.
.br
.ns
.TP 10
.TP
.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]cmd\f[], \f\*[B-Font]\-\-command\f[]=\f\*[I-Font]cmd\f[]
run a command and exit.
-This option may appear up to 512 times.
+This option may appear an unlimited number of times.
.sp
The following argument is interpreted as an interactive format command
and is added to the list of commands to be executed on the specified
This option takes an integer number as its argument.
.sp
.TP
-.NOP \f\*[B-Font]\-p\f[], \f\*[B-Font]\-\-peers\f[]
-Print a list of the peers.
-This option must not appear in combination with any of the following options:
-interactive.
-.sp
-Print a list of the peers known to the server as well as a summary
-of their state. This is equivalent to the 'peers' interactive command.
-.TP
.NOP \f\*[B-Font]\-i\f[], \f\*[B-Font]\-\-interactive\f[]
Force ntpq to operate in interactive mode.
This option must not appear in combination with any of the following options:
preset this option in a script will enable both older and
newer \fBntpq\fP to behave identically in this regard.
.TP
+.NOP \f\*[B-Font]\-p\f[], \f\*[B-Font]\-\-peers\f[]
+Print a list of the peers.
+This option must not appear in combination with any of the following options:
+interactive.
+.sp
+Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'peers' interactive command.
+.TP
+.NOP \f\*[B-Font]\-w\f[], \f\*[B-Font]\-\-wide\f[]
+Display the full 'remote' value.
+.sp
+Display the full value of the 'remote' value. If this requires
+more than 15 characters, display the full value, emit a newline,
+and continue the data display properly indented on the next line.
+.TP
.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
Display usage information and exit.
.TP
The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
If any of these are directories, then the file \fI.ntprc\fP
is searched for within those directories.
-.TH ntpq 1ntpqman "13 Aug 2014" "4.2.7p460" "User Commands"
-.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-7SaOpK/ag-iTaOoK)
-.\"
-.\" It has been AutoGen-ed
-.\" From the definitions ntpq-opts.def
-.\" and the template file agman-cmd.tpl
-.SH NAME
-\f\*[B-Font]ntpq\fP ntpq
-\- standard NTP query program
-cvt_prog='/usr/local/gnu/share/autogen/texi2man'
-cvt_prog=`cd \`dirname "$cvt_prog"\` >/dev/null && pwd
- `/`basename "$cvt_prog"`
-cd $tmp_dir
-test \-x "$cvt_prog" || die "'$cvt_prog' is not executable"
-{
- list='synopsis description options option-presets'
- for f in $list ; do cat $f ; echo ; done
- rm \-f $list name
- list='implementation-notes environment files examples exit-status errors
- compatibility see-also conforming-to history authors copyright bugs
- notes'
- for f in $list ; do cat $f ; echo ; done > .end-doc
- rm \-f $list
- list=`ls \-1 *`' .end-doc'
- for f in $list ; do cat $f ; echo ; done
- rm \-f $list
-} 1>.doc 2>/dev/null
-/opt/csw/bin/ggrep \-E \-v '^[ ]*$' .doc | $cvt_prog
.SH "ENVIRONMENT"
See \fBOPTION PRESETS\fP for configuration environment variables.
.SH "FILES"
-.Dd August 13 2014
+.Dd August 14 2014
.Dt NTPQ 1ntpqmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\"
-.\" It has been AutoGen-ed August 13, 2014 at 07:49:10 AM by AutoGen 5.18.4pre14
+.\" It has been AutoGen-ed
.\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
field of the
.Lk decode.html#peer "peer status word"
.It Ic remote
-host name (or IP number) of peer
+host name (or IP number) of peer.
+The value displayed will be truncated to 15 characters unless the
+.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
.Lk decode.html#kiss "'kiss code"
to the IPv6 namespace.
.It Fl c Ar cmd , Fl \-command Ns = Ns Ar cmd
run a command and exit.
-This option may appear up to 512 times.
+This option may appear an unlimited number of times.
.sp
The following argument is interpreted as an interactive format command
and is added to the list of commands to be executed on the specified
This option may appear an unlimited number of times.
This option takes an integer number as its argument.
.sp
-.It Fl p , Fl \-peers
-Print a list of the peers.
-This option must not appear in combination with any of the following options:
-interactive.
-.sp
-Print a list of the peers known to the server as well as a summary
-of their state. This is equivalent to the 'peers' interactive command.
.It Fl i , Fl \-interactive
Force ntpq to operate in interactive mode.
This option must not appear in combination with any of the following options:
Using an environment variable to
preset this option in a script will enable both older and
newer \fBntpq\fP to behave identically in this regard.
+.It Fl p , Fl \-peers
+Print a list of the peers.
+This option must not appear in combination with any of the following options:
+interactive.
+.sp
+Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'peers' interactive command.
+.It Fl w , Fl \-wide
+Display the full 'remote' value.
+.sp
+Display the full value of the 'remote' value. If this requires
+more than 15 characters, display the full value, emit a newline,
+and continue the data display properly indented on the next line.
.It Fl \&? , Fl \-help
Display usage information and exit.
.It Fl \&! , Fl \-more\-help
The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
If any of these are directories, then the file \fI.ntprc\fP
is searched for within those directories.
-cvt_prog='/usr/local/gnu/share/autogen/texi2mdoc'
-cvt_prog=`cd \`dirname "$cvt_prog"\` >/dev/null && pwd
- `/`basename "$cvt_prog"`
-cd $tmp_dir
-test \-x "$cvt_prog" || die "'$cvt_prog' is not executable"
-{
- list='synopsis description options option\-presets'
- for f in $list ; do cat $f ; echo ; done
- rm \-f $list name
- list='implementation\-notes environment files examples exit\-status errors
- compatibility see\-also conforming\-to history authors copyright bugs
- notes'
- for f in $list ; do cat $f ; echo ; done > .end\-doc
- rm \-f $list
- list=`ls \-1 *`' .end\-doc'
- for f in $list ; do cat $f ; echo ; done
- rm \-f $list
-} 1>.doc 2>/dev/null
-/opt/csw/bin/ggrep \-E \-v '^[ ]*$' .doc | $cvt_prog
.Sh "ENVIRONMENT"
See \fBOPTION PRESETS\fP for configuration environment variables.
.Sh "FILES"
int currenthostisnum; /* is prior text from IP? */
struct sockaddr_in hostaddr = { 0 }; /* host address */
int showhostnames = 1; /* show host names by default */
+int wideremote = 0; /* show wide remote names? */
int ai_fam_templ; /* address family */
int ai_fam_default; /* default address family */
if (HAVE_OPT(NUMERIC))
showhostnames = 0;
+ if (HAVE_OPT(WIDE))
+ wideremote = 1;
+
old_rv = HAVE_OPT(OLD_RV);
if (0 == argc) {
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpq @NTPQ_MS@ "13 Aug 2014" "4.2.7p460" "User Commands"
+.TH ntpq @NTPQ_MS@ "14 Aug 2014" "4.2.7p460" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-7SaOpK/ag-iTaOoK)
+.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
.\" It has been AutoGen-ed
.\" From the definitions ntpq-opts.def
.ns
.TP 10
.NOP \f\*[B-Font]remote\f[]
-host name (or IP number) of peer
+host name (or IP number) of peer.
+The value displayed will be truncated to 15 characters unless the
+\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.
.br
.ns
.TP 10
.TP
.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]cmd\f[], \f\*[B-Font]\-\-command\f[]=\f\*[I-Font]cmd\f[]
run a command and exit.
-This option may appear up to 512 times.
+This option may appear an unlimited number of times.
.sp
The following argument is interpreted as an interactive format command
and is added to the list of commands to be executed on the specified
This option takes an integer number as its argument.
.sp
.TP
-.NOP \f\*[B-Font]\-p\f[], \f\*[B-Font]\-\-peers\f[]
-Print a list of the peers.
-This option must not appear in combination with any of the following options:
-interactive.
-.sp
-Print a list of the peers known to the server as well as a summary
-of their state. This is equivalent to the 'peers' interactive command.
-.TP
.NOP \f\*[B-Font]\-i\f[], \f\*[B-Font]\-\-interactive\f[]
Force ntpq to operate in interactive mode.
This option must not appear in combination with any of the following options:
preset this option in a script will enable both older and
newer \fBntpq\fP to behave identically in this regard.
.TP
+.NOP \f\*[B-Font]\-p\f[], \f\*[B-Font]\-\-peers\f[]
+Print a list of the peers.
+This option must not appear in combination with any of the following options:
+interactive.
+.sp
+Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'peers' interactive command.
+.TP
+.NOP \f\*[B-Font]\-w\f[], \f\*[B-Font]\-\-wide\f[]
+Display the full 'remote' value.
+.sp
+Display the full value of the 'remote' value. If this requires
+more than 15 characters, display the full value, emit a newline,
+and continue the data display properly indented on the next line.
+.TP
.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
Display usage information and exit.
.TP
The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
If any of these are directories, then the file \fI.ntprc\fP
is searched for within those directories.
-.TH ntpq @NTPQ_MS@ "13 Aug 2014" "4.2.7p460" "User Commands"
-.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-7SaOpK/ag-iTaOoK)
-.\"
-.\" It has been AutoGen-ed
-.\" From the definitions ntpq-opts.def
-.\" and the template file agman-cmd.tpl
-.SH NAME
-\f\*[B-Font]ntpq\fP ntpq
-\- standard NTP query program
-cvt_prog='/usr/local/gnu/share/autogen/texi2man'
-cvt_prog=`cd \`dirname "$cvt_prog"\` >/dev/null && pwd
- `/`basename "$cvt_prog"`
-cd $tmp_dir
-test \-x "$cvt_prog" || die "'$cvt_prog' is not executable"
-{
- list='synopsis description options option-presets'
- for f in $list ; do cat $f ; echo ; done
- rm \-f $list name
- list='implementation-notes environment files examples exit-status errors
- compatibility see-also conforming-to history authors copyright bugs
- notes'
- for f in $list ; do cat $f ; echo ; done > .end-doc
- rm \-f $list
- list=`ls \-1 *`' .end-doc'
- for f in $list ; do cat $f ; echo ; done
- rm \-f $list
-} 1>.doc 2>/dev/null
-/opt/csw/bin/ggrep \-E \-v '^[ ]*$' .doc | $cvt_prog
.SH "ENVIRONMENT"
See \fBOPTION PRESETS\fP for configuration environment variables.
.SH "FILES"
-.Dd August 13 2014
+.Dd August 14 2014
.Dt NTPQ @NTPQ_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\"
-.\" It has been AutoGen-ed August 13, 2014 at 07:49:10 AM by AutoGen 5.18.4pre14
+.\" It has been AutoGen-ed
.\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
field of the
.Lk decode.html#peer "peer status word"
.It Ic remote
-host name (or IP number) of peer
+host name (or IP number) of peer.
+The value displayed will be truncated to 15 characters unless the
+.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
.Lk decode.html#kiss "'kiss code"
to the IPv6 namespace.
.It Fl c Ar cmd , Fl \-command Ns = Ns Ar cmd
run a command and exit.
-This option may appear up to 512 times.
+This option may appear an unlimited number of times.
.sp
The following argument is interpreted as an interactive format command
and is added to the list of commands to be executed on the specified
This option may appear an unlimited number of times.
This option takes an integer number as its argument.
.sp
-.It Fl p , Fl \-peers
-Print a list of the peers.
-This option must not appear in combination with any of the following options:
-interactive.
-.sp
-Print a list of the peers known to the server as well as a summary
-of their state. This is equivalent to the 'peers' interactive command.
.It Fl i , Fl \-interactive
Force ntpq to operate in interactive mode.
This option must not appear in combination with any of the following options:
Using an environment variable to
preset this option in a script will enable both older and
newer \fBntpq\fP to behave identically in this regard.
+.It Fl p , Fl \-peers
+Print a list of the peers.
+This option must not appear in combination with any of the following options:
+interactive.
+.sp
+Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'peers' interactive command.
+.It Fl w , Fl \-wide
+Display the full 'remote' value.
+.sp
+Display the full value of the 'remote' value. If this requires
+more than 15 characters, display the full value, emit a newline,
+and continue the data display properly indented on the next line.
.It Fl \&? , Fl \-help
Display usage information and exit.
.It Fl \&! , Fl \-more\-help
The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
If any of these are directories, then the file \fI.ntprc\fP
is searched for within those directories.
-cvt_prog='/usr/local/gnu/share/autogen/texi2mdoc'
-cvt_prog=`cd \`dirname "$cvt_prog"\` >/dev/null && pwd
- `/`basename "$cvt_prog"`
-cd $tmp_dir
-test \-x "$cvt_prog" || die "'$cvt_prog' is not executable"
-{
- list='synopsis description options option\-presets'
- for f in $list ; do cat $f ; echo ; done
- rm \-f $list name
- list='implementation\-notes environment files examples exit\-status errors
- compatibility see\-also conforming\-to history authors copyright bugs
- notes'
- for f in $list ; do cat $f ; echo ; done > .end\-doc
- rm \-f $list
- list=`ls \-1 *`' .end\-doc'
- for f in $list ; do cat $f ; echo ; done
- rm \-f $list
-} 1>.doc 2>/dev/null
-/opt/csw/bin/ggrep \-E \-v '^[ ]*$' .doc | $cvt_prog
.Sh "ENVIRONMENT"
See \fBOPTION PRESETS\fP for configuration environment variables.
.Sh "FILES"