Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ntp.conf  101

Posted on 2004-04-20
7
Medium Priority
?
1,614 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
7 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 1200 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 400 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 400 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month11 days, 19 hours left to enroll

916 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