[ntp:questions] "Oneshot" time sync without risk of jumping time?

mike cook michael.cook at sfr.fr
Sun Apr 27 09:37:22 UTC 2014


Le 27 avr. 2014 à 10:49, Manuel Reimer a écrit :

> Hello,
> 
> I want to keep the time updated on a small Embedded Linux device.
> 
> The clock doesn't have to be very accurate. An offset of a few seconds is OK.
> 
> This small device only has Internet for a few minutes a day and I have to pay for each byte that gets transmitted, so I want to keep the traffic low.
> 
> My idea to solve this was to run "ntpd -xq" as soon as I have established my Internet connection.
> 
> The problem with this is that the time jumps if the difference is above 600s.
> 
> The documentation about the "-g" option says that there is a "panic threshold" which is 1000s "by default". What does "by default" mean? Does this mean that this value is configurable? If so: How?

  use the tinker directive in the ntp conf file.

   ex. tinker panic 600

> 
> What I want ntpd to do is to exit with error status if the time difference is above the 600s limit. I don't want it to set the time forcefully (jumping time) as this may cause trouble with cronjobs running on the device.
> 

    then use ntpd -gxq and it should slew up to the new panic value, exiting if a correction is needed which is greater.

> Greetings,
> 
> Manuel
> 
> _______________________________________________
> questions mailing list
> questions at lists.ntp.org
> http://lists.ntp.org/listinfo/questions


More information about the questions mailing list