View Single Post
Old 9th June 2008, 20:00     #2
Tarquin
 
You can't set a precise "sync every X seconds" value (usually), but you can set minimum and maximum values; you want the "minpoll" and "maxpoll" options in ntp.conf. (You can use them either by themselves, or as arguments to a peer/server directive.)

The poll intervals are are in seconds, but if you set the config value to x, that makes the poll interval 2^x seconds. The defaults are minpoll=6 (2^6 = 64 sec) and maxpoll=10 (2^10 = 1024 sec = ~17 mins); you can set them as low as 4 (16 sec), or as high as 17 (~36 hours).

ntpd will adjust its internal poll value (within those limits) based on how well it thinks it's tracking the server or peer in question; in your case, you'd want to drop minpoll right down to 4, and maxpoll to 5 or 6.

You probably don't actually need it that low, mind you, unless your use of VMs is screwing up the system clocks somehow: in NTP terms, "within a few seconds" isn't very close at all. (A quick check on one of our Internet-facing servers shows that, using default poll settings, it's only 0.03 seconds out from one of the nz.pool.ntp.org servers, and less than 0.01 out from any of the others.) But if you're just syncing a few internal machines, it's not likely to hurt.

Last edited by Tarquin : 9th June 2008 at 20:02.
  Reply With Quote