Can not make xntpd keep host time in sync ?
I have installed xntpd but it will not keep the time as expected. When restarting it though, it resets the time correctly. Other hosts are able to get current time from this host. There is no log data when ntp is running, only when it's started and stopped. Following is my /etc/init.d/ntp.conf file: ------------------------------------------------- #server 127.127.1.0 # local clock (LCL) #fudge 127.127.1.0 stratum 10 # LCL is unsynchronized ## ## Outside source of synchronized time ## ## server xx.xx.xx.xx # IP address of server server ntp1.tele.dk prefer server ntp.tiscali.dk restrict default ignore restrict 127.0.0.1 #restrict 127.0.0.1 nomodify restrict 192.168.0.0 mask 255.255.0.0 nomodify nopeer driftfile /var/lib/ntp/ntp.drift # path for drift file ------------------------------------------------- Any suggestions ? Thanks in advance Bo Jacobsen
On Tuesday 21 October 2003 12:19 pm, Bo Jacobsen wrote:
I have installed xntpd but it will not keep the time as expected. When restarting it though, it resets the time correctly. Other hosts are able to get current time from this host. There is no log data when ntp is running, only when it's started and stopped.
It's probably working. :-) Try this running 'ntpq', and look at your "peers" list; it should give you a list of machines that it's in current contact with. I think that xntpd is pretty quite while it's running; it just does it's thing. nleroy@host:~> /usr/sbin/ntpq ntpq> peers remote refid st t when poll reach delay offset jitter ============================================================================== caesar.xx.xxxx. xxx.xx.xxxx.edu 16 u 7d 1024 0 0.000 0.000 4000.00 taylor.xx.xxxx. xxx.xx.xxxx.edu 16 u 7d 1024 0 0.000 0.000 4000.00 dr-zaius.xx.xxx xxx.xx.xxxx.edu 16 u 7d 1024 0 0.000 0.000 4000.00 -Nick -- /`-_ Nicholas R. LeRoy The Condor Project { }/ http://www.cs.wisc.edu/~nleroy http://www.cs.wisc.edu/condor \ / nleroy@cs.wisc.edu The University of Wisconsin |_*_| 608-265-5761 Department of Computer Sciences
On Tuesday 21 October 2003 12:33 pm, Nick LeRoy wrote:
On Tuesday 21 October 2003 12:19 pm, Bo Jacobsen wrote:
I have installed xntpd but it will not keep the time as expected. When restarting it though, it resets the time correctly. Other hosts are able to get current time from this host. There is no log data when ntp is running, only when it's started and stopped.
It's probably working. :-) Try this running 'ntpq', and look at your "peers" list; it should give you a list of machines that it's in current contact with. I think that xntpd is pretty quite while it's running; it just does it's thing.
Actually, the ntpq output that I showed looks funky; I'm not sure what's wrong. Here's a more typical and valid output: ntpq> peers remote refid st t when poll reach delay offset jitter ============================================================================== +caesar.xx.xxxx. ben.xx.xxxx.edu 2 u 29 1024 377 0.372 -7.583 0.117 *taylor.xx.xxxx. ben.xx.xxxx.edu 2 u 803 1024 377 0.421 0.266 0.071 +dr-zaius.xx.xxx ben.xx.xxxx.edu 2 u 869 1024 377 0.376 0.354 0.127 The machine with the "*" is the one that it's currently "in sync" with, IIRC. -Nick -- /`-_ Nicholas R. LeRoy The Condor Project { }/ http://www.cs.wisc.edu/~nleroy http://www.cs.wisc.edu/condor \ / nleroy@cs.wisc.edu The University of Wisconsin |_*_| 608-265-5761 Department of Computer Sciences
----- Original Message ----- From: "Nick LeRoy" <nleroy@cs.wisc.edu> To: "Bo Jacobsen" <subs@systemhouse.dk>; <suse-linux-e@suse.com> Sent: Tuesday, October 21, 2003 7:33 PM Subject: Re: [SLE] Can not make xntpd keep host time in sync ?
On Tuesday 21 October 2003 12:19 pm, Bo Jacobsen wrote:
I have installed xntpd but it will not keep the time as expected. When restarting it though, it resets the time correctly. Other hosts are able to get current time from this host. There is no log data when ntp is running, only when it's started and stopped.
It's probably working. :-) Try this running 'ntpq', and look at your "peers" list; it should give you a list of machines that it's in current contact with. I think that xntpd is pretty quite while it's running; it just does it's thing.
The problem is that is't not working. On all the machines it runs on the time is drifting. It drifts differently on all machines. On some it drifts a few seconds a months, on the worst hosts, it can be something like 5 to 10 minuts. If I restarts xntpd, it resets the time correctly, but thereafter it drifts slowly again. Bo
Try using an IP address instead of a hostname. -- SuSE Linux 8.2 (i586) Linux 2.4.20-4GB-athlon
Try using an IP address instead of a hostname. -- SuSE Linux 8.2 (i586) Linux 2.4.20-4GB-athlon
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
I could do that but it's not a long term solution as the timeserver locations could change. Besides xntpd can actually see the peers (when it's restarted). Bo
On Tuesday 21 October 2003 09:19, Bo Jacobsen wrote:
I have installed xntpd but it will not keep the time as expected. When restarting it though, it resets the time correctly. Other hosts are able to get current time from this host. There is no log data when ntp is running, only when it's started and stopped.
Following is my /etc/init.d/ntp.conf file: ------------------------------------------------- #server 127.127.1.0 # local clock (LCL) #fudge 127.127.1.0 stratum 10 # LCL is unsynchronized
## ## Outside source of synchronized time ## ## server xx.xx.xx.xx # IP address of server
server ntp1.tele.dk prefer server ntp.tiscali.dk
restrict default ignore restrict 127.0.0.1 #restrict 127.0.0.1 nomodify restrict 192.168.0.0 mask 255.255.0.0 nomodify nopeer
I'd give it several more peers, and some perhaps at a higher stratum. Also you should have your local clock in there as the time keeper of last resort... Here's my file, and Its been utterly reliable.... ## ## 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 (LCL) fudge 127.127.1.0 stratum 10 # LCL is unsynchronized ## ## Outside source of synchronized time ## ## server xx.xx.xx.xx # IP address of server server ntp.gci.net # ntp.gci.net server time-a.nist.gov server nist1.datum.com server nist1.aol-ca.truetime.com server ntp.nasa.gov # ntp.nasa.gov server time.nist.gov server utcnist.colorado.edu server ntp-ua.usno.navy.mil # U.A. Fairbanks ## ## Miscellaneous stuff ## driftfile /etc/ntp.drift # path for drift file logfile /var/log/ntp # alternate log file -- _____________________________________ John Andersen
How about adding a line like this to the cron and run it atleast every night 0 0 * * * ntpdate time.server.com -- Asif Iqbal http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x8B686E08 There's no place like 127.0.0.1 On Tue, 21 Oct 2003, John Andersen wrote:
On Tuesday 21 October 2003 09:19, Bo Jacobsen wrote:
I have installed xntpd but it will not keep the time as expected. When restarting it though, it resets the time correctly. Other hosts are able to get current time from this host. There is no log data when ntp is running, only when it's started and stopped.
Following is my /etc/init.d/ntp.conf file: ------------------------------------------------- #server 127.127.1.0 # local clock (LCL) #fudge 127.127.1.0 stratum 10 # LCL is unsynchronized
## ## Outside source of synchronized time ## ## server xx.xx.xx.xx # IP address of server
server ntp1.tele.dk prefer server ntp.tiscali.dk
restrict default ignore restrict 127.0.0.1 #restrict 127.0.0.1 nomodify restrict 192.168.0.0 mask 255.255.0.0 nomodify nopeer
I'd give it several more peers, and some perhaps at a higher stratum. Also you should have your local clock in there as the time keeper of last resort...
Here's my file, and Its been utterly reliable.... ## ## 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 (LCL) fudge 127.127.1.0 stratum 10 # LCL is unsynchronized
## ## Outside source of synchronized time ## ## server xx.xx.xx.xx # IP address of server server ntp.gci.net # ntp.gci.net server time-a.nist.gov server nist1.datum.com server nist1.aol-ca.truetime.com server ntp.nasa.gov # ntp.nasa.gov server time.nist.gov server utcnist.colorado.edu server ntp-ua.usno.navy.mil # U.A. Fairbanks
## ## Miscellaneous stuff ##
driftfile /etc/ntp.drift # path for drift file
logfile /var/log/ntp # alternate log file
Bo Jacobsen wrote:
I have installed xntpd but it will not keep the time as expected. When restarting it though, it resets the time correctly. Other hosts are able to get current time from this host. There is no log data when ntp is running, only when it's started and stopped.
Following is my /etc/init.d/ntp.conf file: ------------------------------------------------- #server 127.127.1.0 # local clock (LCL) #fudge 127.127.1.0 stratum 10 # LCL is unsynchronized
## ## Outside source of synchronized time ## ## server xx.xx.xx.xx # IP address of server
server ntp1.tele.dk prefer server ntp.tiscali.dk
restrict default ignore restrict 127.0.0.1 #restrict 127.0.0.1 nomodify restrict 192.168.0.0 mask 255.255.0.0 nomodify nopeer
driftfile /var/lib/ntp/ntp.drift # path for drift file -------------------------------------------------
Any suggestions ?
Thanks in advance Bo Jacobsen
run ntpdq and check the peers What's the poll time on them? If it's 128 or higher then you at least reched them and have some synchronization going on. Check your firewalls, ntp runs on UDP, not typically TCP and that is not enabled in the SuSE Firewall script. I had a very strange problem that took years to develop. I originally configured a computer to use adjtimex to keep it's clock in sync. This is a pretty good job without ntp helping it for years. After three years, the slew of the internal clock changed and the adjtimex settings were off so much that I was drifting 0.2 seconds per minute. ntp couldn't compensate fast enough for this and I was continually getting log entries of 2.xx second shifts in the clock. Once I removed adjtimex everything settled down right away. Make sure you don't have on competing elements on the time keeping process.
participants (6)
-
Asif Iqbal
-
Bo Jacobsen
-
John Andersen
-
Jonathan Lim
-
Nick LeRoy
-
Tom Allison