Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   CentOS (http://www.linux-archive.org/centos/)
-   -   Gradually adjust NTP sync over time? (http://www.linux-archive.org/centos/700497-gradually-adjust-ntp-sync-over-time.html)

Sean Carolan 09-04-2012 04:17 PM

Gradually adjust NTP sync over time?
 
Suppose you have server A and server B. Server B is running 60
seconds too fast, while server A is accurate. Is there a way to
gradually move server B's time back into sync with server A, without
making a drastic, immediate change to the clock? In other words, we
would like to 'smear' the difference across several hours or days to
ensure there are no drastic changes in timestamps, etc.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Brian Mathis 09-04-2012 05:17 PM

Gradually adjust NTP sync over time?
 
On Tue, Sep 4, 2012 at 12:17 PM, Sean Carolan <scarolan@gmail.com> wrote:
> Suppose you have server A and server B. Server B is running 60
> seconds too fast, while server A is accurate. Is there a way to
> gradually move server B's time back into sync with server A, without
> making a drastic, immediate change to the clock? In other words, we
> would like to 'smear' the difference across several hours or days to
> ensure there are no drastic changes in timestamps, etc.


This is already how ntpd works. When you first start the service
(usually upon reboot), it will use 'ntpdate' to do a hard set of the
clock, then ntpd picks up and adjusts the clock back and forth to keep
it correct.


❧ Brian Mathis
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Sean Carolan 09-04-2012 05:24 PM

Gradually adjust NTP sync over time?
 
> This is already how ntpd works. When you first start the service
> (usually upon reboot), it will use 'ntpdate' to do a hard set of the
> clock, then ntpd picks up and adjusts the clock back and forth to keep
> it correct.

My understanding was that ntpd will use "slewing" for adjustments of
less than ~120ms or so, but for adjustments between 120ms and 17
minutes it will use "stepping" instead, making an abrupt and immediate
adjustment of the entire delta.

What I'm trying to avoid is abruptly resetting the clock from 12:06 to
12:05 all at once. Instead we want to slowly turn the clock back that
one minute, but spread the changes across several hours or days.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Sean Carolan 09-04-2012 05:33 PM

Gradually adjust NTP sync over time?
 
> What I'm trying to avoid is abruptly resetting the clock from 12:06 to
> 12:05 all at once. Instead we want to slowly turn the clock back that
> one minute, but spread the changes across several hours or days.

I think the "-x" option may be our solution; I R'd the FM and it says:

"...If the -x option is included on the command line, the clock will
never be stepped and only slew corrections will be used."
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


All times are GMT. The time now is 06:59 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.