[ntp:questions] ntp server help

Maarten Wiltink maarten at kittensandcats.net
Mon Aug 11 07:40:46 UTC 2008


"Mikel Jimenez" <mikel at irontec.com> wrote in message
news:489DAFD4.8050009 at irontec.com...
[...]
> How can I configure the server to cameras get server time every very
> very short time? My objective is to get the server and 4 cameras
> syncronizhed, not more 0.01s desyncronizhed, taking reference the
> server.

One way would be to configure the server for broadcast mode, and the
clients for listening to the broadcasts. Then the server would send
out timestamps every 64 seconds (I think), which for NTP purposes
qualifies as quite often.

But that's not the normal way to have a small number of clients work.
It is more common to run NTP on the clients and let it adjust the clock
until it runs very nearly exactly right. That works much better than
leaving the clock to run slow or fast and jolt it back or forward as
required 'every very very short time'.

Two things may be wrong with a clock: it may simply be off (reading
for example ten past midnight at midnight), and it may be running
fast or slow (say, advancing sixty-one minutes every hour). Most
clocks suffer from both. Most people know no better than to set back
that clock twenty-four minutes every day. Doing that more often will
require smaller adjustments each time, and also have the clock being
closer to real time on average.

But NTP can slow down or speed up the clock as well. It can really
make the clock run at sixty minutes per hour[0]. And then you only
need to make the rough adjustment once, if at all. After that, the
clock is adjusted by making it run faster or slower (only a _veeery_
little bit) when it needs it. Very soon, you get to the point where
the time difference between client and server must be allowed to
accumulate for quite a long time before you can even reliably see
it, so you are correcting real error and not just measurement noise.

NTP will start by polling every 64 seconds. When it is running well,
it will poll less and less, until it stops at polling every 1024
seconds (just over 17 minutes). And the offset will be not just
under 0.01 seconds, it can be under 0.01 _milli_seconds. If it's
running well.

Groetjes,
Maarten Wiltink

[0] These numbers are faked. A more realistic error is a tenth of
    a second per hour.





More information about the questions mailing list