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!

I am rather obsessive regarding time. Always have been, something about trains when I was a kid riding them here and there. The conductor always had his watch and when he said to go, it was time to go.
Anyway, I like the graphs this offers and I run chrony on all the systems in the house.
Besides the graphs, any advantage to having my own ntpd on the router?

This info is within 30 minutes of booting my desktop.

Code:
chronyc tracking
Reference ID    : CE37BF8E (206-55-191-142.static.fttp.usinternet.com)
Stratum         : 2
Ref time (UTC)  : Wed Apr 03 13:08:23 2019
System time     : 0.000004839 seconds slow of NTP time
Last offset     : -0.000048975 seconds
RMS offset      : 0.003041917 seconds
Frequency       : 18.758 ppm fast
Residual freq   : -0.011 ppm
Skew            : 0.304 ppm
Root delay      : 0.044598665 seconds
Root dispersion : 0.001667356 seconds
Update interval : 128.2 seconds
Leap status     : Normal


This is from a server that hasn't restarted in some time.

Code:
chronyc tracking
Reference ID    : 95387910 (ns1.switch.ca)
Stratum         : 3
Ref time (UTC)  : Wed Apr 03 13:23:34 2019
System time     : 0.000894242 seconds slow of NTP time
Last offset     : -0.000003010 seconds
RMS offset      : 0.000298324 seconds
Frequency       : 11.350 ppm slow
Residual freq   : -0.003 ppm
Skew            : 0.070 ppm
Root delay      : 0.028821064 seconds
Root dispersion : 0.003977443 seconds
Update interval : 1043.6 seconds
Leap status     : Normal
 
Besides the graphs, any advantage to having my own ntpd on the router?
In one of the posts on the original kvic thread two benefits were mentioned:
  • is more accurate than the ntp server in the default Asus firmware
  • uses less memory than the the ntp server in the default Asus firmware
Personally I did not even know the Asus firmware was running an ntp server.

After having read that post I wanted to give this a try.
 
In one of the posts on the original kvic thread two benefits were mentioned:
  • is more accurate than the ntp server in the default Asus firmware
  • uses less memory than the the ntp server in the default Asus firmware
Personally I did not even know the Asus firmware was running an ntp server.

After having read that post I wanted to give this a try.

These benefits of accuracy related to the client side not server side (as there is no server in the stock firmware).

The memory benefits have diminished with this latest version from Jack as it uses the stock entware version, not a specially complied one as kvic did, tho it appears it doesn’t use much anyway so not a huge worry.


Sent from my iPhone using Tapatalk
 
In one of the posts on the original kvic thread two benefits were mentioned:
  • is more accurate than the ntp server in the default Asus firmware
  • uses less memory than the the ntp server in the default Asus firmware
Personally I did not even know the Asus firmware was running an ntp server.

After having read that post I wanted to give this a try.
There's also the larger "societal" benefit, particularly when you have a lot of devices on your network, of only one device going out and hitting internet time servers, instead of every device on your network.
 
So, a little bit of googling found this right from the horse's mouth (ntp.org) http://www.ntp.org/ntpfaq/NTP-s-sw-clocks-quality.htm

Also, and IEEE paper summary says 5G will "only" need 130 ns (130 PPM) at the phone, which means their biggest problem is the network. https://ieeexplore.ieee.org/document/7885239

And it's not about eating crow. I've certainly made enough wrong statements here based on bad information. It's about learning. If I don't learn something new in a day, the day is a loss.

Well, we've both had good days then. thank you.
130 ns at the phone...think about that. for perspective, what is it for 4G, I wonder? (usec range is my guess, so an order of magnitude slower)
nanoseconds are quite small, and 130 swish past in a fraction of a blink of an eye....long for computers, but still very very fast for humans. and I take "only" to mean "as high as" when the probable plan (or actual result from correct execution/implementation) is to get it lower than that.

My point is that it's disruptive to the current stakeholders and their grasp on things: by bringing such an accurate time source to the terrestrial level from space (SPACE!) almost as ubiquitously, it might moot the current status quo. Clever, cheeky.

EDIT: The network. In Canada, the largest media/commo conglomerate is pushing their fibre optic network on the consumer. why? so that when they ship/install the modem/router It also is a 5G repeater node on their meshnet, getting that network latency as low as possible; my supposition, but it makes good sense. Asus' Meshnet works best with a wired backhaul; why wouldn't a corporation use the consumer to finance their own network expansion in the same way?
 
Last edited:
Well, we've both had good days then. thank you.
130 ns at the phone...think about that. for perspective, what is it for 4G, I wonder? (usec range is my guess, so an order of magnitude slower)
nanoseconds are quite small, and 130 swish past in a fraction of a blink of an eye....long for computers, but still very very fast for humans. and I take "only" to mean "as high as" when the probable plan (or actual result from correct execution/implementation) is to get it lower than that.

My point is that it's disruptive to the current stakeholders and their grasp on things: by bringing such an accurate time source to the terrestrial level from space (SPACE!) almost as ubiquitously, it might moot the current status quo. Clever, cheeky.

EDIT: The network. In Canada, the largest media/commo conglomerate is pushing their fibre optic network on the consumer. why? so that when they ship/install the modem/router It also is a 5G repeater node on their meshnet, getting that network latency as low as possible; my supposition, but it makes good sense. Asus' Meshnet works best with a wired backhaul; why wouldn't a corporation use the consumer to finance their own network expansion in the same way?
It won't be able to rely solely on GPS time sync at the phone level, time sync is too critical to risk being somewhere wireless signals can get through but GPS can't. I'm completely guessing that the cell towers will use GPS along with more advanced time algorithms to feed time to devices. It's easier to put very accurate crystals in a million cell towers than 10's or maybe 100's of millions of phones.

IIRC 5G will have a much smaller usable distance from the tower. So including a 5G repeater with the modem might not be a bad idea. And the consumer always has to finance network expansion, it's their only source of income. :)
 
In one of the posts on the original kvic thread two benefits were mentioned:
  • is more accurate than the ntp server in the default Asus firmware
  • uses less memory than the the ntp server in the default Asus firmware
Personally I did not even know the Asus firmware was running an ntp server.

After having read that post I wanted to give this a try.

I believe calling the ASUS built in ntp server is a bit of a stretch. I had done some testing and work on the gpsd portion with kvic on the original thread. Here is how he described the built in "ntp server"

The stock "NTP" in asus router was poorly designed as a memory resident program (i.e always stay in RAM and run when needed). For what it does, a simple cron job is sufficient and more efficient.

On startup it calls a helper program (/usr/sbin/ntpclient) to sync time once. Stay in RAM and wake up twice everyday to run the same helper program. Under such scheme accuracy won't be good. Perhaps +/- a few seconds per day. Perhaps because no way to confidently tell the accuracy of the system time.

Using Jack's installer you will now have a fully RFC5905 compliant ntp server. The real deal!

Now, we can always debate the need for a GPS based Stratum 1 or network connected Stratum 2 clock source in your house. Why? Because ;-)
 
This doesn't look right. I don't think that my ntp server is working.

Screenshot_2019-04-03 Tools - NTP Daemon(1).png


Edit: Never mind I just needed to reboot my router.
 
Last edited:
Looks like we currently graph sys_jitter and not clk_jitter - I'm unsure of the difference
Have not found clear and concise definitions of sys_jitter and clk_jitter.

When the number of servers is one, sys_jitter is indeed zero. When the number of servers is more than one, it seems high compared to offset as if it is the jitter of all of the servers as a group.

Perhaps clk_jitter should be graphed instead because it appears more relevant to the offset and works even for one server.
 
I was previously on version 1.1.1 in post #178 and after following post #152 and the new v1.2.0 this is how the graph looks:
This is a FWI if it helps.
And a big thank you to all.
upload_2019-4-3_12-35-18.png
 
Have not found clear and concise definitions of sys_jitter and clk_jitter.

When the number of servers is one, sys_jitter is indeed zero. When the number of servers is more than one, it seems high compared to offset as if it is the jitter of all of the servers as a group.

Perhaps clk_jitter should be graphed instead because it appears more relevant to the offset and works even for one server.
Change line 23 of ntpmerlin to
Code:
readonly NTPD_BRANCH="develop"
, then run ntpmerlin and option u
This develop branch should now graph clk_jit

Since I don't know what I'm looking for in the resulting graphs, feedback welcome!
 
sys_jitter is the error bound on offset and should be single digit ms or lower

clk_jitter and clk_wander are error bounds on your crystal offset and drift
and should be less than 1 ms and 1 PPM respectively.



Sent from my iPhone using Tapatalk
 
sys_jitter is the error bound on offset and should be single digit ms or lower

clk_jitter and clk_wander are error bounds on your crystal offset and drift
and should be less than 1 ms and 1 PPM respectively.



Sent from my iPhone using Tapatalk
Which is the more useful to graph?
 
Which is the more useful to graph?

That’s a whole other question!

System jitter is defined by the ntp spec whereas clock is an internal stat ntpd developers thought was useful. So on that basis I’d go with the system one.


Sent from my iPhone using Tapatalk
 
That’s a whole other question!

System jitter is defined by the ntp spec whereas clock is an internal stat ntpd developers thought was useful. So on that basis I’d go with the system one.


Sent from my iPhone using Tapatalk
Any idea why some users are seeing 0 jitter reported (primarily single server users)?
 
Any idea why some users are seeing 0 jitter reported (primarily single server users)?

That is a bit surprising, I’d be surprised if it’s a bug in the ntpq tho.
Looking at other ntp projects online I did find examples of others with it as 0 or insanely small values.
I know it was discussed that 1us “should” be graphed but has that actually been tested on the jitter graph by injecting the data manually?
Maybe add some logging to the devel branch to show the raw ntpq output and see what is going into the rrd file?


Sent from my iPhone using Tapatalk
 
That is a bit surprising, I’d be surprised if it’s a bug in the ntpq tho.
Looking at other ntp projects online I did find examples of others with it as 0 or insanely small values.
I know it was discussed that 1us “should” be graphed but has that actually been tested on the jitter graph by injecting the data manually?
Maybe add some logging to the devel branch to show the raw ntpq output and see what is going into the rrd file?


Sent from my iPhone using Tapatalk
I can comment out the line that rm's the temp file created by ntpq, that should include the raw values
 
I can comment out the line that rm's the temp file created by ntpq, that should include the raw values

Yea do that and EmeraldDeer can report back


Sent from my iPhone using Tapatalk
 

Similar threads

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