LinHES Forums
http://forum.linhes.org/

How to synchronize time?
http://forum.linhes.org/viewtopic.php?f=6&t=18255
Page 2 of 2

Author:  mjl [ Sun Oct 05, 2008 6:22 pm ]
Post subject: 

Hi,

Ya, sorry, should of mentioned that part. F1,F27 and several others don't come preloaded with ntpdate. Apt-get update then apt-get install ntpdate and you are good to go. :)

ntpd mainly does the "fine" tuning but it needs to be in the same ballpark to begin. I do believe if my understanding correct that over a very long period it will bring it into alignement.

Mike

Author:  neutron68 [ Sun Oct 05, 2008 8:55 pm ]
Post subject:  thanks for the clarification

Ah, I see. I performed all the apt-get steps and put the line into the bootmisc.sh file. I should be covered now.

Thanks very much for the clarificaiton. :)

Eric

Author:  neutron68 [ Wed May 06, 2009 5:42 pm ]
Post subject:  in R5.5

I've upgraded to R5.5 since my last entry.
I have a call to ntpdate into my /etc/init.d/bootmisc.sh file. (ntpdate -u pool.ntp.org), and I reboot once a week, so it should be run once a week.

Lately, I noticed that my recordings were starting about 30 seconds late.

I used ntpdate to resync the clock last night (May 5). (ntpdate -u pool.ntp.org)
My clock was about 40 seconds off.

Today (May 6), I just checked the ntp log (nano /var/log/ntpd) and the server has not made any log entries since May 2.

Then I checked to see if the ntp server was running (/etc/init.d/ntp status).
It was NOT running. I wonder why??
So, I just restarted it (/etc/init.d/ntp start).

Now, I'm thinking it would not be a silly idea to put a script to run ntpdate into the /etc/cron.daily/ folder!

As root, I just make a script and called it timesync and put it in the /etc/cron.daily folder. It contains the following:
Code:
#!/bin/sh
su ntpdate -u pool.ntp.org

I also did a "chmod 755 timesync" to make it executable.

Does that look correct?
Eric

Author:  alien [ Thu May 07, 2009 12:58 am ]
Post subject: 

In summary:

ntpd: background daemon that is supposed to be always running and making tweeks to keep the clock in sync. Since it is "always running", it will assume something is wrong and not update the clock if it is too far off.

ntpdate: command line tool to set the time according to the servers, no matter how far off it is.

BluesBrian's post above provides an excellent overview.

Author:  neutron68 [ Thu May 07, 2009 10:34 pm ]
Post subject:  yeah, I read those too

Hi Alien,

Yeah, I read those definitions and methods, too. The wiki article is suggesting that you use the crontab file to insert your cron job.

I'd like to put it in the cron.daily list of things to do. So, I'm looking for some validation of my execution.

:?: I assume it's legal to put jobs into the cron.daily and cron.weekly lists?


Eric

Author:  neutron68 [ Tue Feb 02, 2010 3:08 pm ]
Post subject:  working great in R5.5

This works great!

As root, I made a script, called it timesync and put it in the /etc/cron.daily folder.
I also did a "chmod 755 timesync" to make it executable.
It contains the following:
Code:
#!/bin/sh
ntpdate -u pool.ntp.org

Prior to doing this, the pc clock would drift farther than the stock Knoppmyth R5.5 time correction could correct. Thus the clock got farther and farther off.

Adding this cron job shores up the weakness in the ntpd program and keeps the time LOCKED ON! 8)

Cheers!
Eric

Page 2 of 2 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/