LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-25-2010, 04:16 AM   #1
skoinga
Member
 
Registered: May 2010
Posts: 87

Rep: Reputation: 0
Two questions about ntpdate


What is the right way to keep updated the time on a server?
Using ntpd daemon or ntpdate by crontab?

I've two server in two different locations.. I've used

Quote:
# ntpdate ntp1.ien.it
on both server, and the two times were staggered by ten minutes.
How is it possible?
Thankyou
 
Old 11-25-2010, 04:23 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
For your first issue, personally I would use daemon running instead of cron running the job. Running update using cron will run cron process in addition to your ntp as well increasing the load on your system.
 
Old 11-25-2010, 06:49 AM   #3
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,627

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
ntpdate vs ntpd

Configure and use ntpd to maintain the time. This is what ntpd is MADE for, while ntpdate is to test/report the time on a remote machine (and optionally set the local clock to match).

During boot, there may be some advantage in running ntpdate PRIOR to the ntpd startup so that the clock is correct when ntpd starts.

Just because you can drive a screw with a putty knife does not make it the right tool for the job. We often stop searching for solutions when we find one that works, but we SHOULD search to find the RIGHT tool. In this case you have two 'right' tools, but for different parts of the job.
ntpdate to set the clock once, ntpd to maintain time sync continuously.


I have no clue why ntpdate would leave any gap in the clock settings. Were it on my machines I would check the TZ updates and settings, and then the clock drift and offset settings.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
regarding ntpdate niaz_ph Linux - Newbie 1 01-12-2010 10:03 PM
ntpdate - ntpd czezz Solaris / OpenSolaris 6 09-02-2008 02:05 PM
ntpdate - ntpd czezz Solaris / OpenSolaris 1 08-27-2008 08:06 AM
NTPDATE -vs- NTPd? carlosinfl Linux - Networking 3 02-25-2007 02:05 PM
ntpdate configuration? introuble Debian 5 03-26-2006 12:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration