Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Hello,
I use the ntp daemon in my desktop PC, to keep my system in sync.
I'm not always connected... in these cases, ntp stops synchronizing. When running the command "ntpdc -p", I see that ntp is synchronizing only against localhost. This problem arises also when suspending the system, and then resuming.
Has anyone got some good suggestion to make ntp more error-resilient?
Obvious things could be using a cronjob to restart ntp, or controlling the output of "ntpdc" to check the list of servers... but maybe there's a more elegant solution
If you are not always connected, you surely have some mechanism to unconnect from the internet, maybe some script.
Just add a kill ntpd command to it (or use some script to stop the ntpd daemon), and restart ntpd when you connect again.
You need root privileges to run the ntpd daemon correctly.
Give more details if you want something more precise.
What happens if you do nothing? Doesn't ntpd just carry on synchronising to localhost until it can reach a time server? AFAIK that is the normal behaviour and probably "good enough" unless your hardware clock does not keep time well, in which case the only thing you can do to improve it is to ask ntpd to synchronise as soon as the Internet is connected.
Thanks for your replies.
berbae, my problem is that there are many reasons why I could be unconnected, and more than one way to become connected again. So, a script is not a very simple solution, as there are many points to check.
As of catkin's answer, I'll keep observing what happens... what do you mean with "ask ntpd to synchronise as soon as the Internet is connected"? By means of scripts attached to network connection events?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.