Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 02-03-2003, 12:52 AM   #1
Registered: Jan 2003
Location: Texas
Distribution: Libranet 8.1, Slackware 9
Posts: 107

Rep: Reputation: 15
Question Synching clock to standard time

I've been trying to figure out, all day, how I can sync my computer's clock to the nist time servers. This was really easy to do on Redhat 8, but it isn't so easy on Slackware. Been combing through the documentation for ntpd for as much time as I can spare, and have come up with nothing.

My clock keeps getting knocked off, for some reason, and I'd like to be able to sync it with an atomic clock. (It also probably has something to do with the fact that I'm a scientist, and I like exactness as much as possible.)

Any help would be greatly appreciated.

Running on pure Slack.
Old 02-03-2003, 07:57 AM   #2
Senior Member
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Ubuntu
Posts: 1,180

Rep: Reputation: 46
Well, ntpd is the correct program for continous clock sync to an external time server. It runs as a background daemon. If you desire to set the clock only once like at boot then ntpdate can be used. This could also be setup as a cronjob like every 12 hours, etc.


Once ntpd is running the above command cannot function. So if you want to do an initial sync when first booted then use the above and then start the ntpd daemon. I usually use the /etc/rc.d/rc.inet2 script at the end to place the desired commands. It has to be after networking has been been started, but rc.local can be used as well.

As for ntpd, it requires a conf file in /etc. It is called ntp.conf that needs to be created or edited. It contains the name of servers to sync with. Like

server another.time.clock
driftfile /etc/ntp/ntp.drift

The driftfile will just contain a negative or positive number that it uses to adjust the clock as required. To create it; "touch /etc/ntp/ntp.drift" should create an empty file. You should then be able to run ntpd and view the messages file for several minutes to watch the activity. (tail -f /var/log/messages) It should post info regarding it is synced or lost sync.

I personally use both methods depending on what it is I am setting up. One local server running ntpd on a network can be a time server for the other machines on the network. Help reduce the load on the public time servers. Also, carefull listing servers from different sources. I have seen some very minor time differences, perhaps from the delay calcs, that keeps ntp resyncing back and forth loosing sync. Another reason to use one local time server to serve your other machines as well.

Hope it helps.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Various clock issues: Clock shows wrong time only in Knoppmyth, & CMOS time change ? davidbix General 1 04-05-2006 10:58 PM
sending data to standard out and to a text file at the same time. liguorir Linux - Software 1 08-23-2005 01:14 PM
Clock keeps going out of time linksocc Linux - General 10 10-01-2003 09:05 AM
Mandrake time clock descentx13 Linux - General 2 05-27-2002 08:42 PM
time clock jimval7 Linux - Distributions 2 03-21-2002 04:04 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:34 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration