LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to make ntp run more often (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-make-ntp-run-more-often-759000/)

aga_nima 10-01-2009 11:05 AM

how to make ntp run more often
 
I was wondering how I can run ntp on my server every 5 minutes. I looked into ntpd, but was not very helpful.

Thnaks

eco 10-01-2009 11:09 AM

you could simply add the command into your cron tab but watch out, you might get black listed by the ntp server for hitting it too often.

sploot 10-01-2009 12:24 PM

If your clock is losing time over five minutes, you are having a much more serious problem. It should be the case that your clock will run fine for a period of days without any slip. I would say at most have your cron run ntp once a day.

You can do this by entering in a bash script to run ntp into your /etc/cron.daily/ or edit the crontab for your root user to have the script in it.

As eco said, if you run it too frequently you will get blocked from server access.

tredegar 10-01-2009 01:08 PM

Quote:

I looked into ntpd, but was not very helpful.
You don't say where you "looked".
But you do need to do some configuration, and do a little work for yourself. Try here for an introduction.

Just syncing with some ntp server every 5 minutes will probably get you blacklisted (you do not want that).

Welcome to LQ!

lutusp 10-01-2009 06:44 PM

Quote:

Originally Posted by aga_nima (Post 3703750)
I was wondering how I can run ntp on my server every 5 minutes. I looked into ntpd, but was not very helpful.

Thnaks

Please ask yourself how time syncing every five minutes could solve any real problem. Then ... tell us.

Ralfredo 10-02-2009 08:02 AM

Quote:

Originally Posted by aga_nima (Post 3703750)
I was wondering how I can run ntp on my server every 5 minutes. I looked into ntpd, but was not very helpful

I think there's some basic misunderstanding of how ntp is intended to be used in this thread. You don't tell ntp to sync every x minutes. You run the ntpd-daemon continously and let the daemon keep the clock in sync.

The daemon is configured to use several (five is a good starting point) time sources. The daemon decides for itself (within some limits) how often each source should be polled.

There's a ton of info written on this subject. Google is your friend...

aga_nima 10-05-2009 10:45 AM

Got it, Thanks guys


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