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!

For anyone who updates their Entware - please use option uf at the menu

I'm going to add in a check on menu start to make sure N77ntpd matches in a future version
 
Here is an interesting file in ntpd_4.2.8p12-2_aarch64-3.10.ipk
I am not familiar with hotplug.d but it appears to be called procd now
Code:
# cat /opt/etc/hotplug.d/iface/20-ntpd
NAME=ntpd
CONFIG=/opt/etc/ntp.conf
COMMAND=/opt/sbin/$NAME

[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && {
        [ -x $COMMAND ] && [ -r $CONFIG ] && {
                killall ntpd
                /opt/etc/init.d/S77ntpd start
        } &
}
 
Last edited:
I'd like to suggest that Jack Yaz create a new thread for his current work on this script.

It is hard to track down where to find the latest installer in all these posts. :oops:

Thank you Jack Yaz for your valuable contributions here!
 
I'd like to suggest that Jack Yaz create a new thread for his current work on this script.

It is hard to track down where to find the latest installer in all these posts. :oops:

Thank you Jack Yaz for your valuable contributions here!

And/or @kivc could update the first post


Sent from my iPhone using Tapatalk
 
Thought I would give this script a try (v1.06) on my 86U but getting the following error on install and after reboot trying the generate updated ntpdmerlin graphs through it's UI...

ntpq: error while loading shared libraries: libcrypto.so.1.1: wrong ELF class: ELFCLASS32

(running latest Merlin 384.10).
 
Thought I would give this script a try (v1.06) on my 86U but getting the following error on install and after reboot trying the generate updated ntpdmerlin graphs through it's UI...

ntpq: error while loading shared libraries: libcrypto.so.1.1: wrong ELF class: ELFCLASS32

(running latest Merlin 384.10).

Are you running Entware (recommended via amtm and Diversion scripts)?
 
Yes, running FreshJR, amtm, Diversion, Skynet, Stubby and Yazfi with Entware installed and Pixelserv latest beta.

Did you give it some time after rebooting to set itself up? Are you running the latest version of all the scripts? Is Entware fully updated?
 
Did you give it some time after rebooting to set itself up? Are you running the latest version of all the scripts? Is Entware fully updated?

Yes I should be, just done a full reinstall of all scripts yesterday, also noted is when I got the error as mentioned when I first installed ntpdmerlin, it also stated something like ntp - not found and restart ntp - failed in 'red' characters.

I ran this install script from the GitHub page...

/usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/jackyaz/ntpdMerlin/master/ntpmerlin.sh" -o "/jffs/scripts/ntpmerlin" && chmod 0755 /jffs/scripts/ntpmerlin && /jffs/scripts/ntpmerlin install
 
Yes I should be, just done a full reinstall of all scripts yesterday, also noted is when I got the error as mentioned when I first installed ntpdmerlin, it also stated something like ntp - not found and restart ntp - failed in 'red' characters.

I ran this install script from the GitHub page...

/usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/jackyaz/ntpdMerlin/master/ntpmerlin.sh" -o "/jffs/scripts/ntpmerlin" && chmod 0755 /jffs/scripts/ntpmerlin && /jffs/scripts/ntpmerlin install

Just grabbing at straws here, but did you format the USB drive to Ext4 with journalling via amtm? Did you create a swap file? Do you have the disk checker utility enabled? Does it show anything with regards to the USB's disk health?
 
Yes I should be, just done a full reinstall of all scripts yesterday, also noted is when I got the error as mentioned when I first installed ntpdmerlin, it also stated something like ntp - not found and restart ntp - failed in 'red' characters.

I ran this install script from the GitHub page...

/usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/jackyaz/ntpdMerlin/master/ntpmerlin.sh" -o "/jffs/scripts/ntpmerlin" && chmod 0755 /jffs/scripts/ntpmerlin && /jffs/scripts/ntpmerlin install
Everything is 64 bit on my router
Code:
# file /opt/sbin/ntpq
/opt/sbin/ntpq: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /opt/lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, stripped

# ldd /opt/sbin/ntpq
        linux-vdso.so.1 (0x0000007fa17da000)
        libcap.so.2 => /opt/lib/libcap.so.2 (0x0000007fa1799000)
        libm.so.6 => /opt/lib/libm.so.6 (0x0000007fa16dc000)
        libcrypto.so.1.1 => /opt/lib/libcrypto.so.1.1 (0x0000007fa145f000)
        libgcc_s.so.1 => /opt/lib/libgcc_s.so.1 (0x0000007fa143a000)
        libpthread.so.0 => /opt/lib/libpthread.so.0 (0x0000007fa140d000)
        libc.so.6 => /opt/lib/libc.so.6 (0x0000007fa12b2000)
        /opt/lib/ld-linux-aarch64.so.1 (0x0000007fa17ae000)
        libdl.so.2 => /opt/lib/libdl.so.2 (0x0000007fa129f000)

# file /opt/lib/libcrypto.so.1.1
/opt/lib/libcrypto.so.1.1: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, stripped
 
Just grabbing at straws here, but did you format the USB drive to Ext4 with journalling via amtm? Did you create a swap file? Do you have the disk checker utility enabled? Does it show anything with regards to the USB's disk health?

Yes, ext4 with Journalling via amtm, then a 2gb swap created, diskchk enabled, nothing showing regards disk health (8gb usb3.0).


@EmeraldDeer

Code:
# file /opt/sbin/ntpq - file not found
# file /opt/lib/libcrypto.so.1.1 - file not found


# ldd /opt/sbin/ntpq
        linux-vdso.so.1 (0x0000007fa4ec6000)
        libcap.so.2 => /opt/lib/libcap.so.2 (0x0000007fa4e85000)
        libm.so.6 => /opt/lib/libm.so.6 (0x0000007fa4dc8000)
        libcrypto.so.1.1 => not found
        libgcc_s.so.1 => /opt/lib/libgcc_s.so.1 (0x0000007fa4da3000)
        libpthread.so.0 => /opt/lib/libpthread.so.0 (0x0000007fa4d76000)
        libc.so.6 => /opt/lib/libc.so.6 (0x0000007fa4c1b000)
        /opt/lib/ld-linux-aarch64.so.1 (0x0000007fa4e9a000)
 
Yes I should be, just done a full reinstall of all scripts yesterday, also noted is when I got the error as mentioned when I first installed ntpdmerlin, it also stated something like ntp - not found and restart ntp - failed in 'red' characters.

I ran this install script from the GitHub page...

/usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/jackyaz/ntpdMerlin/master/ntpmerlin.sh" -o "/jffs/scripts/ntpmerlin" && chmod 0755 /jffs/scripts/ntpmerlin && /jffs/scripts/ntpmerlin install

Is RT-AC86U a 64 bit router?

Adam's advice for this error in another context:
https://www.snbforums.com/threads/stubby-installer-asuswrt-merlin.49469/page-63#post-474219

But if you do this:
  • Use amtm to restart pixelserv-tls to fix the startup script
  • Use ntpdMerlin "uf" to fix the startup script
 
Yes, ext4 with Journalling via amtm, then a 2gb swap created, diskchk enabled, nothing showing regards disk health (8gb usb3.0).


@EmeraldDeer

Code:
# file /opt/sbin/ntpq - file not found
# file /opt/lib/libcrypto.so.1.1 - file not found


# ldd /opt/sbin/ntpq
        linux-vdso.so.1 (0x0000007fa4ec6000)
        libcap.so.2 => /opt/lib/libcap.so.2 (0x0000007fa4e85000)
        libm.so.6 => /opt/lib/libm.so.6 (0x0000007fa4dc8000)
        libcrypto.so.1.1 => not found
        libgcc_s.so.1 => /opt/lib/libgcc_s.so.1 (0x0000007fa4da3000)
        libpthread.so.0 => /opt/lib/libpthread.so.0 (0x0000007fa4d76000)
        libc.so.6 => /opt/lib/libc.so.6 (0x0000007fa4c1b000)
        /opt/lib/ld-linux-aarch64.so.1 (0x0000007fa4e9a000)
Not sure why you either do not have this file or the link was not made by installation
Code:
# opkg search /opt/lib/libcrypto.so.1.1
libopenssl - 1.1.1a-2
Do you have this Entware package installed?
Code:
# opkg list-installed | grep ssl
libopenssl - 1.1.1a-2
 
Last edited:
Not sure why you either do not have this file or the link was not made by installation
Code:
# opkg search /opt/lib/libcrypto.so.1.1
libopenssl - 1.1.1a-2
Do you have this Entware package installed?
Code:
# opkg list-installed | grep ssl
libopenssl - 1.1.1a-2


Yes, weird, that file was not found and yes the ac86u is 64bit.

Updated all packages and reinstalled ntpmerlin, now says -

checking ntpd - 'dead'
Starting ntpd - 'done'


libopenssl - 1.1.1a-2 is now installed and now started getting ntpd references in the log, so looks to be running now - will leave some time for it.

log says...
Code:
ntpd[12699]: ntpd 4.2.8p12@1.3728-o Thu Mar 21 09:03:59 UTC 2019 (1): Starting
Mar 25 21:49:30 ntpd[12699]: Command line: ntpd -c /jffs/configs/ntp.conf -g
Mar 25 21:49:30 ntpd[12704]: proto: precision = 0.200 usec (-22)
Mar 25 21:49:30 ntpd[12704]: switching logging to file /opt/var/spool/ntp/ntp.log
Mar 25 21:49:30 ASUS: Started ntpd from .


EDIT: All now working fine here, thanks guy's! :)
 
Last edited:
Also, as another suggestion, for the horizontal axis for the graphs with dates, any chance you could display them in the US way when the location is the US, ie, mm/dd vs dd/mm as is common elsewhere?

It is a trivial change to alter the x-axis to display in US format MM/DD....although I am in the UK!

upload_2019-3-31_17-24-12.png


Just not 100% sure which NVRAM variable should be used to detect that you are in the US etc?
 
I'm not getting it working on a ac87u.. :(
i use merlin 380.70 (because of its stability) but after adding the script, the script is working and give its output in tools, but after rebooting the router doesnt starting up anymore.
After that i have to default reset and restore my jffs and settings to get it function again.

Anybody knows what this could be?

*Also using adblocking with pixelserv and have installed entware.
 
I tried adding options to the dnsmasq.conf.add to specify in DHCP responses that LAN clients should use the router for their NTP service, but it crashed my dnsmasq :( .. Has anyone had any success with this? Any reasons why not?
 

Latest threads

Sign Up For SNBForums Daily Digest

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