Solved

ntp.conf  101

Posted on 2004-04-20
7
1,601 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
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.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

771 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

11 Experts available now in Live!

Get 1:1 Help Now