What's new

ntpMerlin ntpMerlin - 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!

so what is the future of chrony, i think i have time to finally test it. how do i switch ntpmerlin to use it?
IMHO most time critical servers/services are moving to chrony. It is now the default ntp server/client on Red Hat Ubuntu and Debian (and others I would imagine). Its also used now by AWS and Facebook.

Here is a good article on chrony:


To switch to chrony, you will need Jacks development build. In the GUI start ntpMerlin and switch to dev branch, enter this:

ntpmerlin develop

Jacks script will first update your existing ntpmerlin to a newer dev branch (v3.0 last I checked).
Once it launches, look for option "t". This will allow you to switch to chrony.

The included chrony.conf is a good starting point. If you need to tweak it, if you are familiar with ntp.conf, it's very similar.

While in the CLI, there is a new monitoring command - chronyc.

The two options I use most are:

chronyc sources - shows you what timeservers it's listening on and statistics on them
chronyc tracking - gives detailed information on the clock characteristics.

Good luck.

PS: one more thing - assuming you are using ntpMerlin, once you make the change, see how the WebUI graphs look after a few hours/days. Should be interesting to see the difference between ntpd and chronyd.
 
Something funky is going on with NTP here. And I'm getting the following errors while trying to install ntpMerlin.

edit: Solved. Uninstalled, reinstalled, updated to developer a couple of times seemed to fix the ntpd: dead problem. Updating entware packages fixed the SQLite messages.

Code:
/usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/jackyaz/ntpMerlin/mas
ter/ntpmerlin.sh" -o "/jffs/scripts/ntpmerlin" && chmod 0755 /jffs/scripts/ntpmerlin && /jffs/scripts/ntpmerlin install
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 45116  100 45116    0     0   231k      0 --:--:-- --:--:-- --:--:--  263k
ntpMerlin: Welcome to ntpMerlin v2.5.1, a script by JackYaz

ntpMerlin: Checking your router meets the requirements for ntpMerlin

ntpMerlin: Installing required packages from Entware

Downloading http://bin.entware.net/aarch64-k3.10/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/entware
Upgrading sqlite3-cli on root from 3320100-1 to 3330000-1...
Downloading http://bin.entware.net/aarch64-k3.10/sqlite3-cli_3330000-1_aarch64-3.10.ipk
Configuring sqlite3-cli.
Package p7zip (16.02-3) installed in root is up to date.
Installing ntp-utils (4.2.8p15-2) to root...
Downloading http://bin.entware.net/aarch64-k3.10/ntp-utils_4.2.8p15-2_aarch64-3.10.ipk
Installing libevent2-core (2.1.11-2) to root...
Downloading http://bin.entware.net/aarch64-k3.10/libevent2-core_2.1.11-2_aarch64-3.10.ipk
Installing libevent2-pthreads (2.1.11-2) to root...
Downloading http://bin.entware.net/aarch64-k3.10/libevent2-pthreads_2.1.11-2_aarch64-3.10.ipk
Configuring libevent2-core.
Configuring libevent2-pthreads.
Configuring ntp-utils.
Installing ntpd (4.2.8p15-2) to root...
Downloading http://bin.entware.net/aarch64-k3.10/ntpd_4.2.8p15-2_aarch64-3.10.ipk
Configuring ntpd.
/jffs/scripts/ntpmerlin: line 1445: can't open /jffs/addons/ntpmerlin.d/ntpdstats_www.asp: no such file
/jffs/scripts/ntpmerlin: line 1445: can't open /jffs/addons/ntpmerlin.d/ntpdstats_www.asp: no such file
/jffs/scripts/ntpmerlin: line 1445: can't open /jffs/addons/ntpmerlin.d/ntpdstats_www.asp: no such file
ntpMerlin: New version of ntpdstats_www.asp downloaded

ntpMerlin: Mounting ntpMerlin WebUI page as user3.asp

Checking ntpd...              dead.
S77ntpd: Waiting for NTP to sync before starting...
Starting ntpd...              done.
SQLite header and source version mismatch
2020-05-25 16:19:56 0c1fcf4711a2e66c813aed38cf41cd3e2123ee8eb6db98118086764c4ba83350
2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0ff3f
SQLite header and source version mismatch
2020-05-25 16:19:56 0c1fcf4711a2e66c813aed38cf41cd3e2123ee8eb6db98118086764c4ba83350
2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0ff3f
SQLite header and source version mismatch
2020-05-25 16:19:56 0c1fcf4711a2e66c813aed38cf41cd3e2123ee8eb6db98118086764c4ba83350
2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0ff3f
SQLite header and source version mismatch
2020-05-25 16:19:56 0c1fcf4711a2e66c813aed38cf41cd3e2123ee8eb6db98118086764c4ba83350
2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0ff3f
SQLite header and source version mismatch
2020-05-25 16:19:56 0c1fcf4711a2e66c813aed38cf41cd3e2123ee8eb6db98118086764c4ba83350
2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0ff3f
SQLite header and source version mismatch
2020-05-25 16:19:56 0c1fcf4711a2e66c813aed38cf41cd3e2123ee8eb6db98118086764c4ba83350
2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0ff3f
SQLite header and source version mismatch
2020-05-25 16:19:56 0c1fcf4711a2e66c813aed38cf41cd3e2123ee8eb6db98118086764c4ba83350
2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0ff3f
SQLite header and source version mismatch
2020-05-25 16:19:56 0c1fcf4711a2e66c813aed38cf41cd3e2123ee8eb6db98118086764c4ba83350
2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0ff3f
SQLite header and source version mismatch
2020-05-25 16:19:56 0c1fcf4711a2e66c813aed38cf41cd3e2123ee8eb6db98118086764c4ba83350
2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0ff3f
SQLite header and source version mismatch
2020-05-25 16:19:56 0c1fcf4711a2e66c813aed38cf41cd3e2123ee8eb6db98118086764c4ba83350
2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0ff3f
SQLite header and source version mismatch
2020-05-25 16:19:56 0c1fcf4711a2e66c813aed38cf41cd3e2123ee8eb6db98118086764c4ba83350
2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0ff3f
dos2unix: can't open '/jffs/addons/ntpmerlin.d/csv/*.htm': No such file or directory
cp: can't stat '/jffs/addons/ntpmerlin.d/csv/*.htm': No such file or directory
 
Last edited:
I have a good question about chronyd. I read some where once that chronyd is preferred in systems where the operation is not run 24 hours because it does not "poll" ntp servers. Its time gatherings are almost instantaneous. In contrast, the findings found that ntpd is better ran in environments where there is need for longer uptime ( basically 24 hour operation). If this is the case for ntpd, what makes chronyd the better choice for the router?
 
I believe chrony still "polls" the ntp servers (you have defined in chrony.conf). Here is the output of chronyc sources running on my AX88U:

cj.JPG


If you are familiar with ntpq -p, the above looks similar.

As far as 7X24, Facebook and Amazon Web Services both have moved to chrony. IMHO, it scales well for both enterprise and small devices like our router.

Chrony is a ground up, more contemporary version of the ntp protocol.

A few good reads on chrony:

 
Hey Jack, i just noticed that from a couple of days now I can't use chrony with your dev branch.

Code:
Oct 19 09:51:42 S77chronyd: Waiting for NTP to sync before starting...
Oct 19 08:51:42 chronyd[4403]: chronyd version 3.5 starting (+CMDMON +NTP +REFCLOCK -RTC +PRIVDROP -SCFILTER -SIGND +ASYNCDNS -SECHASH +IPV6 -DEBUG)
Oct 19 08:51:42 chronyd[4403]: Fatal error : Could not get user/group ID of nobody
Oct 19 09:51:53 admin: Failed to start chronyd from .
I reinstalled ntpmerlin, manually removed chrony from entware, etc etc and the same result.
 
Hey Jack, i just noticed that from a couple of days now I can't use chrony with your dev branch.

Code:
Oct 19 09:51:42 S77chronyd: Waiting for NTP to sync before starting...
Oct 19 08:51:42 chronyd[4403]: chronyd version 3.5 starting (+CMDMON +NTP +REFCLOCK -RTC +PRIVDROP -SCFILTER -SIGND +ASYNCDNS -SECHASH +IPV6 -DEBUG)
Oct 19 08:51:42 chronyd[4403]: Fatal error : Could not get user/group ID of nobody
Oct 19 09:51:53 admin: Failed to start chronyd from .
I reinstalled ntpmerlin, manually removed chrony from entware, etc etc and the same result.
Sounds like your nobody user has gone missing on the system, which is strange.
 
Missing “nobody” is strange. Maybe a reboot? As far as I know, there is no adduser command in Asuswrt-Merlin...
What does /etc/password have in it?
 
My "add ons" tab in the web gui has disappeared, and the /user4.asp page returns a 404. I've completed a uf of NTPMerlin and rebooted my router (AC68U) with no luck. Any ideas on how to get it back?
 

Similar 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