4

I installed ntp on my debian system: apt-get install ntp ntpdate ntp-server.

My questions:

How often is the time synchronized - is there a schedule?

Is there a log that says when the time was synchronized?

Is it possible to control when the time should be synchronized - like, once every day at 01:48:00?

2 Answers2

10

How often is the time synchronized - is there a schedule?

The NTP protocol syncs constantly. When the ntp server start it will send a burst of sync packets pretty quickly, and then when it stays in sync it will back off to typically sending a packet every ~1000 seconds.

Is there a log that says when the time was synchronized?

NTP logs extensively. It tells you offsets and so on. You can see the current status by running the command ntpq -p

Is it possible to control when the time should be synchronized

With ntpdate alone you could set a cron task to only sync periodically, but you really shouldn't do that. Instead use the full ntp server, and let the server synchronize things. It will dynamically pick the best values for your system to keep you to a very high level of accuracy.

I strongly suggest that you take some time and read how the NTP protocol works.

Zoredache
  • 130,897
  • 41
  • 276
  • 420
  • 1
    the default ntp.conf *does not log extensively.* You can either enable the individual stats files or how it send its logs to syslog with `logconfig =allall` – dfc Jan 19 '14 at 17:39
0

The ntpd can be somewhat confusing as it acts as both a server and a client. It runs continuously, synchronizing against upstream time servers. In turn, you can point clients to your new server to reduce the ntp traffic across your wan. Alternatively, and better in a smaller environment, just setup ntpd on all your hosts and let them talk upstream.

dmourati
  • 25,540
  • 2
  • 42
  • 72