]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
ChangeLog, ntpd.h, ntp_loopfilter.c, ntp_util.c:
authorHarlan Stenn <stenn@ntp.org>
Fri, 11 May 2001 05:31:03 +0000 (05:31 -0000)
committerHarlan Stenn <stenn@ntp.org>
Fri, 11 May 2001 05:31:03 +0000 (05:31 -0000)
  * ntpd/ntp_util.c (record_loop_stats): values are now passed in.
  * ntpd/ntp_loopfilter.c (local_clock): pass the values to
  record_loop_stats().
  * include/ntpd.h: Pass the parameters in to record_loop_stats().
  With the discipline loop opened (disable ntp) the local clock
  updates were not being sent to loopstats. That now is.
  From: Dave Mills.

bk: 3afb79171xQZrjYWQ7nhu62nkEO64g

ChangeLog
include/ntpd.h
ntpd/ntp_loopfilter.c
ntpd/ntp_util.c

index 4c678afcb127fdf08624c719d5f4268545426e10..7721a9f70b4b869ab598634bbea59c65f52a7fc3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2001-05-11  Harlan Stenn  <stenn@whimsy.udel.edu>
+
+       * ntpd/ntp_util.c (record_loop_stats): values are now passed in.
+       * ntpd/ntp_loopfilter.c (local_clock): pass the values to
+       record_loop_stats().
+       * include/ntpd.h: Pass the parameters in to record_loop_stats().
+       With the discipline loop opened (disable ntp) the local clock
+       updates were not being sent to loopstats. That now is.
+       From: Dave Mills.       
+
 2001-05-10  Harlan Stenn  <stenn@whimsy.udel.edu>
 
        * configure.in: 4.0.99k33
index 60f877b72a4d9c956ea7af8b506217a6f0c3f459..067947b7d448669473d232d80117bd7c136a856f 100644 (file)
@@ -191,7 +191,7 @@ extern      void    init_util       P((void));
 extern void    hourly_stats    P((void));
 extern void    stats_config    P((int, char *));
 extern void    record_peer_stats P((struct sockaddr_in *, int, double, double, double, double));
-extern void    record_loop_stats P((void));
+extern void    record_loop_stats P((double, double, double, double, int));
 extern void    record_clock_stats P((struct sockaddr_in *, const char *));
 extern void    record_raw_stats P((struct sockaddr_in *, struct sockaddr_in *, l_fp *, l_fp *, l_fp *, l_fp *));
 
index 882ebf80daf0313ed8c031a5f91f89794998cd9b..1dabdad72e3db70637451e9ad1bdc9cfb95eb067 100644 (file)
@@ -211,7 +211,8 @@ local_clock(
                    peer->associd, fp_offset, SQRT(epsil), state);
 #endif
        if (!ntp_enable) {
-               record_loop_stats();
+               record_loop_stats(fp_offset, drift_comp, SQRT(epsil),
+                   clock_stability, sys_poll);
                return (0);
        }
 
@@ -254,7 +255,8 @@ local_clock(
                            fp_offset);
                        printf("ntpd: time slew %.6fs\n", fp_offset);
                }
-               record_loop_stats();
+               record_loop_stats(fp_offset, drift_comp, SQRT(epsil),
+                   clock_stability, sys_poll);
                exit (0);
        }
 
@@ -636,7 +638,8 @@ local_clock(
        if ((peer->flags & FLAG_REFCLOCK) == 0 && dtemp < MINDISPERSE)
                dtemp = MINDISPERSE;
        sys_rootdispersion = peer->rootdispersion + dtemp;
-       record_loop_stats();
+               record_loop_stats(last_offset, drift_comp, sys_jitter,
+                   clock_stability, sys_poll);
 #ifdef DEBUG
        if (debug > 1)
                printf(
index 34d38a7cd335d58b79f55935a135a3823d9ba5b0..f86e9303768c6a63e183adbf46c0cef50e636ccc 100644 (file)
@@ -489,7 +489,13 @@ record_peer_stats(
  * time constant (log base 2)
  */
 void
-record_loop_stats(void)
+record_loop_stats(
+       double offset,
+       double freq,
+       double jitter,
+       double stability,
+       int poll
+       )
 {
        struct timeval tv;
 #ifdef HAVE_GETCLOCK
@@ -513,8 +519,8 @@ record_loop_stats(void)
        filegen_setup(&loopstats, (u_long)(tv.tv_sec + JAN_1970));
        if (loopstats.fp != NULL) {
                fprintf(loopstats.fp, "%lu %lu.%03lu %.9f %.6f %.9f %.6f %d\n",
-                   day, sec, msec, last_offset, drift_comp * 1e6,
-                   sys_jitter, clock_stability * 1e6, sys_poll);
+                   day, sec, msec, offset, freq * 1e6, jitter,
+                   stability * 1e6, poll);
                fflush(loopstats.fp);
        }
 }