[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ntpd and ntpdate
Hi all,
After much screwing around with ntpd, I think starting to
get a handle on what its doing. When you first start ntpd,
the associations (mappings between hosts listed as ntp servers
and their status) from ntpq looks something like:
$ sudo ntpq
ntpq> ass
ind assID status conf reach auth condition last_event cnt
===========================================================
1 9316 8000 yes no
2 9317 8000 yes no
3 9318 8000 yes no
4 9319 8000 yes no
5 9320 8000 yes no
6 9321 8000 yes no
After a little more time, it will look like:
ind assID status conf reach auth condition last_event cnt
===========================================================
1 11940 9014 yes yes none reject reachable 1
2 11941 9014 yes yes none reject reachable 1
3 11942 9014 yes yes none reject reachable 1
4 11943 9014 yes yes none reject reachable 1
5 11944 9014 yes yes none reject reachable 1
6 11945 9014 yes yes none reject reachable 1
In either case, it has not synchronized with anything yet, as shown
below.
$ ntptrace
localhost: stratum 16, offset 0.000012, synch distance 0.00003
0.0.0.0: *Not Synchronized*
On morris, after a bit more time it looks something like:
ind assID status conf reach auth condition last_event cnt
===========================================================
1 11940 9614 yes yes none sys.peer reachable 1
2 11941 9014 yes yes none reject reachable 1
3 11942 9014 yes yes none reject reachable 1
4 11943 9014 yes yes none reject reachable 1
5 11944 9014 yes yes none reject reachable 1
6 11945 9014 yes yes none reject reachable 1
The first line is actually a fake server, setup by:
server 127.127.1.1
fudge 127.127.1.1 stratum 10
This isn't actually an ip address, rather it is a fake
identifier for the local clock. By setting this up, it will
allow ntpd to regard the local clock as somewhat authorative
and give that time out if it can't get anything from elsewhere.
After another few minutes, it will look something like:
ind assID status conf reach auth condition last_event cnt
===========================================================
1 11940 9014 yes yes none reject reachable 1
2 11941 9614 yes yes none sys.peer reachable 1
3 11942 9414 yes yes none candidat reachable 1
4 11943 9414 yes yes none candidat reachable 1
5 11944 9314 yes yes none outlyer reachable 1
6 11945 9114 yes yes none falsetick reachable 1
This setup is on its way to equilibrium, and has chosen id 2
as the current peer, as shown by ntptrace below.
$ ntptrace
localhost: stratum 3, offset 0.000011, synch distance 0.17929
cuscus.cc.uq.edu.au: stratum 2, offset 0.026841, synch distance 0.03589
apphys16.mst.csiro.au: stratum 1, offset 0.025527, synch distance
0.00139, refid 'ATOM'
At any point where the ntpd server has chosen a host to
synchronize with you can point ntpdate to it.
Thanks,
Brad
--
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
|Brad Marshall | Plugged In Software|
|Senior Systems Administrator | http://www.pisoftware.com|
|mailto:bmarshal@pisoftware.com | GPG Key Id: 47951BD0 / 1024b|
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
Fingerprint: BAE3 4794 E627 2EAF 7EC0 4763 7884 4BE8 4795 1BD0