I am trying to set up a local NTP server for our LAN. I am able run ntpdate server_ip
to manually update the time. However, ntp daemon does not seem to be logging anything into syslog, and so I can't tell if any system ever synchronized.
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
logconfig =syncall +clockall
# Specify one or more NTP servers.
# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
server 10.0.1.201 iburst minpoll 3 maxpoll 4
restrict -4 default kod notrap nomodify nopeer
restrict -6 default kod notrap nomodify nopeer
# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details. The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
# might also be helpful.
#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.
# Local users may interrogate the ntp server more closely.
#restrict 127.0.0.1
#restrict ::1
# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust
# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255
# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines. Please do this only if you trust everybody on the network!
disable auth
#broadcastclient
What might I be missing?
Best Answer
NTP is normally very quiet/silent in syslog. Things are going wrong if it shows up. If your hardware clock is working, it shouldn't need to modify your clock during startup. With the right settings it can replace ntpdate to set the clock on startup if required.
The logs you want to look at are the
loopstats
andpeerstats
files. Once running NTP should not need to synchronize the clock. It will adjust the tick timing very slightly to keep the clock synchronized.loopstats
file provides your local state, whilepeerstats
shows your state relative to the servers you are using. See the NTP Troubleshooting Guide for details on these files.