Solved

ntp.conf  101

Posted on 2004-04-20
7
1,602 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 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
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.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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 get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

867 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now