[ntp:questions] NTP client configuration

unruh unruh at invalid.ca
Thu Sep 27 21:20:21 UTC 2012

On 2012-09-27, Benjamin CABUT <benjamin.cabut at rsacosmos.com> wrote:
> Hello,
> I don't car in my application to have the correct UTC time.
> What I care is that all my computers share exactly the same time.
> Our application is not connected to internet.
> So only time I can use as a reference is local clock of one computer.

OK, look up "orphan mode".
But again why are you suing a windows machine as your reference? Windows
is not known for its timekeeping ability. Use for example one of your
Linux machines instead.

> I can realy tell you that my client is not sync some times!
> it happen in 2 ways:
> -> when I start my computers, it need arround 5 minutes to be sync, it 
> is a problem for me

ntpd is NOT designed for rapid convergence. 5 min is very fast as far as
ntpd is concerned. 

> -> when one computer has heavy operation to do, then ntp client desync

What do you mean "when one computer"? The server? a client? And what is
"a heavy operation"? 

> and I have offset that can be 2 seconds, and stay like this during 
> sereval minutes.

You have other problems. ntpd is NOT designed to correct clocks which
jump around by seconds. You need to get your clocks to behave themselves
first so that their time does not jump around. 

> so It realy need a long time to ntp client to detect the big desync.

> I do not want to rewrite ntp.
> ntpq gives the offset between clock of client and clock of server.
> As you say the best way for me is that ntp is working perfectly, but it 
> is not the case.

Your idea and Mill's idea of "working perfectly" is different. He
designed it so that it will correct clocks which run stably (loess than
say 100PPM rate error always). It is NOT designed to hadle clocks whose
rates can vary by more than that, or whose time can jump around. chrony
(sorry does not run on Windows) does a bit better but again it would
have trouble with your clocks as well. 

> I don't know how to improve this by configuration.

Depends on what you mean by "improved".

> So I was just wondering if I could get the offset in my software to 
> solve my problem...

I think you need to figure out what your problem is first. 

> Regards.
> Le 27/09/2012 20:39, unruh a ?crit :
>> On 2012-09-27, Benjamin CABUT <benjamin.cabut at rsacosmos.com> wrote:
>>> Hello,
>>> We are using Meindberg NTP client and server.
>>> Our configuration is:
>>> - 1 Computer under windows that is server
>>> server
>> Why would you be using a windows machine as your server. Windows is not
>> a great platform for time.
>> And why in the worl would you have it be using the local refclock. That
>> should never be used.  Where in the world is that computer getting its
>> time from?
>>> broadcast minpoll 4 maxpoll 4 iburst
>>> disable auth
>>> - several computer under linux + computers under windows, client of this
>>> server:
>>> server minpoll 4 maxpoll 4 iburst
>>> broadcastclient
>>> disable auth
>>> My problem is the following:
>>> Mainly on windows computer, sometime, depending what the computer is
>>> doing, there is a big offset between clients and server.
>>> ("Big" for me is more than 500ms).
>>> I would like to know if it is possible to setup client so as soon as he
>>> see offset>500ms, then client do a "fast" synch. (STEP).
>> If ntpd sees an offset of 128ms and it believes this is a valid offset,
>> it steps.
>>> Another way to solve my problem could be for me, to modify the source
>>> code of my application in order to get this "offset" information inside
>>> my code (C or C++ langage). then I could add this offset to the time of
>>> the computer in order to be as much accurate as possible during the time
>>> the offset is bigger than 500ms.
>> ntpd does its best to get a small offset. What makes yo uthing your C
>> program can do better? You have other problems. Worry about them, not
>> about rewriting ntpd.
>>> Do you have any solution?
>>> Regards.
>> _______________________________________________
>> questions mailing list
>> questions at lists.ntp.org
>> http://lists.ntp.org/listinfo/questions

More information about the questions mailing list