Execute the ntpdate command only when NTP daemon is stopped?

Hi,

Could somebody please explain me.
why is it necessary to execute the "ntpdate" command only when ntp daemon is stopped , and also the probabale solution to reduce the high offset value.

Thanks !!
Laxxi

Ntpdate adjusts the time on your system in one immediate correction. Ntpd is more subtle; it calculates your system clock drift and continuously adjusts it so that your system maintains more accurate time. Ntpd cannot handle a large clock skew, you need to use ntpdate for that.

1 Like

fpmurphy is rigth, I'm not sure about all the NTP versions, but, in my experience, any time difference more than 5 minutes will produce a ntpd synchronization fail, it will back to the LOCAL time, so, if you have more than this difference, you must to do a ntpdate before to start the ntpd daemon.

1 Like

From my experience, unless you are running an NTP server to synchronize your own devices against that reference (your NTP server) then, you are better off running ntpdate in a crontab to keep your time in sync.

On the other hand, if you are managing a large organization, then you should run one or more NTP servers in your organization and they all the devices and hosts within your organization should sync to your internal servers as a matter of policy.

There are many reasons for this. First of all, your internal devices will be closes in time-sync if the network-distance to their NTP servers are relatively the same. Second, it is better "net etiquette" to have a handful of devices (ntpd processes) sync with external time services versus every device in the organization.

Also, when external NTP servers change, it is only necessary to update the main time servers in a organization. There are more reasons, but you get the idea.

On the other hand, if you are not a member of a large (or even medium or smallish) organization and are just syncing your computer; then ntpdate is all you should ever need. Just run it in your cron files.

The most important thing, of course, is to insure you system clocks on all devices are in time sync, so your log files and process times are also in sync.

1 Like

OBTW, I forgot to mention, it is easy to install and run ntpd on debian / ubuntu systems; so if you don't want to run ntpdate in cron, just setup ntpd

As a side note, you cannot run ntpdate on a server that is already running ntpd ; ntpdate will check to see if a local version of ntpd is running, and if so, it will exit (in error).