ntpMerlin ntpMerlin - NTP Daemon for AsusWRT Merlin

  • ATTENTION! You'll notice a Prefix dropdown when you create a thread. If your post applies to one of the topics listed, please use that Prefix for your post. When browsing the thread list you can use the Prefix to filter the view.

Jack Yaz

Part of the Furniture
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)
 

JGrana

Senior Member
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...
 

JT Strickland

Senior Member
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.
 

jsbeddow

Senior Member
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)?
 

thecheapseats

Regular Contributor
<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...
 

JT Strickland

Senior Member
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.
 

JGrana

Senior Member
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
 

Vexira

Part of the Furniture
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?
 

JT Strickland

Senior Member
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
 

JGrana

Senior Member
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.
 

Vexira

Part of the Furniture
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.
 

JT Strickland

Senior Member
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:

L&LD

Part of the Furniture
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

Part of the Furniture
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.

View attachment 26446

Otherwise, everything else looks good. :)
what do you expect to see? amtm checks the master/stable branch. develop is ahead, so the version is shown accordingly
 

L&LD

Part of the Furniture
@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. :)
 
Similar threads
Thread starter Title Forum Replies Date
P amtm AMTM - NTP not ready, check that router time is synced Asuswrt-Merlin AddOns 2

Similar threads

Sign Up For SNBForums Daily Digest

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