LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   ntp safely on server, ntpdate? --debian (https://www.linuxquestions.org/questions/linux-server-73/ntp-safely-on-server-ntpdate-debian-4175414199/)

GreggT 06-30-2012 03:23 PM

ntp safely on server, ntpdate? --debian
 
I read through:
http://www.debian-administration.org/articles/25
http://forums.debian.net/viewtopic.php?t=36980

For obvious reasons you don't just want some script updating the time whenever it wants due to time-stamp usage in software

anyway, I have done the apt-get install ntpdate and I used the "ntpdate pool.ntp.org"

I wanted to know if this will be safe like ntp-simple was, and if it will be keeping my clock safely updated, and frequently. Or do I have to be running this constantly?
Does starting it once keep it running? - Would I have to start it at boot?

my systems clock falls behind, so after a month it'll be maybe 1 minute behind (it'll be 5:22PM and it will say 5:21PM) so I just want to be sure this will keep fixing it that 2 seconds per day or whatever it is losing.

michaelk 06-30-2012 04:03 PM

Yes, ntp is safe. In a nutshell it is a daemon that regularly updates the system clock and in the process adjusts for clock drift so it is accurate to milliseconds. ntp will only apply small corrections (except during initial start up). On the other hand ntpdate only updates time when executed and does not adjust for clock drift.

GreggT 06-30-2012 04:07 PM

Alright cool, so sounds like I'll want to do ntp / ntpd instead of ntpdate

http://www.cyberciti.biz/faq/debian-...-install-ntpd/

I'll probably follow this, if something is bad here let me know!

thanks for your help!

michaelk 06-30-2012 04:16 PM

Nope nothing bad, except depending on where you are in the world you will get better results if you pick a pool closer to your location.

http://www.pool.ntp.org/en/use.html

GreggT 06-30-2012 04:21 PM

Thanks, I pinged them earlier to see how far the debian subdomains were and it's in between 30-40ms, which is close enough for me :P

So default is looking good

I have 1 last question, what is the "dynamic" for at the end of "server 0.debian.pool.ntp.org iburst dynamic"

default just has iburst

the only thing it says in the conf is "please consider joining the pool: http://www.pool.ntp.org/join.html "




a few other tuts say to use dynamic also, I read something about default it scans every 5 minutes.. so is it saying by adding dynamic to the end you're making it check the DNS everytime it updates ntp instead of using the cached DNS?

michaelk 06-30-2012 05:14 PM

From what I know dynamic is an option if the computer is started without a network connection i.e. if using an encrypted WLAN. So after the network is established ntp will look up the names again. I have not played with the option to see if it actually works.


All times are GMT -5. The time now is 12:39 AM.