LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-01-2009, 11:05 AM   #1
aga_nima
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Rep: Reputation: 0
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
 
Old 10-01-2009, 11:09 AM   #2
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
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.
 
Old 10-01-2009, 12:24 PM   #3
sploot
Member
 
Registered: Sep 2009
Location: Phoenix, AZ
Distribution: Gentoo, Debian, Ubuntu
Posts: 121

Rep: Reputation: 27
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.
 
Old 10-01-2009, 01:08 PM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
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!
 
Old 10-01-2009, 06:44 PM   #5
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by aga_nima View Post
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.
 
Old 10-02-2009, 08:02 AM   #6
Ralfredo
LQ Newbie
 
Registered: Mar 2009
Posts: 17

Rep: Reputation: 0
Quote:
Originally Posted by aga_nima View Post
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...
 
Old 10-05-2009, 10:45 AM   #7
aga_nima
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Got it, Thanks guys
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Want to make local NTP server for Linux Debian SimonTHK Linux - Server 1 09-24-2009 05:13 AM
ntp drift file in /etc/ntp instead of /var/lib/ntp - suggestion for a patch in Slack niels.horn Slackware 16 05-07-2009 07:35 PM
problem getting ntp to run properly kaplan71 Linux - Networking 2 01-08-2009 01:18 PM
getting ntp to run upon boot 00 noob Linux - Server 6 06-26-2007 07:36 AM
How do I make a simple script and make it run on bootup?? coolblue Programming 5 12-18-2006 09:55 PM


All times are GMT -5. The time now is 11:02 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration