LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 07-12-2022, 02:48 PM   #1
Lorrie Haskell
LQ Newbie
 
Registered: Nov 2020
Posts: 3

Rep: Reputation: Disabled
NTP polling


Hi,

I would like all of my Linux servers to poll the NTP server every 10 minutes. Can someone tell me how to do that?

Thank you!
 
Old 07-12-2022, 03:27 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,691

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
ntp polling is based on power of 2. The default min poll is 6 which is 64 seconds i.e 2^6 and the max poll is 10 which is 1024 seconds i.e. 2^10. The value to 10 minutes (600 seconds) is 512 seconds i.e a poll value of 9.

ntp uses a complex algorithm to find the best polling interval and if your system clock is stable should eventually settle at the default of 1024 seconds. You can set minpoll 9 and maxpoll 9 for a particular server in the /etc/ntp.conf file. If your time server or network is not stable you might need a faster polling interval then 10 minutes to keep the system clock accurate.
 
Old 07-12-2022, 03:38 PM   #3
Lorrie Haskell
LQ Newbie
 
Registered: Nov 2020
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thank you for your reply. I set my minpool to 9 and my maxpool to 9 and now it is polling every 64 seconds.

Last edited by Lorrie Haskell; 07-12-2022 at 03:40 PM.
 
Old 07-12-2022, 03:50 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,691

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Please reread my post, as I understand how ntp works the polling interval is based on the power of 2

3 - 8 seconds
4 - 16 seconds
5 - 32 seconds
6 - 64 seconds
7 - 128 seconds
8 - 256 seconds
9 - 512 seconds
10 - 1024 seconds
and so on. There is no value for 600 seconds, Your closest choice is 9 i.e. 512 seconds.

Why do you think you need to change values? What problem are you trying to solve.
 
Old 07-12-2022, 03:58 PM   #5
Lorrie Haskell
LQ Newbie
 
Registered: Nov 2020
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hi,

Thank you for your response! I think my ntp.conf files are wrong....they had minpool and maxpool, instead of
minpoll and maxpoll.
 
Old 07-12-2022, 04:09 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,691

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
By the way, what problem are you trying to solve if any and why do you want to change the polling interval?
 
Old 07-19-2022, 10:36 PM   #7
elgrandeperro
Member
 
Registered: Apr 2021
Posts: 415
Blog Entries: 2

Rep: Reputation: Disabled
Better to run ntpdate with the -u option via cron. In cron you can specify every 10 minutes. One less process (ntpd) to worry about. I think the port is udp 123.

The only time your really want to run ntpd is serving time to other.
 
Old 07-20-2022, 04:18 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,691

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
The ntp daemon is both a client and a server. ntpdate via cron can keep the clock synchronized but it forces time jumps while ntpd keeps track of clock drift and slowly skews time which overall keeps better accuracy. The one downside is that ntpd expects the computer to connected to the internet.
 
  


Reply



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
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
NTP's ntp.conf pxumsgdxpcvjm Linux - Server 2 08-30-2007 09:34 PM
NTP cannot work with timeserver, NTP-d can jerryvapps Linux - Networking 0 08-04-2004 02:04 PM
NTP cannot use server, NTP -d can jerryvapps Linux - Newbie 0 07-28-2004 02:22 PM
NTP polling interval in Linux? oswald21 Linux - Networking 1 03-10-2003 03:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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