On Thu, May 05, 2011 at 07:54:50PM +0100, Spyros Tsiolis wrote:
Seriously ?
Yes, Timo was (of course) both serious and correct.
ntpdate takes one or more NTP servers as parameters, and sets your server's time to match that of the NTP servers. That may well cause a jump, even a massive jump.
ntpd takes a list of NTP servers in its configuration file, and uses them to make continual small adjustments. I seem to remember that in some cases it is even capable of adjusting the speed of your system clock according to its measurements. If the difference is too great it will refuse to function and exit with an error.
The usual way is to run ntpdate with -b option once at boot (just after the network comes up and long before things like dovecot and MTAs get started), and then start up ntpd.
The other way is to run ntpdate frequently, against an NTP server you trust. It's not as good, but sometimes there may be objections against running daemons, and if you're aiming at a well-behaved NTP server the jumps should be minimal.
When running ntpd, the essential thing is to check that it's actually doing its job. You do that with the command "ntpdc". That will drop you to a prompt. The essential commands are
sysinfo
peers
server x.x.x.x
sysinfo
quit
sysinfo should give your stratum as somwhere between 3 and 5 (if it's less you're probably doing something wrong, and if it's 16 you're not synchronized). peers should give one * sign in the first column and some number of + signs.
After that overview, man ntpdate, man ntpd, and google :-)
HTH.