rpms/ntp/F-13 ntpstat-0.2-maxerror.patch, NONE, 1.1 ntpstat-0.2-sysvars.patch, NONE, 1.1 ntp-4.2.6p1-htmldoc.patch, 1.1, 1.2 ntp.spec, 1.98, 1.99

Miroslav Lichvar mlichvar at fedoraproject.org
Thu May 13 13:28:18 UTC 2010


Author: mlichvar

Update of /cvs/pkgs/rpms/ntp/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv31455

Modified Files:
	ntp-4.2.6p1-htmldoc.patch ntp.spec 
Added Files:
	ntpstat-0.2-maxerror.patch ntpstat-0.2-sysvars.patch 
Log Message:
- update ntpstat to use current system variable names (#588067)
- print synchronization distance instead of dispersion in ntpstat
- clarify ntpd -q description


ntpstat-0.2-maxerror.patch:
 ntpstat.c |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

--- NEW FILE ntpstat-0.2-maxerror.patch ---
diff -up ntp-4.2.6p1/ntpstat-0.2/ntpstat.c.maxerror ntp-4.2.6p1/ntpstat-0.2/ntpstat.c
--- ntp-4.2.6p1/ntpstat-0.2/ntpstat.c.maxerror	2010-05-03 11:37:49.000000000 +0200
+++ ntp-4.2.6p1/ntpstat-0.2/ntpstat.c	2010-05-03 12:20:08.000000000 +0200
@@ -89,7 +89,9 @@ int main (void) {
     "modem"};         /* 9 */
   char *newstr;
   char *dispstr;
+  char *delaystr;
   const char DISP[] = "rootdisp=";
+  const char DELAY[] = "rootdelay=";
   const char STRATUM[] = "stratum=";
   const char POLL[] = "tc=";
   const char REFID[] = "refid=";
@@ -235,16 +237,19 @@ int main (void) {
     /* Set the position of the start of the string to 
        "rootdispersion=" part of the string. */
     strncpy(buff, ntpmsg.payload, sizeof(buff));
-    if ((newstr = strstr (buff, DISP))) {
-      newstr += sizeof(DISP) - 1;
-      dispstr = strtok(newstr,".");
+    if ((dispstr = strstr (buff, DISP)) && (delaystr = strstr (buff, DELAY))) {
+      dispstr += sizeof(DISP) - 1;
+      dispstr = strtok(dispstr,",");
+      delaystr += sizeof(DELAY) - 1;
+      delaystr = strtok(delaystr,",");
 
       /* Check the resultant string is of a reasonable length */
-      if ((strlen (dispstr) == 0) || (strlen (dispstr) > 4)) {
+      if ((strlen (dispstr) == 0) || (strlen (dispstr) > 10) ||
+	      (strlen (delaystr) == 0) || (strlen (delaystr) > 10)) {
 	printf ("accuracy unreadable\n");
       }
       else {
-	printf("   time correct to within %s ms\n",dispstr);
+	printf("   time correct to within %.0f ms\n", atof(dispstr) + atof(delaystr) / 2.0);
       }
     } else {
       rc=1;

ntpstat-0.2-sysvars.patch:
 ntpstat.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE ntpstat-0.2-sysvars.patch ---
diff -up ntp-4.2.6p1/ntpstat-0.2/ntpstat.c.sysvars ntp-4.2.6p1/ntpstat-0.2/ntpstat.c
--- ntp-4.2.6p1/ntpstat-0.2/ntpstat.c.sysvars	2010-05-03 11:27:47.000000000 +0200
+++ ntp-4.2.6p1/ntpstat-0.2/ntpstat.c	2010-05-03 11:32:56.000000000 +0200
@@ -89,9 +89,9 @@ int main (void) {
     "modem"};         /* 9 */
   char *newstr;
   char *dispstr;
-  const char DISP[] = "rootdispersion=";
+  const char DISP[] = "rootdisp=";
   const char STRATUM[] = "stratum=";
-  const char POLL[] = "poll=";
+  const char POLL[] = "tc=";
   const char REFID[] = "refid=";
 
   /* initialise timeout value */

ntp-4.2.6p1-htmldoc.patch:
 authopt.html  |   12 ++++--------
 keygen.html   |    7 ++++---
 ntp-wait.html |   30 ++++++++++++++++++++++++++++++
 ntpd.html     |   22 +++++++++++++++-------
 ntpdate.html  |   16 ++++++++--------
 ntpdc.html    |   20 +++++++++++---------
 ntpq.html     |    4 ++--
 ntptrace.html |   12 ++----------
 tickadj.html  |    6 ++++--
 9 files changed, 80 insertions(+), 49 deletions(-)

Index: ntp-4.2.6p1-htmldoc.patch
===================================================================
RCS file: /cvs/pkgs/rpms/ntp/F-13/ntp-4.2.6p1-htmldoc.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- ntp-4.2.6p1-htmldoc.patch	12 Apr 2010 12:45:26 -0000	1.1
+++ ntp-4.2.6p1-htmldoc.patch	13 May 2010 13:28:18 -0000	1.2
@@ -121,6 +121,15 @@ diff -up ntp-4.2.6p1/html/ntpd.html.html
  		<h4 id="descr">Description</h4>
  		<p>The <tt>ntpd</tt> program is an operating system daemon that synchronises the system clock with remote NTP&nbsp;time servers or local reference clocks. It is a complete implementation of the Network Time Protocol (NTP) version 4, but also retains compatibility with version 3, as defined by RFC-1305, and version 1 and 2, as defined by RFC-1059 and RFC-1119, respectively. The program can operate in any of several modes, as described on the <a href="assoc.html">Association Management</a> page, and with both symmetric key and public key cryptography, as described on the <a href="manyopt.html">Authentication Options</a> page.</p>
  		<p>The <tt>ntpd</tt> program ordinarily requires a configuration file as desccribe on the Configuration Commands and Options collection above. However a client can discover remote servers and configure them automatically. This makes it possible to deploy a fleet of workstations without specifying configuration details specific to the local environment. Further details are on the <a href="manyopt.html">Automatic Server Discovery</a> page.</p>
+@@ -44,7 +44,7 @@
+ 		<p>The issues should be carefully considered before using these options. The maximum slew rate possible is limited to 500 parts-per-million (PPM) by the Unix kernel. As a result, the clock can take 2000 s for each second the clock is outside the acceptable range. During this interval the clock will not be consistent with any other network clock and the system cannot be used for distributed applications that require correctly synchronized network time.</p>
+ 		<p>The frequency file, usually called <tt>ntp.drift</tt>, contains the latest estimate  of clock frequency. If this file does not exist when <tt>ntpd</tt> is started, it enters a special mode designed to measure the particular frequency directly. The measurement takes 15 minutes, after which the frequency is set and <tt>ntpd</tt> resumes normal mode where the time and frequency are continuously adjusted. The frequency file is updated at intervals of an hour or more depending on the measured clock stability.</p>
+ 		<h4 id="modes">Operating Modes</h4>
+-		<p>The <tt>ntpd</tt> program normally operates continuously while adjusting the time and frequency, but in some cases it may not be practical to run it continuously. With the <tt>-q</tt> option <tt>ntpd</tt> operates as in continous mode, but exits just after setting the clock for the first time. Most applications will probably want to specify the <tt>iburst</tt> option with the <tt>server</tt> command. With this option a volley of messages is exchanged to groom the data and set the clock in about 10 s. If nothing is heard after a few minutes, the daemon times out and exits.</p>
++		<p>The <tt>ntpd</tt> program normally operates continuously while adjusting the time and frequency, but in some cases it may not be practical to run it continuously. With the <tt>-q</tt> option <tt>ntpd</tt> operates as in continous mode, but exits just after setting the clock for the first time with the configured servers. Most applications will probably want to specify the <tt>iburst</tt> option with the <tt>server</tt> command. With this option a volley of messages is exchanged to groom the data and set the clock in about 10 s. If nothing is heard after a few minutes, the daemon times out and exits.</p>
+ 		<h4 id="poll">Poll Interval Control</h4>
+ 		<p>NTP uses an intricate heuristic algorithm to automatically control the poll interval for maximum accuracy consistent with minimum network overhead. The algorithm measures the incidental offset and jitter to determine the best poll interval. When <tt>ntpd</tt> starts, the interval is the default minimum 64 s. Under normal conditions when the clock discipline has stabilized, the interval increases in steps to the default maximum 1024 s. In addition, should a server become unreachable after some time, the interval increases in steps to the maximum in order to reduce network overhead.</p>
+ 		<p>The default poll interval range is suitable for most conditions, but can be changed using options on the <a href="confopt.html">Server Options</a> and <a href="miscopt.html">Miscellaneous Options</a> pages. However, when using maximum intervals much larger than the default, the residual clock frequency error must be small enough for the discipline loop to capture and correct. The capture range is 500 PPM with a 64-s interval decreasing by a factor of two for each interval doubling. At a 36-hr interval, for example, the capture range is only 0.24 PPM.</p>
 @@ -88,8 +88,13 @@
  		<p>In contexts where a host name is expected, a <tt>-4</tt> qualifier preceding the host name forces DNS resolution to the IPv4 namespace, while a <tt>-6</tt> qualifier forces DNS resolution to the IPv6 namespace.</p>
  		<p>Various internal <tt>ntpd</tt> variables can be displayed and configuration options altered while the <tt>ntpd</tt> is running using the <tt><a href="ntpq.html">ntpq</a></tt> and <tt><a href="ntpdc.html">ntpdc</a></tt> utility programs.</p>


Index: ntp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ntp/F-13/ntp.spec,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -p -r1.98 -r1.99
--- ntp.spec	12 Apr 2010 12:45:27 -0000	1.98
+++ ntp.spec	13 May 2010 13:28:18 -0000	1.99
@@ -1,7 +1,7 @@
 Summary: The NTP daemon and utilities
 Name: ntp
 Version: 4.2.6p1
-Release: 1%{?dist}
+Release: 2%{?dist}
 # primary license (COPYRIGHT) : MIT
 # ElectricFence/ (not used) : GPLv2
 # kernel/sys/ppsclock.h (not used) : BSD with advertising
@@ -74,6 +74,10 @@ Patch14: ntp-4.2.6p1-mlock.patch
 Patch50: ntpstat-0.2-clksrc.patch
 # process first packet in multipacket response
 Patch51: ntpstat-0.2-multipacket.patch
+# use current system variable names
+Patch52: ntpstat-0.2-sysvars.patch
+# print synchronization distance instead of dispersion
+Patch53: ntpstat-0.2-maxerror.patch
 
 URL: http://www.ntp.org
 Requires(post): /sbin/chkconfig
@@ -157,6 +161,8 @@ sed -i 's|/var/db/ntp-kod|%{_localstated
 # ntpstat patches
 %patch50 -p1 -b .clksrc
 %patch51 -p1 -b .multipacket
+%patch52 -p1 -b .sysvars
+%patch53 -p1 -b .maxerror
 
 for f in COPYRIGHT; do
 	iconv -f iso8859-1 -t utf8 -o ${f}{_,} && touch -r ${f}{,_} && mv -f ${f}{_,}
@@ -330,6 +336,11 @@ fi
 %{ntpdocdir}/html
 
 %changelog
+* Thu May 13 2010 Miroslav Lichvar <mlichvar at redhat.com> 4.2.6p1-2
+- update ntpstat to use current system variable names (#588067)
+- print synchronization distance instead of dispersion in ntpstat
+- clarify ntpd -q description
+
 * Mon Apr 12 2010 Miroslav Lichvar <mlichvar at redhat.com> 4.2.6p1-1
 - update to 4.2.6p1
 



More information about the scm-commits mailing list