Running CentOS release 5.8
I had a time drift issue on a server which I fixed - it was not syncing the hwclock so that on a reboot ntp would be more than 1000 seconds off and never sync time.
While investigating the problem I noticed that ntpd was synchronizing to Local(0) regularly.
Is there any reason to have ntpd configured to sync to Local(0) when this server is never going to be used as a time source?
"The Answer" - you don't need to use Undisciplined Local Clock unless you want to use this server as a local time server when connecting to other time servers fail.
Log messages from ntpd:
Jul 20 03:47:49 localhost ntpd[5441]: synchronized to 110.14.8.1, stratum 3
Jul 20 04:21:06 localhost ntpd[5441]: synchronized to LOCAL(0), stratum 10
Jul 20 04:38:09 localhost ntpd[5441]: synchronized to 110.14.8.1, stratum 3
Jul 20 04:55:26 localhost ntpd[5441]: synchronized to LOCAL(0), stratum 10
ntpd.conf:
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 10.4.58.21
# 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 # local clock
fudge 127.127.1.0 stratum 10
We are going to disable local-sync, but still curious why the local-sync is happening at all. We put a temporary time server in place on the same sub-net, and ntpd still syncs to local time. (* Possible answer: ntpdc -c sysinfo stats that the startum of the ntp server is 11 which is worse than the 10 we told ntpd to use for the local. Time to go look at the source for ntpd *)
Jul 24 17:11:32 localhost ntpdate[5432]: step time server 227.220.222.220 offset 1629.764734 sec
Jul 24 17:11:32 localhost ntpd[5434]: ntpd [email protected] Fri Nov 18 13:21:21 UTC 2011 (1)
Jul 24 17:11:32 localhost ntpd[5435]: precision = 1.000 usec
Jul 24 17:11:32 localhost ntpd[5435]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Jul 24 17:11:32 localhost ntpd[5435]: Listening on interface wildcard, ::#123 Disabled
Jul 24 17:11:32 localhost ntpd[5435]: Listening on interface eth0 Enabled
Jul 24 17:11:32 localhost ntpd[5435]: Listening on interface lo, ::1#123 Enabled
Jul 24 17:11:32 localhost ntpd[5435]: Listening on interface lo, 127.0.0.1#123 Enabled
Jul 24 17:11:32 localhost ntpd[5435]: Listening on interface eth0, 192.12.140.55#123 Enabled
Jul 24 17:11:32 localhost ntpd[5435]: kernel time sync status 0040
Jul 24 17:11:32 localhost ntpd[5435]: frequency initialized 0.000 PPM from /var/lib/ntp/drift
Jul 24 17:14:48 localhost ntpd[5435]: synchronized to LOCAL(0), stratum 10
Jul 24 17:16:55 localhost ntpd[5435]: synchronized to 192.12.140.200, stratum 3
Jul 24 20:11:06 localhost ntpd[5435]: synchronized to LOCAL(0), stratum 10
Jul 24 20:20:50 localhost ntpd[5435]: synchronized to 192.12.140.200, stratum 3