NTPQ(8) | Programmer's Manual | NTPQ(8) |
If one or more request options is included on the command line when [= prog-name =] is executed, each of the requests will be sent to the NTP servers running on each of the hosts given as command line arguments, or on localhost by default. If no request options are given, [= prog-name =] will attempt to read commands from the standard input and execute these on the NTP server running on the first host given on the command line, again defaulting to localhost when no other host is specified. The [= prog-name =] utility will prompt for commands if the standard input is a terminal device.
The [= prog-name =] utility uses NTP mode 6 packets to communicate with the NTP server, and hence can be used to query any compatible server on the network which permits it. Note that since NTP is a UDP protocol this communication will be somewhat unreliable, especially over large distances in terms of network topology. The [= prog-name =] 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.
Specifying a command line option other than or will cause the specified query (queries) to be sent to the indicated host(s) immediately. Otherwise, [= prog-name =] will attempt to read interactive format commands from the standard input. 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.
A number of interactive format commands are executed entirely within the [= prog-name =] utility itself and do not result in NTP mode 6 requests being sent to a server. These are described following.
-4, --ipv4 |
Force IPv4 DNS name resolution. This option must not appear in combination with any of the following options: ipv6. |
-6, --ipv6 |
Force IPv6 DNS name resolution. This option must not appear in combination with any of the following options: ipv4. |
-c cmd, --command=cmd |
run a command and exit. This option may appear an unlimited number of times. |
-d, --debug-level |
Increase output debug message level. This option may appear an unlimited number of times. |
-D string, --set-debug-level=string |
Set the output debug message level. This option may appear an unlimited number of times. |
-p, --peers |
Print a list of the peers. This option must not appear in combination with any of the following options: interactive. |
-i, --interactive |
Force ntpq to operate in interactive mode. This option must not appear in combination with any of the following options: command, peers. |
-n, --numeric |
numeric host addresses. |
--old-rv |
Always output status line with readvar. |
-?, --help | Display extended usage information and exit. |
-!, --more-help | Extended usage information passed thru pager. |
-> [rcfile], --save-opts[=rcfile] | Save the option state to rcfile. The default is the last configuration file listed in the OPTION PRESETS section, below. |
-< rcfile, --load-opts=rcfile, --no-load-opts | Load options from rcfile. The no-load-opts form will disable the loading of earlier RC/INI files. --no-load-opts is handled early, out of order. |
- [{v|c|n}], --version[={v|c|n}] | Output version of program and exit. The default mode is `v', a simple version. The `c' mode will print copyright information and `n' will print the full copyright notice. |
see html/copyright.html
This manual page was AutoGen-erated from the ntpq option definitions.
December 10, 2009 | ( 4.2.6) |