]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Documentation updates for 4.2.7p22 changes and additions, updating
authorDave Hart <hart@ntp.org>
Sun, 11 Apr 2010 23:13:44 +0000 (23:13 +0000)
committerDave Hart <hart@ntp.org>
Sun, 11 Apr 2010 23:13:44 +0000 (23:13 +0000)
  ntpdc.html, ntpq.html, accopt.html, confopt.html, manyopt.html,
  miscopt.html, and miscopt.txt.
Modify full MRU list preemption when full to match "discard monitor"
  documentation, by removing exception for count == 1.

bk: 4bc257a8rNUmzaSA90ISm8cUxJ5Qmg

ChangeLog
html/accopt.html
html/confopt.html
html/manyopt.html
html/miscopt.html
html/ntpdc.html
html/ntpq.html
html/scripts/miscopt.txt
ntpd/ntp_monitor.c

index a391f0a28bcb5954daa4e6b81dde342f2538bedc..4afcf1e80d580eb66050d9832cc02e16ad5e78f9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+* Documentation updates for 4.2.7p22 changes and additions, updating
+  ntpdc.html, ntpq.html, accopt.html, confopt.html, manyopt.html,
+  miscopt.html, and miscopt.txt.
+* Modify full MRU list preemption when full to match "discard monitor"
+  documentation, by removing exception for count == 1.
 (4.2.7p23) 2010/04/04 Released by Harlan Stenn <stenn@ntp.org>
 * [Bug 1516] unpeer by IP address fails, DNS name works.
 * [Bug 1517] ntpq and ntpdc should verify reverse DNS before use.
index f1f8cb37b3e50b25802a63fbdb5b80b9693cffd3..3497d01182df1550c2dae2bed023e17a04ceb5be 100644 (file)
@@ -24,7 +24,7 @@
 
 <p>The skunk watches for intruders and sprays.</p>
 <p>Last update: 
-<!-- #BeginDate format:En2m -->30-Sep-2009  17:16<!-- #EndDate -->
+<!-- #BeginDate format:En2m -->11-Apr-2010  22:57<!-- #EndDate -->
                UTC</p>
 <br clear="left">
 
@@ -72,7 +72,7 @@ restrict time.nist.gov                                                # allow access
 <dt id="discard"><tt>discard [ average <i>avg</i> ][ minimum <i>min</i> ] [ monitor <i>prob</i> ]</tt></dt>
 <dd>Set the parameters of the rate control facility which protects the server
        from client abuse. If the <tt>limited</tt> flag is present in the ACL, packets
-       that violate these limits are discarded. If in addition the <tt>kod</tt> restriction
+       that violate these limits are discarded. If, in addition, the <tt>kod</tt> flag
        is present, a kiss-o'-death packet is returned.</dd>
 
 <dd><dl>
@@ -86,21 +86,27 @@ time) in log<sub>2</sub> s with default 3.</dd>
        with default 1.</dd>
 
 <dt><tt>monitor</tt></dt>
-<dd>Specify the probability of discard for packets that overflow the rate-control
-       window. This is a performance optimization for servers with aggregate arrivals
+<dd>Specify the probability of being recorded for packets that overflow the MRU list
+       size limit set by <tt>mru maxmem</tt> or <tt>mru maxdepth</tt>. This is a
+       performance optimization for servers with aggregate arrivals
        of 1000 packets per second or more.</dd>
 
 </dl></dd>
                        
-<dt id="restrict"><tt>restrict <i>address</i> [mask <i>mask</i>] [<i>flag</i>][...]</tt></dt>
+<dt id="restrict"><tt>restrict default [<i>flag</i>][...]<br>
+        restrict source [<i>flag</i>][...]<br>
+        restrict <i>address</i> [mask <i>mask</i>] [<i>flag</i>][...]</tt></dt>
 <dd>The <tt><i>address</i></tt> argument expressed in dotted-quad form is the
        address of a host or network. Alternatively, the <tt><i>address</i></tt> argument
        can be a valid host DNS name. The <tt><i>mask</i></tt> argument expressed in
-       dotted-quad form defaults to 255.255.255.255, meaning that the <tt><i>address</i></tt> is
-       treated as the address of an individual host. A default entry (address 0.0.0.0,
-       mask 0.0.0.0) is always included and is always the first entry in the list.
-       Note that the text string <tt>default</tt>, with no mask option, may be used
-       to indicate the default entry.</dd>
+       IPv4 or IPv6 numeric address form defaults to all mask bits on, meaning that the
+       <tt><i>address</i></tt> is treated as the address of an individual host. A 
+       default entry (address 0.0.0.0, mask 0.0.0.0 for IPv4 and address :: mask
+       :: for IPv6) is always the first entry in the list.
+       <tt>restrict default</tt>, with no mask option, modifies both IPv4 and IPv6
+       default entries. <tt>restrict source</tt> configures a template restriction
+       automatically added at runtime for each association, whether configured,
+       ephemeral, or preemptible, and removed when the association is demobilized.</dd>
 
 <dd>Some flags have the effect to deny service, some  have the effect to
        enable service and some are  conditioned by other flags. The  flags. are
@@ -124,9 +130,10 @@ time) in log<sub>2</sub> s with default 3.</dd>
 <dd>Send a kiss-o'-death (KoD) packet if the <tt>limited</tt> flag is present
        and a packet violates the rate limits established by the <tt>discard</tt> command.
        KoD packets are themselves rate limited for each source address separately.
-       If this flag is not present, packets that violate the rate limits are discarded.</dd>
+       If the <tt>kod</tt> flag is used in a restriction which does not have the <tt>limited</tt>
+       flag, no KoD responses will result.</dd>
 
-<dt><tt>limited</tt></dt>
+<dt id="limited"><tt>limited</tt></dt>
 <dd>Deny time service if the packet violates the rate limits established by the <tt>discard</tt> command.
        This does not apply to <tt>ntpq</tt> and <tt>ntpdc</tt> queries.</dd>
 
index 05847c2ee59bfb686ee88182f963b15b13fd8680..f64b03b39731eed23bb16c75e38dcb64b9a5b8bd 100644 (file)
@@ -12,7 +12,7 @@
 Walt Kelly</a>
 <p>The chicken is getting configuration advice.</p>
 <p>Last update:
-       <!-- #BeginDate format:En2m -->25-Nov-2009  4:46<!-- #EndDate -->
+       <!-- #BeginDate format:En2m -->11-Apr-2010  23:07<!-- #EndDate -->
 </p>
 <br clear="left">
 <h4>Related Links</h4>
@@ -78,11 +78,12 @@ Walt Kelly</a>
                                the address must match the address specified on the <tt>manycastserver</tt> command
                                of one or more designated manycast servers.</dd>
                        <dt><tt>pool</tt></dt>
-                       <dd>For type s messages (only) this command mobilizes a client mode association
-                               for servers implementing the pool automatic server discovery scheme described
-                               on the <a href="assoc.html">Association Management</a> page. The address
-                               is a DNS name in the form <tt><i>area</i>.pool.ntp.org</tt>, where <tt><i>area</i></tt> is
-                               a qualifier designating the server geographic area such as <tt>us</tt> or <tt>europe</tt>.</dd>
+                       <dd>For type s addresses (only) this command mobilizes a pool client mode association
+                               for the DNS name specified. The DNS name must resolve to one or more IPv4 or
+                               IPv6 addresses. The pool automatic server discovery scheme is described on the
+                               <a href="manyopt.html#pool">Automatic Server Discovery</a> page.
+                               <a href="http://www.pool.ntp.org/">www.pool.ntp.org</a> describes a compatible pool
+                               of public NTP servers.</dd>
                        <dt><tt>unpeer</tt></dt>
                        <dd>This command removes a previously configured association. An address or association ID can
                                be used to identify the association.  Either an IP address or DNS name can be used.  This
index a236f4fca9c8007dc05e2d35a107a8f9c27a5934..c747661c3a2c87b3fddbac2da720ccd61fcb18ee 100644 (file)
@@ -14,7 +14,7 @@
                <img src="pic/alice51.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
                <p>Make sure who your friends are.</p>
                <p>Last update: 
-                       <!-- #BeginDate format:En2 -->25-Nov-2009<!-- #EndDate -->
+                       <!-- #BeginDate format:En2 -->11-Apr-2010  23:09<!-- #EndDate -->
                UTC</p>
 <br clear="left">
                <h4>Related Links</h4>
                <h4 id="mcst">Manycast Scheme</h4>
                <p>Manycast is a automatic server discovery and configuration paradigm new to NTPv4. It is intended as a means for a client to troll the nearby network neighborhood to find cooperating servers, validate them using cryptographic means and evaluate their time values with respect to other servers that might be lurking in the vicinity. It uses the grab-n'-drop paradigm with the additional feature that active means are used to grab additional servers should the number of survivors fall below the <tt>minclock</tt> option of the <tt>tos</tt> command.</p>
                <p>The manycast paradigm is not the anycast paradigm described in RFC-1546, which is designed to find a single server from a clique of servers providing the same service. The manycast paradigm is designed to find a plurality of redundant servers satisfying defined optimality criteria.</p>
-               <p>A manycast clients is configured using the <tt>manycastclient</tt> configuration command, which is similar to the <tt>server</tt> configuration command. It sends ordinary client mode messages, but with a broadcast address rather than a unicast address and sends only if less than <tt>minclock</tt> associateons remain and then only at the minimum feasible rate and minimum feasible time-to-live (TTL) hops. The polling strategy is designed to reduce as much as possible the volume of broadcast messages and the effects of implosion due to near-simultaneous arrival of manycast server messages. There can be as many manycast client associations as different addresses, each one serving as a template for a future unicast client/server association.</p>
+               <p>A manycast clients is configured using the <tt>manycastclient</tt> configuration command, which is similar to the <tt>server</tt> configuration command. It sends ordinary client mode messages, but with a broadcast address rather than a unicast address and sends only if less than <tt>minclock</tt> associations remain and then only at the minimum feasible rate and minimum feasible time-to-live (TTL) hops. The polling strategy is designed to reduce as much as possible the volume of broadcast messages and the effects of implosion due to near-simultaneous arrival of manycast server messages. There can be as many manycast client associations as different addresses, each one serving as a template for future unicast client/server associations.</p>
                <p>A manycast server is configured using the <tt>manycastserver</tt> command, which listens on the specified broadcast address for manycast client messages. If a manycast server is in scope of the current TTL and is itself synchronized to a valid source and operating at a stratum level equal to or lower than the manycast client, it replies with an ordinary unicast server message.</p>
                <p>The manycast client receiving this message mobilizes a preemptable client association according to the matching manycast client template, but only if cryptographically authenticated and the server stratum is less than or equal to the client stratum. </p>
                <p>It is possible and frequently useful to configure a host as both manycast client and manycast server. A number of hosts configured this way and sharing a common multicast group address will automatically organize themselves in an optimum configuration based on stratum and synchronization distance.</p>
                <p>The use of cryptograpic authentication is always a good idea in any server descovery scheme. Both symmetric key and public key cryptography can be used in the same scenarios as described above for the broadast/multicast scheme.</p>
                <h4 id="pool">Server Pool Scheme</h4>
-               <p>The idea of targeting servers on a random basis to distribute and balance the load is not a new one; however, the NTP pool scheme puts this on steroids. At present, several hundred operators around the globe have volunteered their servers for public access. In general, NTP&nbsp;is a lightweight service and servers used for other purposes don't mind an additional small load. The trick is to randomize over the population and minimize the load on any one server while retaining the advantages of multiple servers using the NTP&nbsp;mitigation algorithms.</p>
+               <p>The idea of targeting servers on a random basis to distribute and balance the load is not a new one; however, the NTP pool scheme puts this on steroids. At present, several thousand operators around the globe have volunteered their servers for public access. In general, NTP&nbsp;is a lightweight service and servers used for other purposes don't mind an additional small load. The trick is to randomize over the population and minimize the load on any one server while retaining the advantages of multiple servers using the NTP&nbsp;mitigation algorithms.</p>
                <p>To support this service the DNS&nbsp;for some volunteer servers as been
                        modified to collect a number of other volunteer&nbsp;servers and return a
                        randomized list in response to a DNS query. The client receiving this list
-                       mobilizes some or all of them just as in the other discovery schemes and casts
-                       off the excess.</p>
-               <p>The pool scheme is configured using one or <tt>pool</tt> commands with the DNS name <tt><i>region</i>.pool.ntp.org</tt>, where <tt><i>region</i></tt> is a region of the world, country of the region or state of the country or even the whole world if absent. The <tt>pool</tt> command can be used more than once; duplicate servers are detected and discarded. In principle, it is possible to use a configuration file containing a single line <tt>pool pool.ntp.org</tt>.</p>
+                       mobilizes some or all of them, similar to the manycast discovery scheme, and casts
+                       off the excess.  Unlike <tt>manycastclient</tt>, cryptographic authentication is
+                       not required. The pool scheme solicits a single server at a time, compared to
+                       <tt>manycastclient</tt> which solicits all servers with a multicast TTL limit
+                       simultaneously. Otherwise, the pool server discovery scheme operates as manycast
+                       does.</p>
+               <p>The pool scheme is configured using one or <tt>pool</tt> commands with DNS names
+                       indicating the pool from which to draw. The <tt>pool</tt> command can be used more
+                       than once; duplicate servers are detected and discarded. In principle, it is
+                       possible to use a configuration file containing a single line <tt>pool
+                       pool.ntp.org</tt>. The <a href="http://www.pool.ntp.org/en/use.html">NTP Pool
+                       Project</a> offers instructions on using the pool with the <tt>server</tt>
+                       command, which is suboptimal but works with older versions of <tt>ntpd</tt>
+                       predating the <tt>pool</tt> command. With recent ntpd, consider replacing the
+                       multiple <tt>server</tt> commands in their example with a single <tt>pool</tt>
+                       command.</p>
                <hr>
                <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
        </body>
 
-</html>
\ No newline at end of file
+</html>
index 800a4f21fc8142bf25221cfef7ebe9fde2329011..6cfd0ca604d63605e2e78398f70b248d29a5ab5e 100644 (file)
@@ -13,7 +13,7 @@
                <img src="pic/boom3.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
                <p>We have three, now looking for more.</p>
                <p>Last update:
-                       <!-- #BeginDate format:En2m -->13-Nov-2009  19:08<!-- #EndDate --> 
+                       <!-- #BeginDate format:En2m -->11-Apr-2010  22:56<!-- #EndDate --> 
                        UTC</p>
                <br clear="left">
        <h4>Related Links</h4>
@@ -27,9 +27,9 @@
                        <dd>This command specifies the complete path and name of the file used to record the frequency of the local clock oscillator. This is the same operation as the <tt>-f</tt> command linke option. If the file exists, it is read at startup in order to set the initial frequency and then updated once per hour or more with the current frequency computed by the daemon. If the file name is specified, but the file itself does not exist, the starts with an initial frequency of zero and creates the file when writing it for the first time. If this command is not given, the daemon will always start with an initial frequency of zero.</dd>
                                <dd>The file format consists of a single line containing a single floating point number, which records the frequency offset measured in parts-per-million (PPM). The file is updated by first writing the current drift value into a temporary file and then renaming this file to replace the old version. This implies that <tt>ntpd</tt> must have write permission for the directory the drift file is located in, and that file system links, symbolic or otherwise, should be avoided.</dd>
                                <dd>The parameter <tt>tolerance</tt> is the wander threshold to skip writing the new value. If the value of wander computed from recent frequency changes is greater than this threshold the file will be updated once per hour. If below the threshold, the file will not be written.</dd>
-                       <dt id="enable"><tt>enable [ auth | bclient | calibrate | kernel | monitor | ntp | pps | stats]</tt><br>
-                       <tt>disable [ auth | bclient | calibrate | kernel | monitor | ntp | pps | stats ]</tt></dt>
-                       <dd>Provides a way to enable or disable various system options. Flags not mentioned are unaffected. Note that all of these flags can be controlled remotely using the <a href="ntpdc.html"><tt>ntpdc</tt></a> utility program.
+                       <dt id="enable"><tt>enable [auth | bclient | calibrate | kernel | monitor | ntp | pps | stats]</tt><br>
+                       <tt>disable [auth | bclient | calibrate | kernel | monitor | ntp | pps | stats]</tt></dt>
+                       <dd>Provides a way to enable or disable various system options. Flags not mentioned are unaffected. Note that all of these flags can be controlled remotely using <a href="ntpq.html"><tt>ntpq</tt></a> and <a href="ntpdc.html"><tt>ntpdc</tt></a> utility programs.
                                <dl>
                                        <dt><tt>auth</tt></dt>
                                        <dd>Enables the server to synchronize with unconfigured peers only if the peer has been correctly authenticated using either public key or private key cryptography. The default for this flag is enable.</dd>
                                        <dt><tt>kernel</tt></dt>
                                        <dd>Enables the kernel time discipline, if available. The default for this flag is enable if support is available, otherwise disable.</dd>
                                        <dt><tt>monitor</tt></dt>
-                                       <dd>Enables the monitoring facility. See the <tt>ntpdc</tt> program and the <tt>monlist</tt> command or further information. The default for this flag is enable.</dd>
+                                       <dd>Enables the monitoring facility. See the <a href="ntpq.html"><tt>ntpq</tt> program</a> and the <tt>monstats</tt> and
+                                               <tt>mrulist</tt> commands, as well as the <a href="accopt.html#discard">Access Control Options</a> for details.
+                                               The monitoring facility is also enabled by the presence of <a href="accopt.html#limited"><tt>limited</tt></a>
+                                               in any <tt>restrict</tt> commands. The default for this flag is enable.</dd>
                                        <dt><tt>ntp</tt></dt>
                                        <dd>Enables time and frequency discipline. In effect, this switch opens and closes the feedback loop, which is useful for testing. The default for this flag is enable.</dd>
                                        <dt><tt>stats</tt></dt>
                                <dd>Thus, a minimal log configuration could look like this:</dd>
                                <dd><tt>logconfig=syncstatus +sysevents</tt></dd>
                                                <dd>This would just list the synchronizations state of <tt>ntpd</tt> and the major system events. For a simple reference server, the following minimum message configuration could be useful:</dd>
-                               <dd><tt>logconfig allsync +allclock</tt></dd>
+                               <dd><tt>logconfig=syncall +clockall</tt></dd>
                                <dd>This configuration will list all clock information and synchronization information. All other events and messages about peers, system events and so on is suppressed.</dd>
                        <dt id="logfile"><tt>logfile <i>logfile</i></tt></dt>
                        <dd>This command specifies the location of an alternate log file to be used instead of the default system <tt>syslog</tt> facility. This is the same operation as the <tt>-l </tt>command line option.</dd>
+                       <dt id="mru"><tt>mru [maxdepth <i>count</i> | maxmem <i>kilobytes</i>  | mindepth <i>count</i> | maxage <i>seconds</i> | initalloc <i>count</i> | initmem <i>kilobytes</i> | incalloc <i>count</i> | incmem <i>kilobytes</i>]</tt></dt>
+                       <dd>Controls size limits of the monitoring facility Most Recently Used <a href="ntpq.html#mrulist">(MRU) list</a> of client addresses, which is also used by the <a href="accopt.html#discard">rate control facility</a>.
+                               <dl>
+                                       <dt><tt>maxdepth <i>count</i><br>
+                                       maxmem <i>kilobytes</i></tt></dt>
+                                       <dd>Equivalent upper limits on the size of the MRU list, in terms of entries or kilobytes. The actual
+                                               limit will be up to <tt>incalloc</tt> entries or <tt>incmem</tt> kilobytes larger. As with all
+                                               of the <tt>mru</tt> options offered in units of entries or kilobytes, if both <tt>maxdepth</tt>
+                                               and <tt>maxmem</tt> are used, the last one used controls. The default is 1024 kilobytes.</dd>
+                                       <dt><tt>mindepth <i>count</i></tt></dt>
+                                       <dd>Lower limit on the MRU list size. When the MRU list has fewer than <tt>mindepth</tt> entries,
+                                               existing entries are never removed to make room for newer ones, regardless of their age.
+                                               The default is 600 entries.</dd>
+                                       <dt><tt>maxage <i>seconds</i></tt></dt>
+                                       <dd>Once the MRU list has <tt>mindepth</tt> entries and an additional client address is to be added
+                                               to the list, if the oldest entry was updated more than <tt>maxage</tt> seconds ago, that entry
+                                               is removed and its storage reused. If the oldest entry was updated more recently, the MRU list
+                                               is grown, subject to <tt>maxdepth</tt>/<tt>maxmem</tt>. The default is 64 seconds.</dd>
+                                       <dt><tt>initalloc <i>count</i><br>
+                                       initmem <i>kilobytes</i></tt></dt>
+                                       <dd>Initial memory allocation at the time the monitoring facility is first enabled, in terms of
+                                               entries or kilobytes.  The default is 4 kilobytes.</dd>
+                                       <dt><tt>incalloc <i>count</i><br>
+                                       incmem <i>kilobytes</i></tt></dt>
+                                       <dd>Size of additional memory allocations when growing the MRU list, in entries or kilobytes.
+                                               The default is 4 kilobytes.</dd>
+                               </dl>
+                               </dd>
                        <dt id="phone"><tt>phone <i>dial</i>1 <i>dial</i>2 ...</tt></dt>
                        <dd>This command is used in conjunction with the ACTS modem driver (type 18). The arguments consist of a maximum of 10 telephone numbers used to dial USNO, NIST or European time services. The Hayes command ATDT&nbsp;is normally prepended to the number, which can contain other modem control codes as well.</dd>
                        <dt id="saveconfigdir"><tt>saveconfigdir <i>directory_path</i></tt></dt>
index e56d341f072e7c2f8066d1a51f75c48c6ba92808..cdb503ff5a877d44de63b17f2b03cbaeae0de7f0 100644 (file)
@@ -13,7 +13,7 @@
                <h3><tt>ntpdc</tt> - special NTP query program</h3>
                <img src="pic/alice31.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
                <p>This program is a big puppy.</p>
-               <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="61">01:11</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="308">Saturday, November 24, 2007</csobj></p>
+               <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="61">20:17</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="308">Sunday, April 11, 2010</csobj></p>
                <br clear="left">
                <h4>More Help</h4>
                <script type="text/javascript" language="javascript" src="scripts/manual.txt"></script>
                        <dt><tt>ifreload</tt>
                        <dd>Force rescan of current system interfaces. Outputs interface statistics for interfaces that could possibly change. Marks unchanged interfaces with <b>.</b>, added interfaces with <b>+</b> and deleted interfaces with <b>-</b>.</dd>
                        <dt><tt>monlist [ <i>version</i> ]</tt>
-                       <dd>Obtain and print traffic counts collected and maintained by the monitor facility. The version number should not normally need to be specified.
+                       <dd>Obtain and print traffic counts collected and maintained by the monitor facility. The version number should not normally need to be specified. At most, 600 entries are displayed by <tt>monlist</tt>. To display the entire MRU list, use the <tt>ntpq</tt> program's <tt><a href="ntpq.html#mrulist">mrulist<a/></tt> command.</dd>
                        <dt><tt>clkbug <i>clock_peer_address</i> [...]</tt>
                        <dd>Obtain debugging information for a reference clock driver. This information is provided only by some clock drivers and is mostly undecodable without a copy of the driver source in hand.
                </dl>
index 38018d015e0925e8205cd88a8fdd827d8f3f895f..0c6ea58f1a8099e26ae705cc4cb9065e01cba206 100644 (file)
@@ -14,7 +14,7 @@
                <img src="pic/bustardfly.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
                <p>A typical NTP monitoring packet</p>
                <p>Last update:
-                       <!-- #BeginDate format:En2m -->05-Feb-2010  17:13<!-- #EndDate -->
+                       <!-- #BeginDate format:En2m -->11-Apr-2010  20:18<!-- #EndDate -->
                UTC</p>
 <br clear="left">
                <h4>More Help</h4>
                        <dd>Specify the key ID to use for write requests.</dd>
                        <dt><tt>lassociations</tt></dt>
                        <dd>Perform the same function as the associations command, execept display mobilized and unmobilized associations.</dd>
+                       <dt id="monstats"><tt>monstats</tt></dt>
+                       <dd>Display monitor facility statistics.</dd>
+                       <dt id="mrulist"><tt>mrulist [limited | kod | mincount=<i>count</i> | laddr=<i>localaddr</i> | sort=<i>sortorder</i> | resany=<i>hexmask</i> | resall=<i>hexmask</i>]</tt></dt>
+                       <dd>Obtain and print traffic counts collected and maintained by the monitor facility. With the exception of
+                               <tt>sort=<i>sortorder</i></tt>, the options filter the list returned by <tt>ntpd</tt>. The <tt>limited</tt>
+                               and <tt>kod</tt> options return only entries representing client addresses from which the last packet
+                               received triggered either discarding or a KoD response. The <tt>mincount=<i>count</i></tt> option filters entries
+                               representing less than <tt><i>count</i></tt> packets. The <tt>laddr=<i>localaddr</i></tt> option filters entries
+                               for packets received on any local address other than <tt><i>localaddr</i></tt>. <tt>resany=<i>hexmask</i></tt> and
+                               <tt>resall=<i>hexmask</i></tt> filter entries containing none or less than all, respectively, of the bits in
+                               <tt><i>hexmask</i></tt>, which must begin with <tt>0x</tt>.</dd> The <tt><i>sortorder</i></tt> defaults to
+                               <tt>lstint</tt> and may be any of <tt>addr</tt>, <tt>count</tt>, <tt>avgint</tt>, <tt>lstint</tt>, or any of
+                               those preceded by a minus sign (hyphen) to reverse the sort order. The output columns are:
+                               <table width="100%" border="1" cellspacing="2" cellpadding="2">
+                                       <tr>
+                                               <td>Column</td>
+                                               <td>Description</td>
+                                       </tr>
+                                       <tr>
+                                               <td><tt>lstint</tt></td>
+                                               <td>Interval in s between the receipt of the most recent packet from this address and the completion of the
+                                                       retrieval of the MRU list by <tt>ntpq</tt>.</td>
+                                       </tr>
+                                       <tr>
+                                               <td><tt>avgint</tt></td>
+                                               <td>Average interval in s between packets from this address.</td>
+                                       </tr>
+                                       <tr>
+                                               <td><tt>rstr</tt></td>
+                                               <td>Restriction flags associated with this address.  Most are copied unchanged from the matching <tt>restrict</tt>
+                                                       command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this
+                                                       address triggered a rate control response.</td>
+                                       </tr>
+                                       <tr>
+                                               <td><tt>r</tt></td>
+                                               <td>Rate control indicator, either a period, <tt>L</tt> or <tt>K</tt> for no rate control response,
+                                                       rate limiting by discarding, or rate limiting with a KoD response, respectively.</td>
+                                       </tr>
+                                       <tr>
+                                               <td><tt>m</tt></td>
+                                               <td>Packet mode.</dt>
+                                       </tr>
+                                       <tr>
+                                               <td><tt>v</tt></td>
+                                               <td>Packet version number.</td>
+                                       </tr>
+                                       <tr>
+                                               <td><tt>count</tt></td>
+                                               <td>Packets received from this address.</td>
+                                       </tr>
+                                       <tr>
+                                               <td><tt>rport</tt></td>
+                                               <td>Source port of last packet from this address.</td>
+                                       </tr>
+                                       <tr>
+                                               <td><tt>remote address</tt></td>
+                                               <td>DNS name, numeric address, or address followed by claimed DNS name which
+                                                       could not be verified in parentheses.</dt>
+                                       </tr>
+                               </table>
+                       </dd>
                        <dt><tt>mreadvar <i>assocID</i> <i>assocID</i> [ <i>variable_name</i> [ = <i>value</i>[ ... ]</tt><br>
                                <tt>mrv <i>assocID</i> <i>assocID</i> [ <i>variable_name</i> [ = <i>value</i>[ ... ]</tt></dt>
                        <dd>Perform the same function as the <tt>readvar</tt> command, except for a range of association IDs. This range is determined from the association list cached by the most recent <tt>associations</tt> command.</dd>
@@ -229,6 +290,8 @@ broadcast server, <tt>M</tt>: multicast server</td>
                        <dd>Write the specified variables. If the <tt><i>assocID</i></tt> is  zero, the variables
                        are from the <a href="#system">system variables</a> name space, otherwise they are from the <a href="#peer">peer variables</a> name     space. The <tt><i>assocID</i></tt> is required, as the same name can occur
                        in both spaces.</dd>
+                       <dt id="sysstats"><tt>sysstats</tt>
+                       <dd>Print statistics counters maintained in the protocol module.</dd>
        </dl>
        <h4 id="status">Status Words and Kiss Codes</h4>
                <p>The current state of the operating program is shown in a set of status words maintained by the system and each association separately. These words are displayed in the <tt>rv</tt> and <tt>as</tt> commands both in hexadecimal and decoded short tip strings. The codes, tips and short explanations are on the <a href="decode.html">Event Messages and Status Words</a> page. The page also includes a list of system and peer messages, the code for the latest of which is included in the status word.</p>
index 3506c4d6b1fed421edabeeca3aee6efd5ab70c39..49e7c586a0b98d4bb2012f7829643631c0f12284 100644 (file)
@@ -8,6 +8,7 @@ document.write("<h4>Miscellaneous Commands</h4><p><ul>\
 <li class='inline'><a href='miscopt.html#leapfile'>leapfile - specify leapseconds file</a><br>\
 <li class='inline'><a href='miscopt.html#logconfig'>logconfig - configure log file</a><br>\
 <li class='inline'><a href='miscopt.html#interface'>nic - alias for interface</a><br>\
+<li class='inline'><a href='miscopt.html#mru'>mru - control monitor MRU list limits</a><br>\
 <li class='inline'><a href='miscopt.html#phone'>phone - specify modem phone numbers</a><br>\
 <li class='inline'><a href='miscopt.html#saveconfigdir'>saveconfigdir - specify saveconfig directory</a><br>\
 <li class='inline'><a href='miscopt.html#setvar'>setvar - set system variables</a><br>\
index 1adc4d483e275538bf5996113b02ef4a3fb9ca91..7941ba912b810e9908e8ad2186c09ad15544b21f 100644 (file)
@@ -450,17 +450,9 @@ ntp_monitor(
                        if (NULL == mon_free)
                                mon_getmoremem();
                        UNLINK_HEAD_SLIST(mon, mon_free, hash_next);
-               /*
-                * Preempt from the MRU list if old enough.
-                * What is the intention of the oldest->count == 1 test
-                * and is it still useful?  It seems to be avoiding
-                * mon_age controlled preemption of entries representing
-                * a single packet, and I don't understand how that
-                * helps.
-                *   -- Dave Hart
-                */
-               } else if (oldest->count == 1 || ntp_random() / (2. *
-                          FRAC) > (double)oldest_age / mon_age)
+               /* Preempt from the MRU list if old enough. */
+               } else if (ntp_random() / (2. * FRAC) >
+                          (double)oldest_age / mon_age)
                        return ~(RES_LIMITED | RES_KOD) & flags;
                else {
                        mon_reclaim_entry(oldest);