Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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)
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.
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?
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.
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...)
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
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.