What's new

NTP Daemon for ASUSWRT/Merlin

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

@Jack Yaz , FYI the following is in syslog and may or may not be of importance.
Code:
Mar 18 06:32:07 ntpd[2503]: restrict: 'monitor' cannot be disabled while 'limited' is enabled
 
@Jack Yaz , FYI the following is in syslog and may or may not be of importance.
Code:
Mar 18 06:32:07 ntpd[2503]: restrict: 'monitor' cannot be disabled while 'limited' is enabled
Not seeing that here, only error I'm seeing is due to leap file

EDIT: sorry, I've seen it in syslog now (was checking ntp.log)
 
I bounced ntpd (stop | start) and did receive it again too.
 
No worries.


Sent from my iPhone using Tapatalk
1.0.6 addresses this. Since the new functions aren't available in 1.0.5, you either need to run uf to force an update (including conf files) or wait for when 1.0.7 is released

I had some time before work :)
 
One question, with this NTP daemon, syslog will always have the correct time?
NTP server will have the same issues as NTP client as far as end user time
  • There is no hardware clock in the router
  • Cannot correct the time before it is started on router reboot
  • Cannot correct the time before it can DNS lookup Internet time servers on router reboot
  • Localization must be correct
  • Daylight Saving settings must be correct
 
Also fixed with 1.0.6 (use option uf in menu after update)
My ntp.conf suggestion had included "limited" and "kod" in the default restrict arguments. These are recommended by ntp.org. However, since "monitor" is disabled, "limited" and "kod" should be removed.
Code:
#
logfile /opt/var/spool/ntp/ntp.log
driftfile /opt/var/spool/ntp/ntp.drift
leapfile /opt/var/spool/ntp/leap-seconds.list # https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list
#
restrict default nomodify notrap nopeer noquery # restrictive default IPv4
restrict -6 default nomodify notrap nopeer noquery # restrictive default IPv6
restrict source nomodify notrap noquery # required for pool directive if using restrictive default permissions
restrict 127.0.0.1 # permissive localhost IPv4
restrict -6 ::1 # permissive localhost IPv6
#
interface ignore wildcard
interface listen br0
#
disable monitor auth stats
#
pool pool.ntp.org iburst
#
EDIT: Or you could remove disable stats as Jack has done!
 
Last edited:
So who would like to give this a go?

https://github.com/jackyaz/ntpdMerlin

Tested on my RT-AC86U, all seems fine. I've done everything except a reboot (wife using the internet). I've uninstalled and installed the script several times with no complaints, so I'm quite confident there won't be any problems.

IMPORTANT: Requires Entware (I haven't coded a requirements check for install just yet)

REQUIRES Entware? Just to clarify - github says otherwise...or have you been so busy writing code to update the github?

(and looking at the timestamps of your posts, clarify this for me too, please: you DO sleep occasionally, right?)
 
REQUIRES Entware? Just to clarify - github says otherwise...or have you been so busy writing code to update the github?

(and looking at the timestamps of your posts, clarify this for me too, please: you DO sleep occasionally, right?)
Entware is required
Code:
Menu_Install(){
        opkg install ntp-utils
        opkg install ntpd
        opkg install rrdtool
 
yes indeed it is...thank you, I missed that prior to my 2nd cuppa joe
In the past the binaries may have been custom compiled, so Entware could have been optional. Now Jack is using the Entware builds. So perhaps the reference in the Github readme should be removed.
 
In the past the binaries may have been custom compiled, so Entware could have been optional. Now Jack is using the Entware builds. So perhaps the reference in the Github readme should be removed.
that's what I was getting at in my initial query...but Jack deserves to get some sleep every so often, and he does have a day job and wife, so it'll get fixed when it gets fixed. at least we here all now know.
 
Question for jackYaz:

Because of the killall ntp I have the following message on my RT-AX88U:
* Reminder: The system time has not been synchronized with an NTP server.


I don't know if this is a problem or just a check if system ntp is running and couldn't get the time.
Please advise.
 

Attachments

  • picture.JPG
    picture.JPG
    93 KB · Views: 298
Question for jackYaz:

Because of the killall ntp I have the following message on my RT-AX88U:
* Reminder: The system time has not been synchronized with an NTP server.


I don't know if this is a problem or just a check if system ntp is running and couldn't get the time.
Please advise.
Why do think "killall ntp" is the cause?
 
Because if I don't use killall ntp I don't get that message.
What is the output on your router of the following?
Code:
# ntpq -p
# cat /etc/TZ
# nslookup 0.pool.ntp.org
 
Code:
# ntpq -p:

remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+mail.pushto.spa 193.67.79.202    2 u   73   32  374   23.066   -1.200   2.031
+x.ns.gin.ntt.ne 249.224.99.213   2 u  412 1024    1   11.960    0.946   0.629
*ntp1.trans-ix.n 211.207.249.90   2 u    9   32  327   13.107    0.690   0.573
-ntp1.mediamatic 30.20.35.61      2 u  442  512    1   12.273    1.039   1.664


# cat /etc/TZ:

MEZ-1DST,M3.5.0/2,M10.5.0/3


# nslookup 0.pool.ntp.org:

Server:    127.0.0.1
Address 1: 127.0.0.1 localhost.localdomain

Name:      0.pool.ntp.org
Address 1: 95.211.212.5 videolulz.com
Address 2: 94.228.220.14 mon2.hostin.cc
Address 3: 171.33.132.5 static.ip-171-33-132-005.signet.nl
Address 4: 91.148.192.49 sip.dicode.nl

I have now the killall ntp disabled.
 
Last edited:
REQUIRES Entware? Just to clarify - github says otherwise...or have you been so busy writing code to update the github?

(and looking at the timestamps of your posts, clarify this for me too, please: you DO sleep occasionally, right?)
Is this the kvic github page? Technically the original implementation required entware since it uses rrdtool and also relied on /opt existing
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top