[ntp:questions] ntpd -g option : does it do what it claims?

Matthew Lee mjlee at mindless.com
Tue May 12 01:15:02 UTC 2009


Hi

The ntpd man page says:
-g      Normally,  ntpd  exits if the offset exceeds the sanity limit,
        which is 1000 s by default. If the  sanity  limit  is  set  to
        zero,  no  sanity  checking  is  performed  and  any offset is
        acceptable.  This option overrides the limit  and  allows  the
        time to be set to any value without restriction; however, this
        can happen only once.  After that,  ntpd   will  exit  if  the
        limit  is  exceeded.  This  option  can  be  used  with the -q
        option.

So, I was running "ntpd -g" on a system using gpsd/shm.  It was booting up with the clock set to 1980.
After many hours trying to find out why ntpd was never sychronising my clock to the gpsd time, I found a check in the ntpd source code that ignores any reference timestamps that are more than 4 hours different to the current system clock.

Is the explanation of "-g" option given above incorrect?  Based on what it says above, ntpd -g should have been able to correct my clock that was off by 29 years.

Maybe I've misunderstood the purpose of -g ??



-- 
Be Yourself @ mail.com!
Choose From 200+ Email Addresses
Get a Free Account at www.mail.com




More information about the questions mailing list