I have written a Puppet module that corrects the time via NTP, but this only works on server with a small NTP offset.
There are sometimes server with a time offset higher than 10 minutes for various reasons.
I want to make a Puppet module that runs exec "service ntpd stop; ntpdate ntp3.domain.local; service ntpd start" when the ntp offset is too high, to forcably correct the time.
How can I see if the NTP offset is too high in order to tell Puppet to run this command? Or are there better solutions?
ntpd
, why do you get such big time drifts?ntpd
should be continually adjusting the time to always match. be aware that large time jumps can raise unexpected behaviour of loads of programs. – umläute Sep 19 '13 at 21:14-g
(or a tinker line)... – derobert Sep 19 '13 at 23:18