OK, So what you people say is : 1. Run "ntpdate" during startup only once 2. After that, keep time with ntpd Right ? Regards, spyros ---- "I merely function as a channel that filters music through the chaos of noise" - Vangelis
On Sun, 8 May 2011 11:07:04 +0100 (BST) Spyros Tsiolis <stsiol at yahoo.co.uk> articulated:> So what you people say is : > > 1. Run "ntpdate" during startup only once > 2. After that, keep time with ntpdAs I posted earlier using the technique I showed, on a FreeBSD system, there would be absolutely no reason to do so; however, I cannot vouch for that on other systems. -- Jerry ? Dovecot.user at seibercom.net Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the Reply-To header. __________________________________________________________________
On Sun, May 08, 2011 at 06:45:01AM -0400, Jerry wrote:> On Sun, 8 May 2011 11:07:04 +0100 (BST) > Spyros Tsiolis <stsiol at yahoo.co.uk> articulated: > > > So what you people say is : > > > > 1. Run "ntpdate" during startup only once > > 2. After that, keep time with ntpd > > As I posted earlier using the technique I showed, on a FreeBSD system, > there would be absolutely no reason to do so; however, I cannot vouch > for that on other systems.Right. As for running ntpdate, the years have passed and the debian manual now says: -g Normally, ntpd exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that, ntpd will exit with a message to the system log. This option can be used with the -q and -x options. -q Exit the ntpd just after the first time the clock is set. This behavior mimics that of the ntpdate program, which is to be retired. So, ntpdate is to be retired. In boot scripts either simply run ntpd -g or, probably better: ntpd -gqx ntpd In FreeBSD, AFAICS, setting ntpd_enable="YES" # Start time server ntpd_sync_on_start="YES" # Synchronize on start in /etc/rc.d corresponds to the second of the two, at least as of FreeBSD 6.4, since before 6.4 the -x was apparently missing, which would not correct big offsets, see: http://lists.freebsd.org/pipermail/freebsd-bugs/2009-March/034439.html
On Dom, 2011-05-08 at 11:07 +0100, Spyros Tsiolis wrote:> OK, > > So what you people say is : > > 1. Run "ntpdate" during startup only once > 2. After that, keep time with ntpd > > Right ? >Right, that ensures that time is correct (ntpdate run at startup) and that it is kept correct without the clock going back (ntp running as daemon). -- Jose Celestino | http://japc.uncovering.org/files/japc-pgpkey.asc ---------------------------------------------------------------- "Assumption is the Mother of Screw-Up" -- Mr. John Elwood Hale
On 5/8/2011 5:07 AM, Spyros Tsiolis wrote:> OK, > > So what you people say is : > > 1. Run "ntpdate" during startup only once > 2. After that, keep time with ntpd > > Right ?Yes, or run ntpd with the -g option. You don't want to use the -x option (as some might have suggested) as that can cause ntpd to take up to 2 weeks to synchronize the time. Detailed ntp setup is OT for this list, but make sure your ntp.conf lists at least three servers. Typically the ntp.org pool servers will work fine, eg. server 0.uk.pool.ntp.org server 1.uk.pool.ntp.org server 2.uk.pool.ntp.org server 3.uk.pool.ntp.org Then once in a while make sure ntp is running and syncronised. I like "ntpq -p" which will show the peerlist with a "*" next to the current master. ntpd works best on a long-running server, and typically shouldn't be used on a virtual server. Virtual environments have their own time service. -- Noel Jones
On 5/8/2011 5:07 AM, Spyros Tsiolis wrote:> > OK, > > So what you people say is : > > 1. Run "ntpdate" during startup only once > 2. After that, keep time with ntpd > > Right ?When running ntpd don't run ntpdate at startup, or any time. Use one or the other, not both (if you incorrectly use both, ntpdate will throw off drift calculations in ntpd). This is the proper setup for bare metal hosts. I didn't pay attention to earlier posts in this thread. So, if you're talking about a guest running inside a virtual machine then the setup is entirely different, and may vary depending on your underlying hypervisor and other factors. -- Stan
Spyros wrote> OK, > > So what you people say is : > > 1. Run "ntpdate" during startup only once > 2. After that, keep time with ntpd > > Right ?https://support.ntp.org/bin/view/Support/StartingNTP4 says: - Start ntd as early as possible - - "ntpd -g ..." is better than "ntpdate ... ; ntpd ..." - Wait before starting time-sensitive services - - As last as possible in the boot sequence, run 'ntp-wait -v', and start time-sensitive services after it successfully returns. I'm fairly certain the above is excellent advice, and BCP. H