vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Making, drinking tea and reading an opus magnum from Joerg Sonnenberger: > On Mon, Dec 06, 2004 at 10:56:58AM -0500, Michael Shalayeff wrote: > > > * Michael Shalayeff <mickey@lucifier.net> [2004-12-06 16:29]: > > > > re > > > > i do not think it makes much sense reporting time adjustments <1sec > > > > that only pollutes the log file and not really useful. > > Well, I would be a bit more conservative here. 1 sec is IMO quite a drift. > If I read the ntp.org's ntp_loopfilter.c correctly, it doesn't warn > for deltas smaller 0.128 sec, which seems more resonable. one second was just much easier to do (: it make sense for smaller values. here is a new diff cu -- paranoic mickey (my employers have changed but, the name has remained) Index: ntpd.c ================================================== ================= RCS file: /cvs/src/usr.sbin/ntpd/ntpd.c,v retrieving revision 1.24 diff -u -r1.24 ntpd.c --- ntpd.c 10 Nov 2004 11:27:54 -0000 1.24 +++ ntpd.c 6 Dec 2004 18:31:35 -0000 @@ -306,8 +306,9 @@ { struct timeval tv; + if (d >= LOG_NEGLIGEE * 1000) + log_info("adjusting local clock by %fs", d); d_to_tv(d, &tv); - log_info("adjusting local clock by %fs", d); if (adjtime(&tv, NULL) == -1) log_warn("adjtime failed"); } Index: ntpd.h ================================================== ================= RCS file: /cvs/src/usr.sbin/ntpd/ntpd.h,v retrieving revision 1.45 diff -u -r1.45 ntpd.h --- ntpd.h 6 Dec 2004 16:52:33 -0000 1.45 +++ ntpd.h 6 Dec 2004 18:31:35 -0000 @@ -52,6 +52,7 @@ #define QUERYTIME_MAX 15 /* single query might take n secs max */ #define OFFSET_ARRAY_SIZE 8 #define SETTIME_MIN_OFFSET 180 /* min offset for settime at start */ +#define LOG_NEGLIGEE 128 /* negligible drift to not log (ms) */ enum client_state { STATE_NONE, |