Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Running ntsysv on my CentOS terminal show both ntpd and ntpdate checked. Is it redundant to have both service to run at start-up?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

They do different things.

  • ntpdate is what you might consider "one shot mode". It runs once and updates the clock if it receives a response from the remote ntp server.
  • ntpd runs continuously and adjusts the clock slightly to account for drift and to stay in sync with the remote ntp server. ntpd (by default) will not make any adjustments greater than 2 seconds.

It's common to run ntpdate at system boot to ensure the clock is in sync and then run ntpd to keep it in sync. If for example when your computer boots, the clock is off by 3 seconds then ntpd would assume that it's too great a jump to adjust, and therefore do nothing. Your system would then drift even further out of sync.

share|improve this answer

The usual way is to run ntpdate before starting ntpd.

Ntpdate is not a service, but a command that sets the time from an ntp server. Then ntpd keeps the time synchronized. The reason for doing this is that ntpd exits if the time difference is too great.

share|improve this answer
    
Well ntpdate is listed among the services on ntsysv –  MegaNairda Jul 4 '12 at 7:44
    
I would guess that they wrapped a service around it to ensure that it runs before ntpd, but after the networking services it needs. –  fstx Jul 4 '12 at 14:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.