LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 08-05-2002, 09:36 PM   #1
rasejo
LQ Newbie
 
Registered: Aug 2002
Posts: 29

Rep: Reputation: 15
Question clock synchronization


Hello,

how can i synchronize linux server clocks? It said that I need a time server, where can i get one? Is it possible to synchronize them without the time server?
 
Old 08-06-2002, 01:15 AM   #2
Ionized
Member
 
Registered: Jul 2002
Location: Chicago Suburbs
Distribution: Slackware 8.0
Posts: 51

Rep: Reputation: 15
you can use NTP. It's available....somewhere, just look for it. You can then use
ntpdate ntp.server.whatever
to update your clock to the current time.
 
Old 08-06-2002, 01:30 AM   #3
naz
Member
 
Registered: Aug 2002
Location: Malaysia
Distribution: RedHat
Posts: 58

Rep: Reputation: 15
You can use xntpd to keep all your linux server clocks synchronised, just slave all of them to one master server in your cluster - in turn, slave this "master" server to a public NTP server (your hosting provider or ISP should have one, if not just google for it)

naz
 
Old 08-06-2002, 03:57 AM   #4
rasejo
LQ Newbie
 
Registered: Aug 2002
Posts: 29

Original Poster
Rep: Reputation: 15
thanks for your reply, naz and Ionized.
How can I make a master linux server.
 
Old 08-06-2002, 01:10 PM   #5
Ionized
Member
 
Registered: Jul 2002
Location: Chicago Suburbs
Distribution: Slackware 8.0
Posts: 51

Rep: Reputation: 15
xntp (if I'm not misstaken) is used as a daemon to constantly update your clocks. I believe he's saying to use xntpd on the other linuc machines, use them to update from one "master" linux machine you have, and in turn have that "master" machine update from an external NTP source. There are many public ntp time servers out there, just search for them.
 
Old 08-07-2002, 09:16 PM   #6
rasejo
LQ Newbie
 
Registered: Aug 2002
Posts: 29

Original Poster
Rep: Reputation: 15
thanks for the reply Ionized.

yes, i have found many ntp time servers. and i was able to update the time by ntpdate. i have also read that it was preferable to run the ntpdate once and a while than to run the xntp daemon. but doing this, i could not make a master server right?
 
Old 08-07-2002, 09:19 PM   #7
rasejo
LQ Newbie
 
Registered: Aug 2002
Posts: 29

Original Poster
Rep: Reputation: 15
I also tried running the ntpd daemon, but i was not able to my client to the server running the daemon.
 
Old 08-07-2002, 11:16 PM   #8
Ionized
Member
 
Registered: Jul 2002
Location: Chicago Suburbs
Distribution: Slackware 8.0
Posts: 51

Rep: Reputation: 15
Well, I've never setup a time server myself with ntp or xntp. It seems that linux is it's own server in itself, because I have used window's "net time" to set my windows clock from the linux server's.
 
Old 08-08-2002, 09:17 PM   #9
rasejo
LQ Newbie
 
Registered: Aug 2002
Posts: 29

Original Poster
Rep: Reputation: 15
I just tried to schedule my linux to update its time using ntpdate and cron/at. but doesn't seems to work.
 
Old 08-08-2002, 10:38 PM   #10
Ionized
Member
 
Registered: Jul 2002
Location: Chicago Suburbs
Distribution: Slackware 8.0
Posts: 51

Rep: Reputation: 15
Well, like I said, I've done time updates from a windows machine to a linux machine, but not linux->linux. I *think* ntp should work though...check to make sure your ports are open on your server computer (port 34 is Time, port 123 is NTP. I dunno if you need both or not...)
 
Old 08-09-2002, 12:02 AM   #11
rasejo
LQ Newbie
 
Registered: Aug 2002
Posts: 29

Original Poster
Rep: Reputation: 15
ok thanks Ionized
 
Old 08-09-2002, 05:50 AM   #12
mikek147
Member
 
Registered: Mar 2002
Location: Elyria, Ohio
Distribution: Debian, Nothing else required
Posts: 141

Rep: Reputation: 15
Depending on how big your network is, one way to handle the time synchronization across all your machines is to have one Linux box run ntpd. This will setup you box to periodically go out to the internet time servers and slowly slew the time on you box to the correct time. Then broadcast the time on the local net, acting as a local time server. The broadcasting of the time can cut down on network activity if you have allot of systems that need synchronization.

As far as using ntpdate, this does work. However, when correcting the time on the host, it makes the difference adjustment in one big jump. On some systems, this jump, forward or backward in time, may not be desirable.

To set yourself up to use ntpd, just add to /etc/ntp.conf:

server ntp2.cs.wisc.edu
server ntp.ucsd.edu
server ntp1.cs.wisc.edu

I use the above servers due to the short response time between them and my server. To set your system up as a broadcast server, make sure you have ntp-doc installed. ntp-doc has all the particulars on setting up ntpd. -mk
 
Old 07-12-2007, 07:53 PM   #13
shogun1234
Member
 
Registered: May 2004
Posts: 167

Rep: Reputation: 15
I have a question. Are there any way to synchronize clock without using NTP?

My problem is I need to run several machines simultaneously. Each machine has its own clock and they are different. I do not need to update the hardware clock. So what I need is the algorithm of obtaining the time stamp of each machine involved in the tasks and calculating the offset from the machine chosen as the standard time server. Then my programme is able to compensate the time stamp correctly.

Is there any open source software doing such kind of tasks without root privilege (I have no root privilege to the machines I need to perform my tasks)? Or I have to write the code myself?

I appreciate any suggestion. Thank you very much.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System clock correct, hardware clock wrong karlovac Linux - General 5 01-16-2009 08:19 PM
Various clock issues: Clock shows wrong time only in Knoppmyth, & CMOS time change ? davidbix General 1 04-05-2006 10:58 PM
system clock,hardware clock varunbihani Linux - Newbie 2 07-23-2005 10:04 AM
email synchronization (not file synchronization) Moebius Linux - Software 6 10-05-2004 06:31 AM
Dot Clock / Pixel Clock Freaksta Linux - Hardware 1 05-05-2004 09:21 PM


All times are GMT -5. The time now is 10:17 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration