ntpq.1m (2010 09)

n
ntpq(1M) ntpq(1M)
Control message commands result in one or more NTP mode 6 messages being sent to the server, and
cause the data returned to be printed in some format. Most commands currently implemented send a sin-
gle message and expect a single response. The current exceptions are the
peers command, which sends
a preprogrammed series of messages to obtain the data it needs, and the
mreadlist and mreadvar
commands, which iterate over a range of associations. The supported control messages are listed below:
associations
Obtains and prints a list of association identifiers and peer status for in-spec peers of the
server being queried. The list is printed in columns. The first of these columns is an index
numbering the associations from 1 for internal use, the second column is the actual association
identifier returned by the server and the third column is the status word for the peer. This is
followed by a number of columns containing data decoded from the status word. Note that the
data returned by the
associations command is cached internally in
ntpq. The index is
then of use when dealing with stupid servers which use association identifiers which are hard
for humans to type, in that for any subsequent commands which require an association
identifier as an argument, the form and index may be used as an alternative.
clockvar [ assocID ][ variable_name[=value[ ... ]][ ... ]]
cv [ assocID ][ variable_name[=value[ ... ]][ ... ]]
Requests that a list of the server’s clock variables be sent. Servers which have a radio clock or
other external synchronization respond positively to this. If the association identifier is omit-
ted or zero, the request is for the variables of the
system clock and generally gets a posi-
tive response from all servers with a clock. If the server treats the clocks as pseudo-peers,
then more than one clock connected at once, referencing the appropriate peer association ID
will show the variables of a particular clock. Omitting the variable list causes the server to
return a default variable display.
lassociations
Obtains and prints a list of association identifiers and peer status for all associations for which
the server is maintaining state. This command differs from the associations command
only for servers which retain state for out-of-spec client associations (i.e., fuzzballs). Such
associations are normally omitted from the display when the associations command is
used, but are included in the output of lassociations
.
lpassociations
Print data for all associations, including out-of-spec client associations, from the internally
cached list of associations. This command differs from
passociations command only when
dealing with fuzzballs.
lpeers Similar to peers command, except a summary of all associations for which the server is main-
taining state is printed. This can produce a much longer list of peers from fuzzball servers.
mreadlist assocID assocID
mrl assocID assocID
Similar to the readlist command, except the query is done for each range of (nonzero) asso-
ciation IDs. This range is determined from the association list cached by the most recent asso-
ciations command.
mreadvar assocID assocID [variable_name[ =value ][ ... ]]
mrv assocID assocID [variable_name[=value][ ... ]]
Similar to the readvar command, except the query is done for each range of (nonzero) associ-
ation IDs. This range is determined from the association list cached by the most recent associ-
ations command.
opeers An old form of the peers command with the reference ID replaced by the local interface
address.
passociations
Prints association data concerning in-spec peers from the internally cached list of associations.
This command performs identically to the associations except that it displays the inter-
nally stored data rather than making a new query.
peers Obtains a list of in-spec peers of the server, along with a summary of each peer’s state. Sum-
mary information includes the address of the remote peer, the reference ID (0.0.0.0 if the refID
is unknown), the stratum of the remote peer, the type of the peer (local, unicast, multicast or
broadcast), when the last packet was received, the polling interval, in seconds, the reachability
HP-UX 11i Version 3: September 2010 3 Hewlett-Packard Company 3