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!

To follow up on GoNz0, I also have a local GPS based NTP server. I worked on this project when kvic first started the NTP graph project. I use a Raspberry Pi and a Garmin GPS puck as the timeserver complete with PPS (which kvic added).
As you can see, I also changed ntp.conf to point to my local NTP server and also added pool north-america.pool.ntp.org.

NTP1.JPG
 
i had the same thing happen, i ended up uninstalling both, and then installing ntpmerlin then skynet.
skynet is waiting for the ntp server to sync the clock. its waiting for the default one that doesn't get deleted (its not supposed to)
I tried what you said and I still have the same problems. Thank you for your suggestion.
 
I was under the impression that when you use the reboot button that at some point nothing is running as it resets. So if things were not shut down gracefully, well they go down hard.

But your experience suggests that this is not the case. I do not have a guess how there could be a difference between off button reboot and webgui reboot button.

There are two scenarios for why the ntp client does not sync.

One is that there is no internet. Looking through my logs led me regard this as not likely. However, I do not use a router VPN client which complicates things.

The other is that the ntp client cannot lookup 0.us.pool.ntp.org. Since I have another NTP server on my LAN, I am using an IP addres for the ntp client to connect to, thus avoiding the possibility of a DNS lookup issue. I am also using stubby. I raise stubby because the installation places a line in the dnsmasq configuration just for the ntp client to lookup pool.ntp.org possibly before stubby is ready. Do you have such a line in your dnsmasq config, possibly for dnscrypt? If not, I wonder whether it could help.
Code:
# grep server /etc/dnsmasq.conf
server=127.0.0.1#5453
server=0::1#5453
server=/pool.ntp.org/1.1.1.1
The last line tells dnsmasq just to go to Cloudflare to lookup pool.ntp.org. You could have another line for your VPN provider.
When ever I edit the dnsmasq.conf file and save my changes, I reboot my router and the same thing happens. I go back to the dnsmasq.conf file and the changes I made are gone. Is there something else I should be doing to the dnsmasq.conf file after I save changes, like a restart command?
 
When ever I edit the dnsmasq.conf file and save my changes, I reboot my router and the same thing happens. I go back to the dnsmasq.conf file and the changes I made are gone. Is there something else I should be doing to the dnsmasq.conf file after I save changes, like a restart command?
Like many other files, it is recreated every boot.
Stubby puts the line in /jffs/configs/dnsmasq.conf.add which is appended to /etc/dnsmasq.conf each boot.
Code:
server=/pool.ntp.org/1.1.1.1
 
Finally got my "box of frogs" under control! :D
I'm on the USA west coast and using "server X.us.pool.ntp.org" (x=0-3).

screenshot-router-asus-com-8443-2019-04-01-10-58-57.png
 
What's a good method to manually uninstall this script. Right now Skynet and ntpMerlin are locked up and I can't uninstall them to reinstall them, and skynet being locked up is preventing my two vpn client's from finishing its connections, and leaves my router as expensive paper weight. Rebooting, still leaves both scripts processes locked
 
What's a good method to manually uninstall this script. Right now Skynet and ntpMerlin are locked up and I can't uninstall them to reinstall them, and skynet being locked up is preventing my two vpn client's from finishing its connections, and leaves my router as expensive paper weight. Rebooting, still leaves both scripts processes locked
Renaming /jffs/scripts/ntpmerlin will break the automated calls
Code:
mv /jffs/scripts/ntpmerlin /jffs/scripts/ntpmerlin.bak
as well as running
Code:
killall ntpmerlin

Not sure how your router has got locked up though...
 
Renaming /jffs/scripts/ntpmerlin will break the automated calls
Code:
mv /jffs/scripts/ntpmerlin /jffs/scripts/ntpmerlin.bak
as well as running
Code:
killall ntpmerlin

Not sure how your router has got locked up though...

I ended up removing the scripts, with the the rm command and removing its services line and cron job, after a reboot. Everything is working again, albeit Skynet is stilled locked up after the reboot though. But, that's another question for Adamm lol.

I would love to get this script working and give it a test drive, is there maybe conflicting script's calling the NTP daemon, which is locking thing's up? Or, should I disable some thing's and install it in a specific order?
 
I ended up removing the scripts, with the the rm command and removing its services line and cron job, after a reboot. Everything is working again, albeit Skynet is stilled locked up after the reboot though. But, that's another question for Adamm lol.

I would love to get this script working and give it a test drive, is there maybe conflicting script's calling the NTP daemon, which is locking thing's up? Or, should I disable some thing's and install it in a specific order?
It might be something to do with ntpd starting and killing ntp (client) before it has synced and set the nvram (ntp_ready i think)
 
When ever I edit the dnsmasq.conf file and save my changes, I reboot my router and the same thing happens. I go back to the dnsmasq.conf file and the changes I made are gone. Is there something else I should be doing to the dnsmasq.conf file after I save changes, like a restart command?
I did this:

1. Go to Administration tab and click the NTP link.

upload_2019-4-1_18-45-40.png


2. On the NTP website, do some research and find the NTP server that is closest to you location:

3. For example, in North America, these are the servers that are available:
upload_2019-4-1_18-26-10.png


4. Use a IP geolocation finder site such as: https://tools.keycdn.com/geo. Plug in one of the servers and look at the map to see if any of them are closest to your location.

5. Choose the server that is closest to you and enter it under the NTP server space (delete ntp.pool.org and replace it with you server-see pic above)

upload_2019-4-1_18-30-36.png


6. Then SSH into your router and got to your ntpMerlin menu. Pick option 8 from your AMTM menu:

Code:
 5  open     Skynet                    v6.8.4
 6  open     Stubby DNS                v1.1.1
 7  install  YazFi enhanced guest WiFi
 8  open     ntpMerlin                 v1.1.1

7. Once in ntpMerlin menu, choose option 3:

Code:
1.    Generate updated ntpMerlin graphs now

2.    Toggle redirect of all NTP traffic to ntpMerlin
      (currently Enabled)

3.    Edit ntpMerlin config

u.    Check for updates
uf.   Update ntpMerlin with latest version (force update)

e.    Exit ntpMerlin

z.    Uninstall ntpMerlin

8. Pick option 1 (nano):

Code:
1.    nano (recommended for beginners)
2.    vi

e.    Exit to main menu

9. When the window opens op, I deleted all the other servers and only left (added) there the server I chose:

Code:
# replace the following time servers to the ones close to you
# see http://twiki.ntp.org/bin/view/Servers/NTPPoolServers
server 0.pool.ntp.org iburst

10. Then to save your changes, type Ctrl+X and Enter

11. Then enter this command:

Code:
/opt/etc/init.d/S77ntpd restart

12. Then go to your NTP Daemon tab (Under Tools), hit Refresh (at the bottom) and.........I am hoping that soon you will have a more stabilized graph like the one shown below.
upload_2019-4-1_18-41-34.png


You can actually tell from the graph when I made the same changes.;)

Hope this helps.
 
It might be something to do with ntpd starting and killing ntp (client) before it has synced and set the nvram (ntp_ready i think)

I do remember reading about that earlier in the thread, is that something you're working on in a new iteration of the script? Or, do you have a dirty fix, you think might work
 
I did this:

1. Go to Administration tab and click the NTP link.

View attachment 16810

2. On the NTP website, do some research and find the NTP server that is closest to you location:

3. For example, in North America, these are the servers that are available:
View attachment 16807

4. Use a IP geolocation finder site such as: https://tools.keycdn.com/geo. Plug in one of the servers and look at the map to see if any of them are closest to your location.

5. Choose the server that is closest to you and enter it under the NTP server space (delete ntp.pool.org and replace it with you server-see pic above)

View attachment 16808

6. Then SSH into your router and got to your ntpMerlin menu. Pick option 8 from your AMTM menu:

Code:
 5  open     Skynet                    v6.8.4
 6  open     Stubby DNS                v1.1.1
 7  install  YazFi enhanced guest WiFi
 8  open     ntpMerlin                 v1.1.1

7. Once in ntpMerlin menu, choose option 3:

Code:
1.    Generate updated ntpMerlin graphs now

2.    Toggle redirect of all NTP traffic to ntpMerlin
      (currently Enabled)

3.    Edit ntpMerlin config

u.    Check for updates
uf.   Update ntpMerlin with latest version (force update)

e.    Exit ntpMerlin

z.    Uninstall ntpMerlin

8. Pick option 1 (nano):

Code:
1.    nano (recommended for beginners)
2.    vi

e.    Exit to main menu

9. When the window opens op, I deleted all the other servers and only left (added) there the server I chose:

Code:
# replace the following time servers to the ones close to you
# see http://twiki.ntp.org/bin/view/Servers/NTPPoolServers
server 0.pool.ntp.org iburst

10. Then to save your changes, type Ctrl+X and Enter

11. Then enter this command:

Code:
/opt/etc/init.d/S77ntpd restart

12. Then go to your NTP Daemon tab (Under Tools), hit Refresh (at the bottom) and.........I am hoping that soon you will have a more stabilized graph like the one shown below.
View attachment 16809

You can actually tell from the graph when I made the same changes.;)

Hope this helps.
Actually I got this to working today around 1:05pm this afternoon. Thanks for the advice. I did what you said though and it works fine so far. Again thanks for your help.
 
Little by little, I have been working my way down the "custom" wormhole. As I weigh the trade-off between increased time spent dinking and the value of add-0ns, I wonder where this NTP server fits. Isn't the factory NTP server sufficient? I've not noticed any issues related to the factory NTP server.
 
Little by little, I have been working my way down the "custom" wormhole. As I weigh the trade-off between increased time spent dinking and the value of add-0ns, I wonder where this NTP server fits. Isn't the factory NTP server sufficient? I've not noticed any issues related to the factory NTP server.
For me (and I suspect others), it's all about the fancy graphs. :) I actually don't even use the router as my timeserver, I just use ntpMerlin for the graphs.
 
Little by little, I have been working my way down the "custom" wormhole. As I weigh the trade-off between increased time spent dinking and the value of add-0ns, I wonder where this NTP server fits. Isn't the factory NTP server sufficient? I've not noticed any issues related to the factory NTP server.

Does the factory NTP server offer graphs? Does the factory NTP server keep accurate enough time for you? Does the factory NTP server self-correct to give connected clients the most accurate time possible?

I've not noticed any issues either with ntpMerlin and it offers so much more! ;)

Come on down, a little deeper, a little more customized and where the customizations have their own thread on an awesome forum. :) :) :)
 
Thanks all. I'll probably try Diversion as my first foray into add-ons. This NTP server would probably be second.
 
Little by little, I have been working my way down the "custom" wormhole. As I weigh the trade-off between increased time spent dinking and the value of add-0ns, I wonder where this NTP server fits. Isn't the factory NTP server sufficient? I've not noticed any issues related to the factory NTP server.
You’re here for a better experience, right?
When the router references a clock with the accuracy this script allows (correcting jitter and drift down to the nanosecond range - a billionth of a second), and all the devices on the network do as well, the network...flows optimally. The router simply moves data packets around rather than trying to sort out timing issues, with no “wait, who was first? What happened? Let me fit that in...uhhh, HERE.” sort of thing. It runs like a top, a properly timed engine in a car, a movie/tv show where the lips match the dialog, with the precision of the movements of planets in The solar system...elegantly, efficiently.
That’s how HUGE this is.
For the average user, factory is sufficient. But you flashed Merlin for better. And this is a major part of making the hardware and software controlling it do exactly that. You may think you realize the power at your fingertips, quietly doing its thing without any fuss, but this makes it quieter and more fussless, essentially getting you really moving at the speed of your internet connection.
 

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