On Wednesday 17 October 2001 14:13, Dave Sherohman spewed forth: > On Wed, Oct 17, 2001 at 10:44:50PM +0530, Raghavendra Bhat wrote: > > [Wed, Oct 17, 2001 at 09:36:38AM -0500] Dave Sherohman : > > > ntpdate sets the time to be correct now. > > > > ntpdate sets the system time after syncing with the time server. Now > > you have to update the hardware clock by doing a 'hwclock -w' before you > > do a reboot/halt. Have I gone wrong somewhere ? > > Slightly. Unlike date/rdate, it appears that ntpdate also updates > the hardware clock, so you don't need to use hwclock if you use > ntpdate. > > > > idea is that you run ntpdate at boot (or on installation) to make the > > > time correct, then run ntpd continuously to keep it correct. > > > > Do we have ntpdate symlinked in all run-levels ? > > It should be set up to run in all networked runlevels (2-5) by the > package's installer. > > > You mean to say that > > ntpdate should run before ntp ? > > Yes. ntpdate cannot run while ntpd is active because they both > listen on the same port. The debian ntpdate and ntp packages handle > this properly, by setting up the rc?.d symlinks such that ntpdate > runs first, then ntpd is started. > > > Do ntpdate and ntp read the same config > > file ie. /etc/ntp.conf ? > > No. ntpdate isn't that smart and needs to have its list of time > sources passed on the command line. To configure it, you have to > edit /etc/init.d/ntpdate and follow the instructions in the script's > comments.
Additional comment. ntpd on Server 'A' will not accept any time synchronization requests until it is satisfied it's got a reasonable time, then Computer 'B' will be able to synchronize with Server 'A'. After you run ntpdate and start ntpd -- wait a little while. If you need to know exactly how long - watch tcpdump for the ntp traffic to die down a little bit and then try it. I find 10 minutes is a very good number.