{
    "mode": "man",
    "parameter": "NTPQ",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/NTPQ/1/json",
    "generated": "2026-06-15T18:51:37Z",
    "synopsis": "ntpq [-flags] [-flag [value]] [--option-name[[=| ]value]] [ host ...]",
    "sections": {
        "NAME": {
            "content": "ntpq — standard NTP query program\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "ntpq [-flags] [-flag [value]] [--option-name[[=| ]value]] [ host ...]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The ntpq utility program is used to query NTP servers to monitor NTP operations and perfor‐\nmance, requesting information about current state and/or changes in that state.  The program\nmay be run either in interactive mode or controlled using command line arguments.  Requests to\nread and write arbitrary variables can be assembled, with raw and pretty-printed output options\nbeing available.  The ntpq utility can also obtain and print a list of peers in a common format\nby sending multiple queries to the server.\n\nIf one or more request options is included on the command line when ntpq is executed, each of\nthe requests will be sent to the NTP servers running on each of the hosts given as command line\narguments, or on localhost by default.  If no request options are given, ntpq will attempt to\nread commands from the standard input and execute these on the NTP server running on the first\nhost given on the command line, again defaulting to localhost when no other host is specified.\nThe ntpq utility will prompt for commands if the standard input is a terminal device.\n\nntpq uses NTP mode 6 packets to communicate with the NTP server, and hence can be used to query\nany compatible server on the network which permits it.  Note that since NTP is a UDP protocol\nthis communication will be somewhat unreliable, especially over large distances in terms of\nnetwork topology.  The ntpq utility makes one attempt to retransmit requests, and will time re‐\nquests out if the remote host is not heard from within a suitable timeout time.\n\nNote that in contexts where a host name is expected, a -4 qualifier preceding the host name\nforces resolution to the IPv4 namespace, while a -6 qualifier forces resolution to the IPv6\nnamespace.  For examples and usage, see the “NTP Debugging Techniques” page.\n\nSpecifying a command line option other than -i or -n will cause the specified query (queries)\nto be sent to the indicated host(s) immediately.  Otherwise, ntpq will attempt to read interac‐\ntive format commands from the standard input.\n",
            "subsections": [
                {
                    "name": "Internal Commands",
                    "content": "Interactive format commands consist of a keyword followed by zero to four arguments.  Only\nenough characters of the full keyword to uniquely identify the command need be typed.\n\nA number of interactive format commands are executed entirely within the ntpq utility itself\nand do not result in NTP requests being sent to a server.  These are described following.\n? [command]\nhelp [command]  A ‘?’ by itself will print a list of all the commands known to ntpq.  A\n‘?’ followed by a command name will print function and usage information\nabout the command.\naddvars name[=value][,...]\nrmvars name[,...]\nclearvars\nshowvars        The arguments to this command consist of a list of items of the form\nname[=value], where the =value is ignored, and can be omitted, in re‐\nquests to the server to read variables.  The ntpq utility maintains an\ninternal list in which data to be included in messages can be assembled,\nand displayed or set using the readlist and writelist commands described\nbelow.  The addvars command allows variables and their optional values to\nbe added to the list.  If more than one variable is to be added, the list\nshould be comma-separated and not contain white space.  The rmvars com‐\nmand can be used to remove individual variables from the list, while the\nclearvars command removes all variables from the list.  The showvars com‐\nmand displays the current list of optional variables.\nauthenticate [yes|no]\nNormally ntpq does not authenticate requests unless they are write re‐\nquests.  The command authenticate yes causes ntpq to send authentication\nwith all requests it makes.  Authenticated requests causes some servers\nto handle requests slightly differently.  The command authenticate causes\nntpq to display whether or not it is currently authenticating requests.\ncooked          Causes output from query commands to be \"cooked\", so that variables which\nare recognized by ntpq will have their values reformatted for human con‐\nsumption.  Variables which ntpq could not decode completely are marked\nwith a trailing ‘?’.\ndebug [more|less|off]\nWith no argument, displays the current debug level.  Otherwise, the de‐\nbugging level is changed as indicated.\ndelay [milliseconds]\nSpecify a time interval to be added to timestamps included in requests\nwhich require authentication.  This is used to enable (unreliable) server\nreconfiguration over long delay network paths or between machines whose\nclocks are unsynchronized.  Actually the server does not now require\ntimestamps in authenticated requests, so this command may be obsolete.\nWithout any arguments, displays the current delay.\ndrefid [hash|ipv4]\nDisplay refids as IPv4 or hash.  Without any arguments, displays whether\nrefids are shown as IPv4 addresses or hashes.\nexit            Exit ntpq.\nhost [name]     Set the host to which future queries will be sent.  The name may be ei‐\nther a host name or a numeric address.  Without any arguments, displays\nthe current host.\nhostnames [yes|no]\nIf yes is specified, host names are printed in information displays.  If\nno is specified, numeric addresses are printed instead.  The default is\nyes, unless modified using the command line -n switch.  Without any argu‐\nments, displays whether host names or numeric addresses are shown.\nkeyid [keyid]   This command allows the specification of a key number to be used to au‐\nthenticate configuration requests.  This must correspond to the\ncontrolkey key number the server has been configured to use for this pur‐\npose.  Without any arguments, displays the current keyid.\nkeytype [digest]\nSpecify the digest algorithm to use for authenticating requests, with de‐\nfault MD5.  If ntpq was built with OpenSSL support, and OpenSSL is in‐\nstalled, digest can be any message digest algorithm supported by OpenSSL.\nIf no argument is given, the current keytype digest algorithm used is\ndisplayed.\nntpversion [1|2|3|4]\nSets the NTP version number which ntpq claims in packets.  Defaults to 3,\nand note that mode 6 control messages (and modes, for that matter) didn't\nexist in NTP version 1.  There appear to be no servers left which demand\nversion 1.  With no argument, displays the current NTP version that will\nbe used when communicating with servers.\npasswd          This command prompts you to type in a password (which will not be echoed)\nwhich will be used to authenticate configuration requests.  The password\nmust correspond to the key configured for use by the NTP server for this\npurpose if such requests are to be successful.\npoll [n] [verbose]\nPoll an NTP server in client mode n times.  Poll not implemented yet.\nquit            Exit ntpq.\nraw             Causes all output from query commands is printed as received from the re‐\nmote server.  The only formating/interpretation done on the data is to\ntransform nonascii data into a printable (but barely understandable)\nform.\ntimeout [milliseconds]\nSpecify a timeout period for responses to server queries.  The default is\nabout 5000 milliseconds.  Without any arguments, displays the current\ntimeout period.  Note that since ntpq retries each query once after a\ntimeout, the total waiting time for a timeout will be twice the timeout\nvalue set.\nversion         Display the version of the ntpq program.\n"
                },
                {
                    "name": "Control Message Commands",
                    "content": "Association ids are used to identify system, peer and clock variables.  System variables are\nassigned an association id of zero and system name space, while each association is assigned a\nnonzero association id and peer namespace.  Most control commands send a single message to the\nserver and expect a single response message.  The exceptions are the peers command, which sends\na series of messages, and the mreadlist and mreadvar commands, which iterate over a range of\nassociations.\napeers     Display a list of peers in the form:\n[tally]remote refid assid st t when pool reach delay offset jitter\nwhere the output is just like the peers command except that the refid is dis‐\nplayed in hex format and the association number is also displayed.\nassociations\nDisplay a list of mobilized associations in the form:\nind assid status conf reach auth condition lastevent cnt\n\nVariable    Description\nind         index on this list\nassid       association id\nstatus      peer status word\nconf        yes: persistent, no: ephemeral\nreach       yes: reachable, no: unreachable\nauth        ok, yes, bad and none\ncondition   selection status (see the select field of the peer status\nword)\nlastevent  event report (see the event field of the peer status word)\ncnt         event count (see the count field of the peer status word)\nauthinfo   Display the authentication statistics counters: time since reset, stored keys,\nfree keys, key lookups, keys not found, uncached keys, expired keys, encryp‐\ntions, decryptions.\nclocklist [associd]\ncl [associd]\nDisplay all clock variables in the variable list for those associations sup‐\nporting a reference clock.\nclockvar [associd] [name[=value]][,...]\ncv [associd] [name[=value]][,...]\nDisplay a list of clock variables for those associations supporting a refer‐\nence clock.\n:config configuration command line\nSend the remainder of the command line, including whitespace, to the server as\na run-time configuration command in the same format as a line in the configu‐\nration file.  This command is experimental until further notice and clarifica‐\ntion.  Authentication is of course required.\nconfig-from-file filename\nSend each line of filename to the server as run-time configuration commands in\nthe same format as lines in the configuration file.  This command is experi‐\nmental until further notice and clarification.  Authentication is required.\nifstats    Display status and statistics counters for each local network interface ad‐\ndress: interface number, interface name and address or broadcast, drop, flag,\nttl, mc, received, sent, send failed, peers, uptime.  Authentication is re‐\nquired.\niostats    Display network and reference clock I/O statistics: time since reset, receive\nbuffers, free receive buffers, used receive buffers, low water refills,\ndropped packets, ignored packets, received packets, packets sent, packet send\nfailures, input wakeups, useful input wakeups.\nkerninfo   Display kernel loop and PPS statistics: associd, status, pll offset, pll fre‐\nquency, maximum error, estimated error, kernel status, pll time constant, pre‐\ncision, frequency tolerance, pps frequency, pps stability, pps jitter, cali‐\nbration interval, calibration cycles, jitter exceeded, stability exceeded,\ncalibration errors.  As with other ntpq output, times are in milliseconds;\nvery small values may be shown as exponentials.  The precision value displayed\nis in milliseconds as well, unlike the precision system variable.\nlassociations\nPerform the same function as the associations command, except display mobi‐\nlized and unmobilized associations, including all clients.\nlopeers [-4|-6]\nDisplay a list of all peers and clients showing dstadr (associated with the\ngiven IP version).\nlpassociations\nDisplay the last obtained list of associations, including all clients.\nlpeers [-4|-6]\nDisplay a list of all peers and clients (associated with the given IP ver‐\nsion).\nmonstats   Display monitor facility status, statistics, and limits: enabled, addresses,\npeak addresses, maximum addresses, reclaim above count, reclaim older than,\nkilobytes, maximum kilobytes.\nmreadlist associdlo associdhi\nmrl associdlo associdhi\nPerform the same function as the readlist command for a range of association\nids.\nmreadvar associdlo associdhi [name][,...]\nThis range may be determined from the list displayed by any command showing\nassociations.\nmrv associdlo associdhi [name][,...]\nPerform the same function as the readvar command for a range of association\nids.  This range may be determined from the list displayed by any command\nshowing associations.\nmrulist [limited | kod | mincount=count | laddr=localaddr | sort=[-]sortorder |\nresany=hexmask | resall=hexmask]\nDisplay traffic counts of the most recently seen source addresses collected\nand maintained by the monitor facility.  With the exception of\nsort=[-]sortorder, the options filter the list returned by ntpd(8).  The\nlimited and kod options return only entries representing client addresses from\nwhich the last packet received triggered either discarding or a KoD response.\nThe mincount=count option filters entries representing less than count pack‐\nets.  The laddr=localaddr option filters entries for packets received on any\nlocal address other than localaddr.  resany=hexmask and resall=hexmask filter\nentries containing none or less than all, respectively, of the bits in\nhexmask, which must begin with 0x.  The sortorder defaults to lstint and may\nbe addr, avgint, count, lstint, or any of those preceded by ‘-’ to reverse the\nsort order.  The output columns are:\nColumn     Description\nlstint     Interval in seconds between the receipt of the most recent\npacket from this address and the completion of the retrieval\nof the MRU list by ntpq.\navgint     Average interval in s between packets from this address.\nrstr       Restriction flags associated with this address.  Most are\ncopied unchanged from the matching restrict command, however\n0x400 (kod) and 0x20 (limited) flags are cleared unless the\nlast packet from this address triggered a rate control re‐\nsponse.\nr          Rate control indicator, either a period, L or K for no rate\ncontrol response, rate limiting by discarding, or rate limit‐\ning with a KoD response, respectively.\nm          Packet mode.\nv          Packet version number.\ncount      Packets received from this address.\nrport      Source port of last packet from this address.\nremote address\nhost or DNS name, numeric address, or address followed by\nclaimed DNS name which could not be verified in parentheses.\nopeers [-4 | -6]\nObtain and print the old-style list of all peers and clients showing dstadr\n(associated with the given IP version), rather than the refid.\npassociations\nPerform the same function as the associations command, except that it uses\npreviously stored data rather than making a new query.\npeers      Display a list of peers in the form:\n[tally]remote refid st t when pool reach delay offset jitter\nVariable   Description\n[tally]    single-character code indicating current value of the select\nfield of the peer status word: decode.html#peer\nremote     host name (or IP number) of peer.  The value displayed will\nbe truncated to 15 characters unless the ntpq -w option is\ngiven, in which case the full value will be displayed on the\nfirst line, and if too long, the remaining data will be dis‐\nplayed on the next line.\nrefid      source IP address or 'kiss code: decode.html#kiss\nst         stratum: 0 for local reference clocks, 1 for servers with lo‐\ncal reference clocks, ..., 16 for unsynchronized server\nclocks\nt          u: unicast or manycast client, b: broadcast or multicast\nclient, p: pool source, l: local (reference clock), s: sym‐\nmetric (peer), A: manycast server, B: broadcast server, M:\nmulticast server\nwhen       time in seconds, minutes, hours, or days since the last\npacket was received, or ‘-’ if a packet has never been re‐\nceived\npoll       poll interval (s)\nreach      reach shift register (octal)\ndelay      roundtrip delay\noffset     offset of server relative to this host\njitter     offset RMS error estimate.\npstats associd\nDisplay the statistics for the peer with the given associd: associd, status,\nremote host, local address, time last received, time until next send, reacha‐\nbility change, packets sent, packets received, bad authentication, bogus ori‐\ngin, duplicate, bad dispersion, bad reference time, candidate order.\nreadlist [associd]\nrl [associd]\nDisplay all system or peer variables.  If the associd is omitted, it is as‐\nsumed to be zero.\nreadvar [associd name[=value] [, ...]]\nrv [associd name[=value] [, ...]]\nDisplay the specified system or peer variables.  If associd is zero, the vari‐\nables are from the System Variables name space, otherwise they are from the\nPeer Variables name space.  The associd is required, as the same name can oc‐\ncur in both spaces.  If no name is included, all operative variables in the\nname space are displayed.  In this case only, if the associd is omitted, it is\nassumed to be zero.  Multiple names are specified with comma separators and\nwithout whitespace.  Note that time values are represented in milliseconds and\nfrequency values in parts-per-million (PPM).  Some NTP timestamps are repre‐\nsented in the format YYYYMM DD TTTT, where YYYY is the year, MM the month of\nyear, DD the day of month and TTTT the time of day.\nreslist    Display the access control (restrict) list for ntpq.  Authentication is re‐\nquired.\nsaveconfig filename\nSave the current configuration, including any runtime modifications made by\n:config or config-from-file, to the NTP server host file filename.  This com‐\nmand will be rejected by the server unless saveconfigdir:\nmiscopt.html#saveconfigdir appears in the ntpd(8) configuration file.\nfilename can use date(1) format specifiers to substitute the current date and\ntime, for example,\nsaveconfig ntp-%Y%m%d-%H%M%S.conf.\nThe filename used is stored in system variable savedconfig.  Authentication is\nrequired.\nsysinfo    Display system operational summary: associd, status, system peer, system peer\nmode, leap indicator, stratum, log2 precision, root delay, root dispersion,\nreference id, reference time, system jitter, clock jitter, clock wander,\nbroadcast delay, symm. auth. delay.\nsysstats   Display system uptime and packet counts maintained in the protocol module: up‐\ntime, sysstats reset, packets received, current version, older version, bad\nlength or format, authentication failed, declined, restricted, rate limited,\nKoD responses, processed for time.\ntimerstats\nDisplay interval timer counters: time since reset, timer overruns, calls to\ntransmit.\nwritelist associd\nSet all system or peer variables included in the variable list.\nwritevar associd name=value [, ...]\nSet the specified variables in the variable list.  If the associd is zero, the\nvariables are from the System Variables name space, otherwise they are from\nthe Peer Variables name space.  The associd is required, as the same name can\noccur in both spaces.  Authentication is required.\n"
                },
                {
                    "name": "Status Words and Kiss Codes",
                    "content": "The current state of the operating program is shown in a set of status words maintained by the\nsystem.  Status information is also available on a per-association basis.  These words are dis‐\nplayed by the readlist and associations commands both in hexadecimal and in decoded short tip\nstrings.  The codes, tips and short explanations are documented on the Event Messages and\nStatus Words: decode.html page.  The page also includes a list of system and peer messages, the\ncode for the latest of which is included in the status word.\n\nInformation resulting from protocol machine state transitions is displayed using an informal\nset of ASCII strings called kiss codes: decode.html#kiss. The original purpose was for\nkiss-o'-death (KoD) packets sent by the server to advise the client of an unusual condition.\nThey are now displayed, when appropriate, in the reference identifier field in various bill‐\nboards.\n"
                },
                {
                    "name": "System Variables",
                    "content": "The following system variables appear in the readlist billboard.  Not all variables are dis‐\nplayed in some configurations.\n\nVariable   Description\nstatus     system status word: decode.html#sys\nversion    NTP software version and build time\nprocessor  hardware platform and version\nsystem     operating system and version\nleap       leap warning indicator (0-3)\nstratum    stratum (1-15)\nprecision  precision (log2 s)\nrootdelay  total roundtrip delay to the primary reference clock\nrootdisp   total dispersion to the primary reference clock\nrefid      reference id or kiss code: decode.html#kiss\nreftime    reference time\nclock      date and time of day\npeer       system peer association id\ntc         time constant and poll exponent (log2 s) (3-17)\nmintc      minimum time constant (log2 s) (3-10)\noffset     combined offset of server relative to this host\nfrequency  frequency drift (PPM) relative to hardware clock\nsysjitter\ncombined system jitter\nclkwander\nclock frequency wander (PPM)\nclkjitter\nclock jitter\ntai        TAI-UTC offset (s)\nleapsec    NTP seconds when the next leap second is/was inserted\nexpire     NTP seconds when the NIST leapseconds file expires\nThe jitter and wander statistics are exponentially-weighted RMS averages.  The system jitter is\ndefined in the NTPv4 specification; the clock jitter statistic is computed by the clock disci‐\npline module.\n\nWhen the NTPv4 daemon is compiled with the OpenSSL software library, additional system vari‐\nables are displayed, including some or all of the following, depending on the particular Au‐\ntokey dance:\nVariable   Description\nhost       Autokey host name for this host\nident      Autokey group name for this host\nflags      host flags  (see Autokey specification)\ndigest     OpenSSL message digest algorithm\nsignature  OpenSSL digest/signature scheme\nupdate     NTP seconds at last signature update\ncert       certificate subject, issuer and certificate flags\nuntil      NTP seconds when the certificate expires\n"
                },
                {
                    "name": "Peer Variables",
                    "content": "The following peer variables appear in the readlist billboard for each association.  Not all\nvariables are displayed in some configurations.\n\nVariable   Description\nassocid    association id\nstatus     peer status word: decode.html#peer\nsrcadr     source (remote) IP address\nsrcport    source (remote) port\ndstadr     destination (local) IP address\ndstport    destination (local) port\nleap       leap indicator (0-3)\nstratum    stratum (0-15)\nprecision  precision (log2 s)\nrootdelay  total roundtrip delay to the primary reference clock\nrootdisp   total root dispersion to the primary reference clock\nrefid      reference id or kiss code: decode.html#kiss\nreftime    reference time\nrec        last packet received time\nreach      reach register (octal)\nunreach    unreach counter\nhmode      host mode (1-6)\npmode      peer mode (1-5)\nhpoll      host poll exponent (log2 s) (3-17)\nppoll      peer poll exponent (log2 s) (3-17)\nheadway    headway (see Rate Management and the Kiss-o'-Death Packet: rate.html)\nflash      flash status word: decode.html#flash\nkeyid      symmetric key id\noffset     filter offset\ndelay      filter delay\ndispersion\nfilter dispersion\njitter     filter jitter\nbias       unicast/broadcast bias\nxleave     interleave delay (see NTP Interleaved Modes: xleave.html)\nThe bias variable is calculated when the first broadcast packet is received after the calibra‐\ntion volley.  It represents the offset of the broadcast subgraph relative to the unicast sub‐\ngraph.  The xleave variable appears only for the interleaved symmetric and interleaved modes.\nIt represents the internal queuing, buffering and transmission delays for the preceding packet.\n\nWhen the NTPv4 daemon is compiled with the OpenSSL software library, additional peer variables\nare displayed, including the following:\nVariable   Description\nflags      peer flags (see Autokey specification)\nhost       Autokey server name\nflags      peer flags (see Autokey specification)\nsignature  OpenSSL digest/signature scheme\ninitsequence\ninitial key id\ninitkey    initial key index\ntimestamp  Autokey signature timestamp\nident      Autokey group name for this association\n"
                },
                {
                    "name": "Clock Variables",
                    "content": "The following clock variables appear in the clocklist billboard for each association with a\nreference clock.  Not all variables are displayed in some configurations.\nVariable   Description\nassocid    association id\nstatus     clock status word: decode.html#clock\ndevice     device description\ntimecode   ASCII time code string (specific to device)\npoll       poll messages sent\nnoreply    no reply\nbadformat  bad format\nbaddata    bad date or time\nfudgetime1\nfudge time 1\nfudgetime2\nfudge time 2\nstratum    driver stratum\nrefid      driver reference id\nflags      driver flags\n"
                }
            ]
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-4 --ipv4",
                    "content": "Force IPv4 name resolution.  This option must not appear in combination with any of the\nfollowing options: ipv6.\n\nForce resolution of following host names on the command line to the IPv4 namespace.\n",
                    "flag": "-4",
                    "long": "--ipv4"
                },
                {
                    "name": "-6 --ipv6",
                    "content": "Force IPv6 name resolution.  This option must not appear in combination with any of the\nfollowing options: ipv4.\n\nForce resolution of following host names on the command line to the IPv6 namespace.\n",
                    "flag": "-6",
                    "long": "--ipv6"
                },
                {
                    "name": "-c --command",
                    "content": "run a command and exit.  This option may appear an unlimited number of times.\n\nThe following argument is interpreted as an interactive format command and is added to\nthe list of commands to be executed on the specified host(s).\n",
                    "flag": "-c",
                    "long": "--command"
                },
                {
                    "name": "-d --debug-level",
                    "content": "Increase debug verbosity level.  This option may appear an unlimited number of times.\n\n",
                    "flag": "-d",
                    "long": "--debug-level"
                },
                {
                    "name": "-D --set-debug-level",
                    "content": "Set the debug verbosity level.  This option may appear an unlimited number of times.\nThis option takes an integer number as its argument.\n\n",
                    "flag": "-D",
                    "long": "--set-debug-level"
                },
                {
                    "name": "-i --interactive",
                    "content": "Force ntpq to operate in interactive mode.  This option must not appear in combination\nwith any of the following options: command, peers.\n\nForce ntpq to operate in interactive mode.  Prompts will be written to the standard\noutput and commands read from the standard input.\n",
                    "flag": "-i",
                    "long": "--interactive"
                },
                {
                    "name": "-n --numeric",
                    "content": "numeric host addresses.\n\nOutput all host addresses in dotted-quad numeric format rather than converting to the\ncanonical host names.\n",
                    "flag": "-n",
                    "long": "--numeric"
                },
                {
                    "name": "--old-rv",
                    "content": "Always output status line with readvar.\n\nBy default, ntpq now suppresses the associd=...  line that precedes the output of read‐‐\nvar (alias rv) when a single variable is requested, such as ntpq -c \"rv 0 offset\".\nThis option causes ntpq to include both lines of output for a single-variable readvar.\nUsing an environment variable to preset this option in a script will enable both older\nand newer ntpq to behave identically in this regard.\n",
                    "long": "--old-rv"
                },
                {
                    "name": "-p --peers",
                    "content": "Print a list of the peers.  This option must not appear in combination with any of the\nfollowing options: interactive.\n\nPrint a list of the peers known to the server as well as a summary of their state. This\nis equivalent to the 'peers' interactive command.\n",
                    "flag": "-p",
                    "long": "--peers"
                },
                {
                    "name": "-r --refid",
                    "content": "Set default display type for S2+ refids.  This option takes a keyword as its argument.\nThe argument sets an enumeration value that can be tested by comparing them against the\noption value macro.  The available keywords are:\nhash ipv4\nor their numeric equivalent.\n\nThe default keyword for this option is:\nipv4\n\nSet the default display format for S2+ refids.\n",
                    "flag": "-r",
                    "long": "--refid"
                },
                {
                    "name": "-w --wide",
                    "content": "Display the full 'remote' value.\n\nDisplay the full value of the 'remote' value.  If this requires more than 15 charac‐\nters, display the full value, emit a newline, and continue the data display properly\nindented on the next line.\n\n-?, --help\nDisplay usage information and exit.\n\n-!, --more-help\nPass the extended usage information through a pager.\n\n-> [cfgfile], --save-opts [=cfgfile]\nSave the option state to cfgfile.  The default is the last configuration file listed in\nthe OPTION PRESETS section, below.  The command will exit after updating the config\nfile.\n\n-< cfgfile, --load-opts=cfgfile, --no-load-opts\nLoad options from cfgfile.  The no-load-opts form will disable the loading of earlier\nconfig/rc/ini files.  --no-load-opts is handled early, out of order.\n\n--version [{v|c|n}]\nOutput version of program and exit.  The default mode is `v', a simple version.  The\n`c' mode will print copyright information and `n' will print the full copyright notice.\n",
                    "flag": "-w",
                    "long": "--wide"
                }
            ]
        },
        "OPTION PRESETS": {
            "content": "Any option that is not marked as not presettable may be preset by loading values from configu‐\nration (\"RC\" or \".INI\") file(s) and values from environment variables named:\nNTPQ<option-name> or NTPQ\nThe environmental presets take precedence (are processed later than) the  configuration  files.\nThe  homerc  files are \"$HOME\", and \".\".  If any of these are directories, then the file .ntprc\nis searched for within those directories.\n",
            "subsections": []
        },
        "ENVIRONMENT": {
            "content": "See OPTION PRESETS for configuration environment variables.\n",
            "subsections": []
        },
        "FILES": {
            "content": "See OPTION PRESETS for configuration files.\n",
            "subsections": []
        },
        "EXIT STATUS": {
            "content": "One of the following exit values will be returned:\n\n0  (EXITSUCCESS)\nSuccessful program execution.\n\n1  (EXITFAILURE)\nThe operation failed or the command syntax was not valid.\n\n66  (EXNOINPUT)\nA specified configuration file could not be loaded.\n\n70  (EXSOFTWARE)\nlibopts had an internal operational error.  Please report it to auto‐\ngen-users@lists.sourceforge.net.  Thank you.\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "The University of Delaware and Network Time Foundation\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights re‐\nserved.  This program is released under the terms of the NTP license, <http://ntp.org/license>.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org\n",
            "subsections": []
        },
        "NOTES": {
            "content": "This manual page was AutoGen-erated from the ntpq option definitions.\n\nBSD                              June 23 2020                              BSD",
            "subsections": []
        }
    },
    "summary": "ntpq — standard NTP query program",
    "flags": [
        {
            "flag": "-4",
            "long": "--ipv4",
            "arg": null,
            "description": "Force IPv4 name resolution. This option must not appear in combination with any of the following options: ipv6. Force resolution of following host names on the command line to the IPv4 namespace."
        },
        {
            "flag": "-6",
            "long": "--ipv6",
            "arg": null,
            "description": "Force IPv6 name resolution. This option must not appear in combination with any of the following options: ipv4. Force resolution of following host names on the command line to the IPv6 namespace."
        },
        {
            "flag": "-c",
            "long": "--command",
            "arg": null,
            "description": "run a command and exit. This option may appear an unlimited number of times. 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)."
        },
        {
            "flag": "-d",
            "long": "--debug-level",
            "arg": null,
            "description": "Increase debug verbosity level. This option may appear an unlimited number of times."
        },
        {
            "flag": "-D",
            "long": "--set-debug-level",
            "arg": null,
            "description": "Set the debug verbosity level. This option may appear an unlimited number of times. This option takes an integer number as its argument."
        },
        {
            "flag": "-i",
            "long": "--interactive",
            "arg": null,
            "description": "Force ntpq to operate in interactive mode. This option must not appear in combination with any of the following options: command, peers. Force ntpq to operate in interactive mode. Prompts will be written to the standard output and commands read from the standard input."
        },
        {
            "flag": "-n",
            "long": "--numeric",
            "arg": null,
            "description": "numeric host addresses. Output all host addresses in dotted-quad numeric format rather than converting to the canonical host names."
        },
        {
            "flag": "",
            "long": "--old-rv",
            "arg": null,
            "description": "Always output status line with readvar. By default, ntpq now suppresses the associd=... line that precedes the output of read‐‐ var (alias rv) when a single variable is requested, such as ntpq -c \"rv 0 offset\". This option causes ntpq to include both lines of output for a single-variable readvar. Using an environment variable to preset this option in a script will enable both older and newer ntpq to behave identically in this regard."
        },
        {
            "flag": "-p",
            "long": "--peers",
            "arg": null,
            "description": "Print a list of the peers. This option must not appear in combination with any of the following options: interactive. 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."
        },
        {
            "flag": "-r",
            "long": "--refid",
            "arg": null,
            "description": "Set default display type for S2+ refids. This option takes a keyword as its argument. The argument sets an enumeration value that can be tested by comparing them against the option value macro. The available keywords are: hash ipv4 or their numeric equivalent. The default keyword for this option is: ipv4 Set the default display format for S2+ refids."
        },
        {
            "flag": "-w",
            "long": "--wide",
            "arg": null,
            "description": "Display the full 'remote' value. Display the full value of the 'remote' value. If this requires more than 15 charac‐ ters, display the full value, emit a newline, and continue the data display properly indented on the next line. -?, --help Display usage information and exit. -!, --more-help Pass the extended usage information through a pager. -> [cfgfile], --save-opts [=cfgfile] Save the option state to cfgfile. The default is the last configuration file listed in the OPTION PRESETS section, below. The command will exit after updating the config file. -< cfgfile, --load-opts=cfgfile, --no-load-opts Load options from cfgfile. The no-load-opts form will disable the loading of earlier config/rc/ini files. --no-load-opts is handled early, out of order. --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."
        }
    ],
    "examples": [],
    "see_also": [],
    "tldr": {
        "source": "official",
        "description": "Query the Network Time Protocol (NTP) daemon.",
        "examples": [
            {
                "description": "Start `ntpq` in interactive mode",
                "command": "ntpq"
            },
            {
                "description": "Print a list of NTP peers",
                "command": "ntpq {{-p|--peers}}"
            },
            {
                "description": "Print a list of NTP peers without resolving hostnames from IP addresses",
                "command": "ntpq {{-n|--numeric}} {{-p|--peers}}"
            },
            {
                "description": "Use `ntpq` in debugging mode",
                "command": "ntpq {{-d|--debug-level}}"
            },
            {
                "description": "Print NTP system variables values",
                "command": "ntpq {{-c|--command}} {{rv}}"
            }
        ]
    }
}