* 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
+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
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 *));
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);
}
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);
}
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(
* 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
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);
}
}