You are not logged in.

#1 2009-06-24 04:01:22

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

NTP - fyi

ntpdate stopped working after the update to 2.6.30.
reinstalling 'ntp' solved it.

For those that are not allready using ntpdate - there is no better way to keep your computer to the right time:

crontab -e

Then add the following to the end of the file:

09 * * * *  /usr/bin/ntpdate north-america.pool.ntp.org >/dev/null 2>/dev/null

If you don't live in Noth-America, you may use 'south-america', 'europe', 'asia', 'africa' or 'oceania' as prefix.
eg. europe.pool.ntp.org

Offline

#2 2009-06-24 06:48:47

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: NTP - fyi

Wrong - you are checking/setting/resetting the time only once per hour, rather than what the initscript should be doing:

1.  Run ntpdate once and ONLY once - at startup.
2.  Run ntpd as a daemon (the way that ntp is designed to work), so it continually ensures the PC's clock is accurate.

Offline

#3 2009-06-24 13:44:40

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: NTP - fyi

I know that - but unless you need split-second accuracy - this is more than sufficient and it saves the ntp-servers.

Offline

#4 2009-06-24 17:00:59

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: NTP - fyi

The common user hasn't a clue whether they'll need once-per-hour or better accuracy. They'll just be confused when the time seems to occasionally go crazy. So stick to the way ntp is designed, rather than this silly shortcut. NTP is designed to be a daemon, NOT run via crontab.

Offline

#5 2009-06-24 17:08:19

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: NTP - fyi

Also relevant: ntpdate will be retired, to be replaced by ntpd's -q option. See the man page for details.

Offline

#6 2009-06-24 19:03:58

blazercist
Member
Registered: 2009-01-18
Posts: 20

Re: NTP - fyi

OpenNTPD ftw!

Offline

#7 2009-06-24 19:06:24

theringmaster
Member
From: Air Force
Registered: 2007-07-16
Posts: 581
Website

Re: NTP - fyi

blazercist wrote:

OpenNTPD ftw!

+1

just install and start up the daemon


Check me out on twitter!!! twitter.com/The_Ringmaster

Offline

#8 2009-06-24 22:50:16

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,222
Website

Re: NTP - fyi

(Open)NTP should be run as a daemon, not crontabbed.

Offline

#9 2009-09-08 06:49:21

Cheifchimp
Member
From: Queensland Australia
Registered: 2009-05-07
Posts: 69

Re: NTP - fyi

This has lost me, my systems run for about 45 days between reboots (limited by the frequency of mains power outages) and over this period one system gains about 25 minutes, the other gains about 15 min.
Currently they re-sync at boot with the default configuration from install, I was looking at re-syncing at 12 or 24 hour intervals, what is the responsible way to achieve this result.

Offline

#10 2009-09-08 07:01:34

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: NTP - fyi

@Cheifchimp
Why don't you use openntpd? It works well and does not require you to open any firewall ports. You can also set one machine to act as an ntp server on your LAN for the others.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#11 2009-09-08 07:17:30

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,222
Website

Re: NTP - fyi

Cheifchimp wrote:

I was looking at re-syncing at 12 or 24 hour intervals, what is the responsible way to achieve this result.

Install and start OpenNTP which will run as a daemon and monitor your system time, adjusting when necessary.

Offline

#12 2009-09-08 07:28:07

Cheifchimp
Member
From: Queensland Australia
Registered: 2009-05-07
Posts: 69

Re: NTP - fyi

ah, hmm, didn't know it existed till I read this thread, I have installed it now and when I started it it pulled the clock back 6 minutes

Offline

Board footer

Powered by FluxBB