Solved

ntp.conf  101

Posted on 2004-04-20
7
1,610 Views
Last Modified: 2013-12-15
My computer clock is off under slackware linux.  I edited my /etc/ntp.conf and put in a good timeserver name.    I started ntpd and the time does not migrate to the correct time ( it is 24 minutes off).  

I also use a Nat router.  My time zone is the same as Florida.  

I do not think the issue is with the Nat router.  It allows everything out!  

Different configurations in the config file  did not work.  The one that was most likely to work was the default and just changed the server name.

I have tried two servers.  If you know a decent server for the florida time zone, I can use any of them.  This is a "Just for fun" box.

timfox123  
0
Comment
Question by:TIMFOX123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 300 total points
ID: 10870893
A clock error of 24 minutes is more than 1000 seconds and NTP won't attempt to adjust the clock with that much error. That's easily fixed by stopping ntpd and executing 'ntpdate my-time-server-IP', which will do an immediate update of the clock. That will also tell you whether or not the time server IP you are using is valid and accessible. Once the clock is set via ntpdate you can start ntpd and it should keep the clock in sync.

You can see what's happening with ntpd by executing ntpq and checking status, like:

chimera> ntpq
ntpq> peers
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*wormhole.xxxx Tick.UH.EDU      2 u   84 1024  377    1.238    0.993   0.148
 LOCAL(0)        LOCAL(0)        10 l   39   64  377    0.000    0.000   0.004
ntpq> assoc
ind assID status  conf reach auth condition  last_event cnt
===========================================================
  1 61284  9634   yes   yes  none  sys.peer   reachable  3
  2 61285  9034   yes   yes  none    reject   reachable  3
ntpq>

The "*" next to the first line in the "peers' display shows that server to be in use as a master time keeper.
0
 
LVL 44

Assisted Solution

by:Karl Heinz Kremer
Karl Heinz Kremer earned 100 total points
ID: 10872733
I actually run the ntpdate <time server> command before I start the ntp daemon. This way, the ntpd process will always be able to keep the clock in sync.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 10872738
I meant to say I run both commands in my /etc/init.d/ntpd script so that ntpdate is always executed before ntpd is started.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 40

Expert Comment

by:jlevie
ID: 10872972
I don't know if slackware has the concept, but a RedHat box will attempt to run ntpdate from IP's found in /etc/ntp.conf/step-tickers with the ntpd service starts. You can list more than one IP in that file and they will be tried in sequence until one works.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 10873020
SuSE does something similar. It's controlled with the XNTPD_INITIAL_NTPDATE variable in /etc/sysconfig/xntp. It can either check all servers, or the first n servers in the list.
0
 
LVL 4

Assisted Solution

by:bobgunzel
bobgunzel earned 100 total points
ID: 10887156
This should do (ntp.conf) after manually setting the time approximately correct:

server      ntp0.nl.net   # or any other server from http://www.eecis.udel.edu/~mills/ntp/servers.html
server      127.127.1.0      # local clock
fudge      127.127.1.0 stratum 10      
driftfile /etc/ntp/drift
multicastclient                  # listen on default 224.0.1.1
broadcastdelay      0.008


Bob Gunzel
0
 

Author Comment

by:TIMFOX123
ID: 10888767
You guys have been great.  After working this issue on and off for about a year, I sent the clock within 2 minutes and now it has updated to the second on it's own.   This is great.

jlevie:

I think I need to put you on my christmass card list.  You surely have answered alot of my questions.  We have spoke and you do have a very impressive background.   Thanks again.

Thank you all.    You all have been great!!!!

Regards;

timfox123
0

Featured Post

Linux Academy Android App Now Supports Chromecast

We have some fantastic news for our Android fans. We’re so excited to announce that the Linux Academy Android app is now available with Chromecast support. That’s right – simply download the latest update of the Linux Academy App and start casting your favorite course videos!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question