[HLUG] NTP nonsense
Andrew Hodgson
andrew.hodgson at allpay.net
Wed Nov 23 12:07:39 GMT 2005
Hi,
I may be completely off the mark here, but are you using ntp-client to
invoke ntpdate?
Is the ntp-client program what is running and do you have the relevant
settings put into the ntp-client configure file (try locating it in
/etc/conf.d).
In this file change the lines like this:
NTPCLIENT_OPTS="-b uk.ntp.pool.org"
NTPCLIENT_OPTS="-b time.aaisp.net.uk" (aaisp server is my local ISP
timeserver)
Then /etc/init.d/ntp-client restart
With the NTPD I think the restrict lines are wrong in the config lines - I
am a bit rusty on this.
restrict 127.0.0.1 ignore notrust nomodify
That was the only restrict I had, I seem to remember that the default way
they wanted you to do it according to the comments meant the system didn't
update the time for some reason. I take it from your post you are using a
single machine and don't want to serve time to other machines on the LAN.
Also do you use dhcpcd as I think it modifies ntp.conf.
After restarting what do you see in the ntpd.log file after around an hour
or two? If this machine goes up and down for periods I recommend only using
ntp-client.
Thanks.
Andrew.
-----Original Message-----
From: herefordshire-bounces at mailman.lug.org.uk
[mailto:herefordshire-bounces at mailman.lug.org.uk] On Behalf Of tundish
Sent: 22 November 2005 21:18
To: herefordshire at mailman.lug.org.uk
Subject: [HLUG] NTP nonsense
Hi, it was great to meet you all last week. Looking forward to the
Christmas meal!
I mentioned to Andrew that I was having trouble with NTP. He suggested I
post the details here.
For those who don't know, the idea with NTP is that when your computer
boots, it runs ``ntpdate`` which goes off and finds a server(s) on the
internet which knows the right time, and corrects your PC's clock to
match that time. Then, the ``ntpd`` daemon takes over and makes sure
your clock is corrected to run the same speed as the server(s). When
your PC has sync'ed up, it gets given a Stratum which shows its place in
the NTP hierarchy. Then *you* can serve time to other machines, ie: the
ones in your LAN. Stratum 1 servers totally know what the time is.
Stratum 16 means you're pants.
I am pants. Although my server can see NTP servers, and can correct its
time, it never seems to synch up. It stays at Stratum 16.
I'm running Gentoo, kernel 2.6.13-gentoo-r3, and ntp 4.2.0. There are a
number of issues I've discovered which may affect NTP operation. For
example, there's an issue with the kernel HZ value being anything other
than 100. I've fixed that. There's an issue with using APM and ACPI, so
I've removed them. I've checked that the ``compatibility`` module
enables NTP running below root. I've removed the problematic keywords
"ignore" and "noserve" from my ntp.conf. My next move will be to get rid
of ntpd altogether and install openntp or chrony.
Hopefully, someone here might spot what I'm doing wrong. Here below is
my ntp/conf, then a sample from ``ntpq -c pe``, then from ``ntpq -c rv``
Anyway, thanks for reading so far, and see you soon.
Cheers,
Dave.
ntp.conf::
# NOTES:
# - you should only have to update the server line below
# - if you start getting lines like 'restrict' and 'fudge'
# and you didnt add them, AND you run dhcpcd on your
# network interfaces, be sure to add '-Y -N' to the
# dhcpcd_ethX variables in /etc/conf.d/net
# Name of the servers ntpd should sync with
# Please respect the access policy as stated by the responsible person.
#server ntp.example.tld iburst
server uk.pool.ntp.org prefer
server ntp.demon.co.uk
server ntp0.esat.net
server time1.mikes.fi
##
# A list of available servers can be found here:
# http://www.pool.ntp.org/
# http://www.pool.ntp.org/#use
# A good way to get servers for your machine is:
# netselect -s 3 pool.ntp.org
##
# you should not need to modify the following paths
driftfile /var/lib/ntp/ntp.drift
#server ntplocal.example.com prefer
#server timeserver.example.org
# Warning: Using default NTP settings will leave your NTP
# server accessible to all hosts on the Internet.
# If you want to deny all machines (including your own)
# from accessing the NTP server, uncomment:
#restrict default ignore
# To deny other machines from changing the
# configuration but allow localhost:
restrict default noquery
restrict 127.0.0.1 nomodify nopeer
#restrict uk.pool.ntp.org noquery nomodify
#restrict ntp.demon.co.uk noquery nomodify
#restrict ntp0.esat.net noquery nomodify
#restrict time1.mikes.fi noquery nomodify
# To allow machines within your network to synchronize
# their clocks with your server, but ensure they are
# not allowed to configure the server or used as peers
# to synchronize against, uncomment this line.
#
#restrict 192.168.0.0 mask 255.255.255.0 nomodify nopeer notrap
restrict 192.168.0.0 mask 255.255.0.0 nomodify nopeer notrap
#fudge 127.127.1.0 stratum 10
ntp -c pe::
remote refid st t when poll reach delay offset
jitter
============================================================================
==
gw.roaima.co.uk 130.159.196.118 3 u 153 64 14 61.479 923.857
10.405
ntp.demon.co.uk .INIT. 16 u 1853 64 0 0.000 0.000
4000.00
ntp0.esat.net .GPS. 1 u 159 64 14 63.514 923.101
0.240
ntp1.innofactor .INIT. 16 u 789 64 0 0.000 0.000
4000.00
ntpq -c rv::
assID=0 status=c011 sync_alarm, sync_unspec, 1 event, event_restart,
version="ntpd 4.2.0a at 1.1190-r Thu Nov 3 20:21:32 GMT 2005 (1)"?,
processor="i686", system="Linux/2.6.13-gentoo-r3", leap=11, stratum=16,
precision=-20, rootdelay=0.000, rootdispersion=1249.335, peer=0,
refid=INIT, reftime=00000000.00000000 Thu, Feb 7 2036 6:28:16.000,
poll=6, clock=0xc72e082c.5a3161a1, state=1, offset=0.000,
frequency=0.000, noise=0.001, jitter=0.001, stability=0.000
_______________________________________________
Herefordshire mailing list
Herefordshire at mailman.lug.org.uk
http://mailman.lug.org.uk/mailman/listinfo/herefordshire
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
allpay.net Limited, Fortis et Fides, Whitestone Business Park, Whitestone, Hereford, HR1 3SE. Telephone: 0870 243 3434, Fax: 0870 243 6041. Website: www.allpay.net Email: enquiries at allpay.net
**********************************************************************
More information about the Herefordshire
mailing list