[ntp:questions] Re: NTP and Cron

Richard B. Gilbert rgilbert88 at comcast.net
Wed Dec 1 03:02:08 UTC 2004


Steven Hajducko wrote:

>>ntp never decrements the time. If it's necessary it will reduce the
>>adjustments. Remember that time is monotonically increasing.
>>    
>>
>
>  
>
>>The only time you could get something like this happening is if
>>you were to use ntpdate to SET the time. It's another reason to
>>deprecate ntpdate.
>>    
>>
>
>Ok, good to know, but that's a little confusing to a ignorant neophite such
>as myself. :)
>
>I guess I'm not understanding how NTP actually adjusts time, which is
>probably something I should take upon myself to read about, but nonetheless,
>a quick, ignorant question.  If a system clock is running too slow, then it
>simply adjusts the time to be a little bit faster than real time? Adding
>.001 ( or whatever number ) to every second until you make up that extra
>second?  And if the system clock is running too fast, it makes that second
>count for less, in all sense of the word, slowing down the machine's time
>until real time catches up?
>
>Guess I should start my reading. :)
>
>Thanks for the info.
>
>--
>sh
>
>  
>
Yup!  NTP fiddles with the clock frequency to make it run a little 
faster until it catches up or a little slower until time catches up with 
it.  The current version of ntpd can be requested to set the clock on a 
one time basis with the -g option.  It will do so if the time is within 
certain limits.  You should set the clock manually to within a minute or 
so of the correct time before starting ntpd.  With older versions of 
ntpd you would need to use ntpdate to set the clock before starting ntpd.



More information about the questions mailing list