Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ntp.conf  101

Posted on 2004-04-20
7
Medium Priority
?
1,613 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 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
Not sure which OpenStack Certification to get?

So you’ve realized you might want to get certified in OpenStack, but you’re not sure what the benefits might be or even which one you should take. You know there are several certification courses you can choose from, but how do you know which one is right for you?

 
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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

721 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