[ntp:questions] how to have offset < 1ms
unruh at wormhole.physics.ubc.ca
Mon Apr 12 21:22:35 UTC 2010
On 2010-04-12, lhommedumatch <ludocluba at yahoo.com> wrote:
> I have my PC clock synchronised with a ntp server (ntpgmtaceb).
> With ntpq -p, I see an offset of 6ms.
> How can I be sure to have an offset < 1ms
First get rid of the LOCAL source. Using the machine itself to tell
itself the time is good for perceived accuracy, but terrible for real
accuracy. (as you see the machine has a 0 delay with itself)
The delay of 29ms is really long if that is a locally connected macine.
Where it ntpgmtaceb with respect to you? It may be that that delay is
sufficiently variable that better accuracy is impossible.
ntp is very slow to correct errors. Ie, how long did you wait to see
what the offset was. the time scale is many hours. Is it still with a
large offset many hours after starting up?
> ntpq -p
> remote refid st t when poll reach delay
> offset jitter
> LOCAL(0) .LOCL. 10 l 61 64 377 0.000
> 0.000 0.001
> *ntpgmtaceb .1PPS. 1 u 709 1024 377 29.431
> -6.450 0.917
> Here is my ntp.conf:
> # Permit time synchronization with our time source, but do not
> # permit the source to query or modify the service on this system.
> restrict default kod nomodify notrap nopeer noquery
> # Permit all access over the loopback interface. This could
> # be tightened as well, but to do so would effect some of
> # the administrative functions.
> restrict 127.0.0.1
> restrict -6 ::1
> # Hosts on local network are less restricted.
> #restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
> # Use public servers from the pool.ntp.org project.
> # Please consider joining the pool (http://www.pool.ntp.org/
> #broadcast 192.168.1.255 key 42 # broadcast server
> #broadcastclient # broadcast client
> #broadcast 188.8.131.52 key 42 # multicast server
> #multicastclient 184.108.40.206 # multicast client
> #manycastserver 220.127.116.11 # manycast server
> #manycastclient 18.104.22.168 key 42 # manycast client
> # Undisciplined Local Clock. This is a fake driver intended for backup
> # and when no outside source of synchronized time is available.
> server 127.127.1.0
This is lunacy UNLESS your machine acts as a server to other machines,
and you want it to continue to be regarded as a valid server, even if it
becomes disconnected. A machine querying itself cannot get a better time
than it already has.( Yes, I know, many distros have this in their
recommended conf file. They are nuts)
> fudge 127.127.1.0 stratum 10
> # Drift file. Put this in a directory which the daemon can write to.
> # No symbolic links allowed, either, since the daemon updates the file
> # by creating a temporary in the same directory and then rename()'ing
> # it to the file.
> driftfile /var/lib/ntp/drift
> # Key file containing the keys and key identifiers used when operating
> # with symmetric key cryptography.
> keys /etc/ntp/keys
> # Specify the key identifiers which are trusted.
> #trustedkey 4 8 42
> # Specify the key identifier to use with the ntpdc utility.
> #requestkey 8
> # Specify the key identifier to use with the ntpq utility.
> #controlkey 8
> server ntpgmtaceb
> restrict ntpgmtaceb mask 255.255.255.255 nomodify notrap noquery
More information about the questions