File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / ntp / ntpq / ntpq.1
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue May 29 12:08:38 2012 UTC (12 years, 1 month ago) by misho
Branches: ntp, MAIN
CVS tags: v4_2_6p5p0, v4_2_6p5, HEAD
ntp 4.2.6p5

    1: .TH NTPQ 1 2011-12-24 "( 4.2.6p5)" "Programmer's Manual"
    2: .\"  EDIT THIS FILE WITH CAUTION  (ntpq.1)
    3: .\"  
    4: .\"  It has been AutoGen-ed  December 24, 2011 at 06:34:35 PM by AutoGen 5.12
    5: .\"  From the definitions    ntpq-opts.def
    6: .\"  and the template file   agman1.tpl
    7: .\"
    8: .SH NAME
    9: ntpq \- standard NTP query program
   10: .SH SYNOPSIS
   11: .B ntpq
   12: .\" Mixture of short (flag) options and long options
   13: .RB [ \-\fIflag\fP " [\fIvalue\fP]]... [" \--\fIopt-name\fP " [[=| ]\fIvalue\fP]]..."
   14: .br
   15: .in +8
   16: [ host ...]
   17: .SH "DESCRIPTION"
   18: This manual page briefly documents the \fBntpq\fP command.
   19: The
   20: [= prog-name =]
   21: utility program is used to query NTP servers which
   22: implement the standard NTP mode 6 control message formats defined
   23: in Appendix B of the NTPv3 specification RFC1305, requesting
   24: information about current state and/or changes in that state.
   25: The same formats are used in NTPv4, although some of the
   26: variables have changed and new ones added. The description on this
   27: page is for the NTPv4 variables.
   28: The program may be run either in interactive mode or controlled using
   29: command line arguments.
   30: Requests to read and write arbitrary
   31: variables can be assembled, with raw and pretty-printed output
   32: options being available.
   33: The
   34: [= prog-name =]
   35: utility can also obtain and print a
   36: list of peers in a common format by sending multiple queries to the
   37: server.
   38: 
   39: If one or more request options is included on the command line
   40: when
   41: [= prog-name =]
   42: is executed, each of the requests will be sent
   43: to the NTP servers running on each of the hosts given as command
   44: line arguments, or on localhost by default.
   45: If no request options
   46: are given,
   47: [= prog-name =]
   48: will attempt to read commands from the
   49: standard input and execute these on the NTP server running on the
   50: first host given on the command line, again defaulting to localhost
   51: when no other host is specified.
   52: The
   53: [= prog-name =]
   54: utility will prompt for
   55: commands if the standard input is a terminal device.
   56: 
   57: The
   58: [= prog-name =]
   59: utility uses NTP mode 6 packets to communicate with the
   60: NTP server, and hence can be used to query any compatible server on
   61: the network which permits it.
   62: Note that since NTP is a UDP protocol
   63: this communication will be somewhat unreliable, especially over
   64: large distances in terms of network topology.
   65: The
   66: [= prog-name =]
   67: utility makes
   68: one attempt to retransmit requests, and will time requests out if
   69: the remote host is not heard from within a suitable timeout
   70: time.
   71: 
   72: Specifying a
   73: command line option other than
   74: .Fl i
   75: or
   76: .Fl n
   77: will
   78: cause the specified query (queries) to be sent to the indicated
   79: host(s) immediately.
   80: Otherwise,
   81: [= prog-name =]  
   82: will attempt to read
   83: interactive format commands from the standard input.
   84: .Ss "Internal Commands"
   85: Interactive format commands consist of a keyword followed by zero
   86: to four arguments.
   87: Only enough characters of the full keyword to
   88: uniquely identify the command need be typed.
   89: 
   90: A
   91: number of interactive format commands are executed entirely within
   92: the
   93: [= prog-name =]
   94: utility itself and do not result in NTP mode 6
   95: requests being sent to a server.
   96: These are described following.
   97: .sp
   98: .IR "? [command_keyword]"
   99: .sp 1x help [command_keyword]
  100: A
  101: .Ql \&?
  102: by itself will print a list of all the command
  103: keywords known to this incarnation of
  104: [= prog-name =] .
  105: A
  106: .Ql \&?
  107: followed by a command keyword will print function and usage
  108: information about the command.
  109: This command is probably a better
  110: source of information about
  111: [= prog-name =]
  112: than this manual
  113: page.
  114: .sp
  115: .IR "addvars"
  116: .Ar variable_name [=value] ...
  117: .Xc
  118: .sp
  119: .IR "rmvars variable_name ..."
  120: .sp
  121: .IR "clearvars"
  122: The data carried by NTP mode 6 messages consists of a list of
  123: items of the form
  124: .Ql variable_name=value ,
  125: where the
  126: .Ql =value
  127: is ignored, and can be omitted,
  128: in requests to the server to read variables.
  129: The
  130: [= prog-name =]
  131: utility maintains an internal list in which data to be included in control
  132: messages can be assembled, and sent using the
  133: .Ic readlist
  134: and
  135: .Ic writelist
  136: commands described below.
  137: The
  138: .Ic addvars
  139: command allows variables and their optional values to be added to
  140: the list.
  141: If more than one variable is to be added, the list should
  142: be comma-separated and not contain white space.
  143: The
  144: .Ic rmvars
  145: command can be used to remove individual variables from the list,
  146: while the
  147: .Ic clearlist
  148: command removes all variables from the
  149: list.
  150: .sp
  151: .IR "authenticate [ yes | no ]"
  152: Normally
  153: [= prog-name =]
  154: does not authenticate requests unless
  155: they are write requests.
  156: The command
  157: .Ql authenticate yes
  158: causes
  159: [= prog-name =]
  160: to send authentication with all requests it
  161: makes.
  162: Authenticated requests causes some servers to handle
  163: requests slightly differently, and can occasionally melt the CPU in
  164: fuzzballs if you turn authentication on before doing a
  165: .Ic peer
  166: display.
  167: The command
  168: .Ql authenticate
  169: causes
  170: [= prog-name =]
  171: to display whether or not
  172: [= prog-name =]
  173: is currently autheinticating requests.
  174: .sp
  175: .IR "cooked"
  176: Causes output from query commands to be "cooked", so that
  177: variables which are recognized by
  178: [= prog-name =]
  179: will have their
  180: values reformatted for human consumption.
  181: Variables which
  182: [= prog-name =]
  183: thinks should have a decodable value but didn't are
  184: marked with a trailing
  185: .Ql \&? .
  186: .@item debug [
  187: .Cm more |
  188: .Cm less |
  189: .Cm off
  190: ]
  191: .Xc
  192: With no argument, displays the current debug level.
  193: Otherwise, the debug level is changed to the indicated level.
  194: .sp
  195: .IR "delay milliseconds"
  196: Specify a time interval to be added to timestamps included in
  197: requests which require authentication.
  198: This is used to enable
  199: (unreliable) server reconfiguration over long delay network paths
  200: or between machines whose clocks are unsynchronized.
  201: Actually the
  202: server does not now require timestamps in authenticated requests,
  203: so this command may be obsolete.
  204: .sp
  205: .IR "host hostname"
  206: Set the host to which future queries will be sent.
  207: Hostname may
  208: be either a host name or a numeric address.
  209: .sp
  210: .IR "hostnames Cm yes | Cm no"
  211: If
  212: .Cm yes
  213: is specified, host names are printed in
  214: information displays.
  215: If
  216: .Cm no
  217: is specified, numeric
  218: addresses are printed instead.
  219: The default is
  220: .Cm yes ,
  221: unless
  222: modified using the command line
  223: .Fl n
  224: switch.
  225: .sp
  226: .IR "keyid keyid"
  227: This command allows the specification of a key number to be
  228: used to authenticate configuration requests.
  229: This must correspond
  230: to a key number the server has been configured to use for this
  231: purpose.
  232: .sp
  233: .IR "ntpversion ["
  234: .Cm 1 |
  235: .Cm 2 |
  236: .Cm 3 |
  237: .Cm 4
  238: ]
  239: .Xc
  240: Sets the NTP version number which
  241: [= prog-name =]
  242: claims in
  243: packets.
  244: Defaults to 3, Note that mode 6 control messages (and
  245: modes, for that matter) didn't exist in NTP version 1.
  246: There appear
  247: to be no servers left which demand version 1.
  248: With no argument, displays the current NTP version that will be used
  249: when communicating with servers.
  250: .sp
  251: .IR "quit"
  252: Exit
  253: [= prog-name =] .
  254: .sp
  255: .IR "passwd"
  256: This command prompts you to type in a password (which will not
  257: be echoed) which will be used to authenticate configuration
  258: requests.
  259: The password must correspond to the key configured for
  260: use by the NTP server for this purpose if such requests are to be
  261: successful.
  262: .sp
  263: .IR "raw"
  264: Causes all output from query commands is printed as received
  265: from the remote server.
  266: The only formating/interpretation done on
  267: the data is to transform nonascii data into a printable (but barely
  268: understandable) form.
  269: .sp
  270: .IR "timeout Ar milliseconds"
  271: Specify a timeout period for responses to server queries.
  272: The
  273: default is about 5000 milliseconds.
  274: Note that since
  275: [= prog-name =]
  276: retries each query once after a timeout, the total waiting time for
  277: a timeout will be twice the timeout value set.
  278: .br
  279: 
  280: .SH OPTIONS
  281: .TP
  282: .BR \-4 ", " \--ipv4
  283: Force IPv4 DNS name resolution.
  284: This option must not appear in combination with any of the following options:
  285: ipv6.
  286: .sp
  287: Force DNS resolution of following host names on the command line
  288: to the IPv4 namespace.
  289: .TP
  290: .BR \-6 ", " \--ipv6
  291: Force IPv6 DNS name resolution.
  292: This option must not appear in combination with any of the following options:
  293: ipv4.
  294: .sp
  295: Force DNS resolution of following host names on the command line
  296: to the IPv6 namespace.
  297: .TP
  298: .BR \-c " \fIcmd\fP, " \--command "=" \fIcmd\fP
  299: run a command and exit.
  300: This option may appear an unlimited number of times.
  301: .sp
  302: The following argument is interpreted as an interactive format command
  303: and is added to the list of commands to be executed on the specified
  304: host(s).
  305: .TP
  306: .BR \-d ", " \--debug-level
  307: Increase output debug message level.
  308: This option may appear an unlimited number of times.
  309: .sp
  310: Increase the debugging message output level.
  311: .TP
  312: .BR \-D " \fIstring\fP, " \--set-debug-level "=" \fIstring\fP
  313: Set the output debug message level.
  314: This option may appear an unlimited number of times.
  315: .sp
  316: Set the output debugging level.  Can be supplied multiple times,
  317: but each overrides the previous value(s).
  318: .TP
  319: .BR \-p ", " \--peers
  320: Print a list of the peers.
  321: This option must not appear in combination with any of the following options:
  322: interactive.
  323: .sp
  324: Print a list of the peers known to the server as well as a summary
  325: of their state. This is equivalent to the 'peers' interactive command.
  326: .TP
  327: .BR \-i ", " \--interactive
  328: Force ntpq to operate in interactive mode.
  329: This option must not appear in combination with any of the following options:
  330: command, peers.
  331: .sp
  332: Force ntpq to operate in interactive mode.  Prompts will be written
  333: to the standard output and commands read from the standard input.
  334: .TP
  335: .BR \-n ", " \--numeric
  336: numeric host addresses.
  337: .sp
  338: Output all host addresses in dotted-quad numeric format rather than
  339: converting to the canonical host names. 
  340: .TP
  341: .BR \--old-rv
  342: Always output status line with readvar.
  343: .sp
  344: By default, ntpq now suppresses the associd=... line that
  345: precedes the output of "readvar" (alias "rv") when a single
  346: variable is requested, such as ntpq \-c "rv 0 offset".  This
  347: option causes ntpq to include both lines of output for a
  348: single-variable readvar.  Using an environment variable to
  349: preset this option in a script will enable both older and
  350: newer ntpq to behave identically in this regard.
  351: .TP
  352: .BR \-? , " \--help"
  353: Display extended usage information and exit.
  354: .TP
  355: .BR \-! , " \--more-help"
  356: Extended usage information passed thru pager.
  357: .TP
  358: .BR \-> " [\fIrcfile\fP]," " \--save-opts" "[=\fIrcfile\fP]"
  359: Save the option state to \fIrcfile\fP.  The default is the \fIlast\fP
  360: configuration file listed in the \fBOPTION PRESETS\fP section, below.
  361: .TP
  362: .BR \-< " \fIrcfile\fP," " \--load-opts" "=\fIrcfile\fP," " \--no-load-opts"
  363: Load options from \fIrcfile\fP.
  364: The \fIno-load-opts\fP form will disable the loading
  365: of earlier RC/INI files.  \fI--no-load-opts\fP is handled early,
  366: out of order.
  367: .TP
  368: .BR \- " [{\fIv|c|n\fP}]," " \--version" "[=\fI{v|c|n}\fP]"
  369: Output version of program and exit.  The default mode is `v', a simple
  370: version.  The `c' mode will print copyright information and `n' will
  371: print the full copyright notice.
  372: .SH OPTION PRESETS
  373: Any option that is not marked as \fInot presettable\fP may be preset
  374: by loading values from configuration ("RC" or ".INI") file(s) and values from
  375: environment variables named:
  376: .nf
  377:   \fBNTPQ_<option-name>\fP or \fBNTPQ\fP
  378: .fi
  379: .ad
  380: The environmental presets take precedence (are processed later than)
  381: the configuration files.
  382: The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
  383: If any of these are directories, then the file \fI.ntprc\fP
  384: is searched for within those directories.
  385: .SH AUTHOR
  386: David L. Mills and/or others
  387: .br
  388: Please send bug reports to:  http://bugs.ntp.org, bugs@ntp.org
  389: 
  390: .PP
  391: .nf
  392: .na
  393: see html/copyright.html
  394: 
  395: .fi
  396: .ad
  397: .PP
  398: This manual page was \fIAutoGen\fP-erated from the \fBntpq\fP
  399: option definitions.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>