Wednesday, October 18, 2006

ntp: keeping the right time

This is an other topic inspired by ;login: (usenix magazine). I think it is essential for a computer to have the clock showing the right time, and it is not hard! On my servers I use either ntpd (the daemon), or 4 time per day a ntpdate to a nearly ntp server. On my home desktop the ntpdate is run at every boot (because it is never on for long time), and on my ibook the same on linux boot and ntpd on MacOS (which is the default).
I don't know what is the better method. A drift of one second is mainly acceptable on my machines, so the ntpdate methond should be the better choice (if the hardware clock is not "broken"). [BTW the debian packages are: ntp and ntpdate]

Today I joined the ntp pool servers: a list of public (and unrestricted) ntp servers. For my configuration I choosed 6 ntp servers (stratum 2) located in Switzerland.

If you don't care to high precise timing, you can use ntp pool servers (check the references to choose the right servers). If you have not yet used ntp, it is the better start. For high precise timing, there are also Stratum 1 (but read the usage rules) and Stratum 2. Optionally you can also use a GPS clock.

References: ntp project home page. I've also heard that there is a project of one of the BSD to make an alternate (and lighter) implementation.

No comments: