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!

Since switching to chrony on the Develop Branch, my graphs are flat-lining ! LoL
I have seen a similar improvements compared to ntpd. For now, the main graph to watch is Offset since that one maps pretty much one to one with the older ntpd. The other two on ntpMerlins graph (Jitter and Drift) are not quite 1 to 1 with the older ntpd (for now ;-).

I as well can see the difference between ntpd and chronyd!

Here is a good article on chrony:


As the article notes - chrony syncs much faster on startup than ntpd. By using the dumponexit directive in chrony.conf and the -r option on startup I typically see very accurate time convergence within 3 or 4 seconds on restarting chrony. Even without the "-r" I see convergence in 15 seconds or less!

I have not compared memory footprint, but chrony is supposed to use less memory compared to ntpd.

Chrony is now the default ntp daemon in Red Hat, Ubuntu, etc. It is also now the time server in AWS/AWS Time Sync Service, Facebook and I am sure others.

As a side, as an older computer geek, I am amazed at the features being provided by low cost Asus routers, Merlins firmware, Entware and the collective group of talented individuals that are adding these features to asuswrt-merlin.

Unbounds recursive, caching DNS server (and the ease of using unbound_manager!)
Chrony
Speedtest monitoring
Addblocking/Diversion
Firewall security/Skynet
Flexible QoS - FlexQoS/CakeQOS
Scribe/uiScribe for managing the complexity of syslog-ng
the list goes on
and of course built in amtm to help install and manage all of these.

The advances in technology, even to an "old techie", continue to amaze me...
 
What is amazing to me is that they are presented at such a level that someone with as little skills as I can use these wonderful tools.
I am thankful to everyone involved for that.
 
The entware team have released an updated chrony (already!) that allows for dropping of privilege to run as "nobody". I've pushed an updated ntpmerlin which takes advantage of this - you'll need to update Entware packages and then ntpmerlin (may need option uf since we're still in a develop cycle)
Quick question: is this updated ntpmerlin (that uses chrony) only available to those on the development branch, or to all users as long as we run a forced update (uf)?
 
<snip> ... As a side, as an older computer geek, I am amazed at the features being provided by low cost Asus routers, Merlins firmware, Entware and the collective group of talented individuals that are adding these features to asuswrt-merlin.

Unbounds recursive, caching DNS server (and the ease of using unbound_manager!)
Chrony
Speedtest monitoring
Addblocking/Diversion
Firewall security/Skynet
Flexible QoS - FlexQoS/CakeQOS
Scribe/uiScribe for managing the complexity of syslog-ng
the list goes on
and of course built in amtm to help install and manage all of these.

The advances in technology, even to an "old techie", continue to amaze me...

yep... old techie here too... I'm amazed daily as well - compared to the cost/benefit comparison to my first 'pricey' router over 25 years ago that was complete with annual support contracts and end-of-life obsolescence...

and now we can access atomic clocks in space... I'm down with that...
 
Any of you chrony experts willing to share your chrony.conf with a would be trainee in the Southeast US? I'm afraid I might turn the lights out with all them switches.
 
Any of you chrony experts willing to share your chrony.conf with a would be trainee in the Southeast US? I'm afraid I might turn the lights out with all them switches.

Here is the one I am using presently:
Code:
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).

# use a variety of servers in various pools
# facebook and amazon both use chrony, pool.ntp.org a mix of ntpd and chrony

# Local Raspberry Pi with u-blox GPS module w/PPS - a Stratum 1 clock source
# dont enable unless you have similar ;-)
#server 192.168.1.205 minpoll 2 maxpoll 4 iburst

pool 0.pool.ntp.org iburst
pool time1.facebook.com iburst
pool 0.amazon.pool.ntp.org iburst

# Record the rate at which the system clock gains/losses time.
driftfile /opt/var/spool/chrony/drift.file

# Allow the system clock to be stepped in the first three updates
# if its offset is larger than 1 second.
makestep 1.0 3

# Enable kernel synchronization of the real-time clock (RTC).
# no RTC in Asus routers
#rtcsync

# Enable hardware timestamping on all interfaces that support it.
# no ethernet HW with timestamp support in Asus routers
#hwtimestamp *

# Increase the minimum number of selectable sources required to adjust
# the system clock.
#minsources 2

# Allow NTP client access from local network.
allow 192.168.1.0/24

# Serve time even if not synchronized to a time source.
local stratum 10

# Specify file containing keys for NTP authentication.
#keyfile /etc/chrony.keys

# Get TAI-UTC offset and leap seconds from the system tz database.
#leapsectz right/UTC

# Specify directory for log files.
logdir /opt/var/log/chrony

# Select which information is logged.
# careful - logging can grow quite larger over time
#log measurements statistics tracking

# enable and setup dumpfile - much faster time convergence on reboots or fairly short
# router downtime (an hour or so)

dumponexit
dumpdir /opt/var/lib/chrony

After you install this and start or restart chrony, I find these two chronyc commands useful:

chronyc sources - shows the servers you are connected to
chronyc tracking - shows how accurate and stable ntp time is (note - all times displayed are in seconds)

Good luck
 
Here is the one I am using presently:
Code:
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).

# use a variety of servers in various pools
# facebook and amazon both use chrony, pool.ntp.org a mix of ntpd and chrony

# Local Raspberry Pi with u-blox GPS module w/PPS - a Stratum 1 clock source
# dont enable unless you have similar ;-)
#server 192.168.1.205 minpoll 2 maxpoll 4 iburst

pool 0.pool.ntp.org iburst
pool time1.facebook.com iburst
pool 0.amazon.pool.ntp.org iburst

# Record the rate at which the system clock gains/losses time.
driftfile /opt/var/spool/chrony/drift.file

# Allow the system clock to be stepped in the first three updates
# if its offset is larger than 1 second.
makestep 1.0 3

# Enable kernel synchronization of the real-time clock (RTC).
# no RTC in Asus routers
#rtcsync

# Enable hardware timestamping on all interfaces that support it.
# no ethernet HW with timestamp support in Asus routers
#hwtimestamp *

# Increase the minimum number of selectable sources required to adjust
# the system clock.
#minsources 2

# Allow NTP client access from local network.
allow 192.168.1.0/24

# Serve time even if not synchronized to a time source.
local stratum 10

# Specify file containing keys for NTP authentication.
#keyfile /etc/chrony.keys

# Get TAI-UTC offset and leap seconds from the system tz database.
#leapsectz right/UTC

# Specify directory for log files.
logdir /opt/var/log/chrony

# Select which information is logged.
# careful - logging can grow quite larger over time
#log measurements statistics tracking

# enable and setup dumpfile - much faster time convergence on reboots or fairly short
# router downtime (an hour or so)

dumponexit
dumpdir /opt/var/lib/chrony

After you install this and start or restart chrony, I find these two chronyc commands useful:

chronyc sources - shows the servers you are connected to
chronyc tracking - shows how accurate and stable ntp time is (note - all times displayed are in seconds)

Good luck
So so we need the conf file if we are running the dev script?
 
Thanks, there was more there than I was comfortable with or accustomed to.
I will check it out. Something new to learn about.
I appreciate it,
jts
 
So so we need the conf file if we are running the dev script?
No, the one Jack supplies is quite good. About the only minor change I would do is use the Amazon and Facebook pools - they are running chrony.

Mine was from early chrony days before Jack created the dev script.
In fact I just noticed I didn't include a pidfile and lock directive. I will change that.
 
No, the one Jack supplies is quite good. About the only minor change I would do is use the Amazon and Facebook pools - they are running chrony.

Mine was from early chrony days before Jack created the dev script.
In fact I just noticed I didn't include a pidfile and lock directive. I will change that.
Ahh I understand, thank you.
 
The default may have been fine for me, I just didn't know. I had read that there were 3 chrony.conf files supplied to choose from. I didn't know Jack had already picked or set the correct default parameters, commands, switches, etc.

I did change the pool(s) to *.us.pool.ntp.org iburst, assuming it worked the same as with ntpd.
thanks again,
jts

ps: This after switching to chrony at 10 pm last night.

1600950218982.png
 
Last edited:
I may have missed something, but it seems it's just cosmetic anyway, but this is what I get after changing to chrony via 'ntpmerlin develop' v3.0.0.

ChronyUpdate-2020-09-24.png


Otherwise, everything else looks good. :)
 
@Jack Yaz, thanks. I didn't know what I was expected to see, but now I see its normal. I wasn't worried either way. The network is running smooth and fast. :)
 
Check it out.. I switched to chrony at 2200 last night. The hickup at 1300 was when I edited the config file and restarted ntpMerlin.
To be fair, though, ntpd wasn't usually that rough. But chrony is pretty smooth now.
1600996629296.png

This output from chrony sources and tracking
Code:
ASUSWRT-Merlin RT-AC86U 384.19_0 Fri Aug 14 19:19:51 UTC 2020
xxxxxxxxxxxxxxxxxxxxxxxx:/tmp/home/root# chronyc sources
210 Number of sources = 18
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
^+ lofn.fancube.com              2  10   377   989  -2530us[-2530us] +/-   38ms
^+ time.cloudflare.com           3  10   377   351   -121us[ -121us] +/-   20ms
^+ voipmonitor.wci.com           2  10   377   775  +2128us[+2128us] +/-   45ms
^- mirror1.sjc02.svwh.net        2  10   377   371  +2310us[+2310us] +/-   69ms
^? 104.16.55.76                  0  10     0     -     +0ns[   +0ns] +/-    0ns
^? 104.16.54.76                  0  10     0     -     +0ns[   +0ns] +/-    0ns
^? 2606:4700::6810:374c          0   6     0     -     +0ns[   +0ns] +/-    0ns
^? 2606:4700::6810:364c          0   6     0     -     +0ns[   +0ns] +/-    0ns
^+ adsl-99-73-32-195.dsl.ok>     1  10   377   465  +2050us[+2050us] +/-   41ms
^+ pool-96-235-18-130.pitbp>     1  10   377   340   +475us[ +475us] +/-   21ms
^- eterna.binary.net             2  10   377   439  -1209us[-1209us] +/-   66ms
^- 44.190.6.254                  3  10   377   550  -4557us[-4557us] +/-   89ms
^* time1.facebook.com            1  10   377   31m  +1665us[+1883us] +/-   16ms
^? time1.facebook.com            0   6     0     -     +0ns[   +0ns] +/-    0ns
^- ec2-3-217-79-242.compute>     2  10   377   396   -145us[ -145us] +/-   85ms
^- ns2.adelaidewebsites.com>     2  10   377   356  -4332us[-4332us] +/-   84ms
^- time.airgapped.io             2  10   377   749  -1408us[-1408us] +/-   67ms
^- zeit.arpnetworks.com          2  10   377   157  -9699us[-9699us] +/-   81ms
xxxxxxxxxxxxxxxx:/tmp/home/root# chronyc tracking
Reference ID    : 81861C7B (time1.facebook.com)
Stratum         : 2
Ref time (UTC)  : Fri Sep 25 00:48:37 2020
System time     : 0.000626039 seconds fast of NTP time
Last offset     : +0.000218397 seconds
RMS offset      : 0.000777874 seconds
Frequency       : 14.340 ppm slow
Residual freq   : +0.002 ppm
Skew            : 0.022 ppm
Root delay      : 0.030501518 seconds
Root dispersion : 0.002464003 seconds
Update interval : 2087.9 seconds
Leap status     : Normal
 
Last edited:

Similar threads

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