What's new

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!

@spanjap This is probably very easy to do but since I am new at this......How do you do the above lines in bold? I have already installed nap-utils and ntpd. Thank you.
Code:
cp /opt/var/spool/ntp/ntpdc /jffs/bin/
cp /opt/var/spool/ntp/ntpdq /jffs/bin/
cp /opt/sbin/ntpd /jffs/bin/
[/QUOTE]
For some reason nothing happens when I copy these....
 
For AC86U - try this xml: https://pastebin.com/a6gC3vwy (thanks to @kvic)
Save in "/opt/var/spool/ntp"

Then follow:
You can now convert it on your 64-bit RT-AC86U with "rrdtool restore -f /opt/var/spool/ntp/stats.xml /opt/var/spool/ntp/stats.rrd"
The stats.rrd file is now 64-bit and should work.
Test it with "/jffs/bin/ntpstats.sh" and there should be no errors. With the 32-bit file I've got errors. (ds_def malloc)
https://www.snbforums.com/threads/ntp-daemon-for-asuswrt-merlin.28041/page-21#post-401589
 
I received the following after running rrdtool.
Code:
hardcat@RT-AC86U:/tmp/mnt/USB1/entware/var/spool/ntp# rrdtool restore -f /opt/var/spool/ntp/stats.xml /opt/var/spool/ntp/stats.rrd
ERROR: Incompatible file version, detected version . This is not supported by the version 0003 restore tool.
Should I try going back to an older version of rrdtool?

Update: Actually ended up with a newer version of rrdtool that worked and was installed on a Fedora Linux Virtual Machine. Once created, copied back to the appropriate directory on the USB stick and restarted ntpd.
 
Last edited:
Managed to get a new stats.rrd by running rrdtool restore on a Fedora Linux VM, testing now to see if that works. Thanks to @Jack Yaz !
 
Happy to report the graphs are now updating as expected. Very pleased with the new stats.rrd file.:)
 
@Jack Yaz,

Thank you for for sending this! I did not have a whole lot of time today try this! Bit I will do my best to study this thread and hopefully I will figure something out. As I mentioned earlier I am still trying hard to understand some of these commands. Thank you all for being patient with me.

Would really appreciate if any of you would have the time to literally describe step-by-step commands how you were able to get this accomplished in your AC86U for newbies in the scripting area like me. I am hoping that @JDB will perhaps come up with an installation package (similar to Diversion or Skynet) that will require one to to get the entire program installed with only few key strokes although I realize that may not always be possible.[emoji120]

I also realize how frustrating it must be at times for some of you with advanced knowledge to continuously repeat things so many times to folks like me. But just like many others on these forums, I cannot thank you enough for your time and assistance and always appreciate the fact that you never get tired at passing on this knowledge to all of us! This is the reason why I keep coming back to these forums, and once again, thank you for all you do and for tireless contribution to the forums.


Sent from my iPhone using Tapatalk
 
Maybe move the mount -a line after the Diversion entry. Mine loads Entware.
Thanks, that made it work again! Umm... three times though. :D

Screenshot_20181118_121848.png


I'm guessing it's because I tried fixing this by applying the instructions (mainly, the one using sed) twice again after it didn't work the first time. How do I reset this?
 
I'm guessing it's because I tried fixing this by applying the instructions (mainly, the one using sed) twice again after it didn't work the first time. How do I reset this?

I think you're spot on. You can undo the 'sed' by manually editing the file. If that's too much, simply remove directory and its content, and re-apply by following instructions from the Wiki.
 

@Jack Yaz

Ok, how do I go about doing this? I go the this past bin website and download this file? And then how do I save it to"/opt/var/spool/ntp"?

I am also trying to understand all the instructions from @spanjap to try install this in my AC86U.

@spanjap: Would there be a way to translate your instructions into step-by-step commands that can be copied and pasted during this installation? I am sure folks who are new at scripting like me would appreciate having following a guide like that.

Thank you to both!
 
Hi all,
I am retrying to install NTP using these commands as shown below:

Install ntp-utils with 'opkg install ntp-utils'. Copy ntpdc and ntpq from /opt/var/spool/ntp to /jffs/bin.
Install ntpd with 'opkg install ntpd'. Copy ntpd from /opt/sbin to /jffs/bin.

I began with:

Code:
@RT-AC86U-99A8:/tmp/home/root# opkg install ntp-utils
Package ntp-utils (4.2.8p12-1) installed in root is up to date.

Code:
@RT-AC86U-99A8:/tmp/home/root# opkg install ntpd
Package ntpd (4.2.8p12-1) installed in root is up to date.

then tried:

Code:
@RT-AC86U-99A8:/tmp/home/root# cp /opt/var/spool/ntp/ntpdc /jffs/b
in/
cp: can't stat '/opt/var/spool/ntp/ntpdc': No such file or directory

Code:
@RT-AC86U-99A8:/tmp/home/root# cp /opt/var/spool/ntp/ntpdq /jffs/b
in/
cp: can't stat '/opt/var/spool/ntp/ntpdq': No such file or directory

What I am doing wrong?

Also....@Jack Yaz and others.....Could you please show me how to save a .xml file to this folder? Do I go to this pastebin site and "download" it to a folder in my PC and then copy it to /opt/var/spool/ntp? I guess I have never played with a .xml file before

Code:
For AC86U - try this xml: https://pastebin.com/a6gC3vwy (thanks to @kvic)
Save in "/opt/var/spool/ntp"

Appreciate your guidance on how to make this happen on my AC86U.....
 
Hi all,
I am retrying to install NTP using these commands as shown below:



I began with:

Code:
@RT-AC86U-99A8:/tmp/home/root# opkg install ntp-utils
Package ntp-utils (4.2.8p12-1) installed in root is up to date.

Code:
@RT-AC86U-99A8:/tmp/home/root# opkg install ntpd
Package ntpd (4.2.8p12-1) installed in root is up to date.

then tried:

Code:
@RT-AC86U-99A8:/tmp/home/root# cp /opt/var/spool/ntp/ntpdc /jffs/b
in/
cp: can't stat '/opt/var/spool/ntp/ntpdc': No such file or directory

Code:
@RT-AC86U-99A8:/tmp/home/root# cp /opt/var/spool/ntp/ntpdq /jffs/b
in/
cp: can't stat '/opt/var/spool/ntp/ntpdq': No such file or directory

What I am doing wrong?

Also....@Jack Yaz and others.....Could you please show me how to save a .xml file to this folder? Do I go to this pastebin site and "download" it to a folder in my PC and then copy it to /opt/var/spool/ntp? I guess I have never played with a .xml file before

Code:
For AC86U - try this xml: https://pastebin.com/a6gC3vwy (thanks to @kvic)
Save in "/opt/var/spool/ntp"

Appreciate your guidance on how to make this happen on my AC86U.....

I can help you with the location of the files that got installed by opkg.

They are located in /opt/sbin after the install. So to copy you need:
Code:
cp /opt/sbin/ntpdc /jffs/bin/

cp /opt/sbin/ntpdq /jffs/bin
 
I can help you with the location of the files that got installed by opkg.

They are located in /opt/sbin after the install. So to copy you need:
Code:
cp /opt/sbin/ntpdc /jffs/bin/

cp /opt/sbin/ntpdq /jffs/bin

Thank you @HardCat! I will try them when I get back from work tonight! Have a good day!


Sent from my iPhone using Tapatalk
 
I can help you with the location of the files that got installed by opkg.

They are located in /opt/sbin after the install. So to copy you need:
Code:
cp /opt/sbin/ntpdc /jffs/bin/

cp /opt/sbin/ntpdq /jffs/bin

When try this I get:

Code:
@RT-AC86U-99A8:/tmp/home/root# cp /opt/sbin/ntpdc /jffs/bin/

but then:

Code:
@RT-AC86U-99A8:/tmp/home/root# cp /opt/sbin/ntpdq /jffs/bin
cp: can't stat '/opt/sbin/ntpdq': No such file or directory
 
I received the following after running rrdtool.
Code:
hardcat@RT-AC86U:/tmp/mnt/USB1/entware/var/spool/ntp# rrdtool restore -f /opt/var/spool/ntp/stats.xml /opt/var/spool/ntp/stats.rrd
ERROR: Incompatible file version, detected version . This is not supported by the version 0003 restore tool.
Should I try going back to an older version of rrdtool?

Update: Actually ended up with a newer version of rrdtool that worked and was installed on a Fedora Linux Virtual Machine. Once created, copied back to the appropriate directory on the USB stick and restarted ntpd.

How did you create a stats.xml file? Did you use:

Code:
nano stats.xml

and then copied the code in it?
 
When try this I get:

Code:
@RT-AC86U-99A8:/tmp/home/root# cp /opt/sbin/ntpdc /jffs/bin/

but then:

Code:
@RT-AC86U-99A8:/tmp/home/root# cp /opt/sbin/ntpdq /jffs/bin
cp: can't stat '/opt/sbin/ntpdq': No such file or directory

What is the output of the ls command on the /opt/sbin directory?
 
How did you create a stats.xml file? Did you use:

Code:
nano stats.xml

and then copied the code in it?
My previous posts #443 and #444 in this thread explain what I did to get the stats file working.:)
 
What is the output of the ls command on the /opt/sbin directory?

Here you go:

Code:
@RT-AC86U-99A8:/tmp/home/root# ls /opt/sbin
getdns_query  ntpd          ntpq          route
ifconfig      ntpdc         ntptime       stubby
 
and also:

Code:
@RT-AC86U-99A8:/tmp/home/root# ls /jffs/bin
ntpd         ntpdc        ntpq         ntpstats.sh
 
and my opt/var/spool directory does not exist:

Code:
@RT-AC86U-99A8:/tmp/home/root# ls opt/var/spool/
ls: opt/var/spool/: No such file or directory
 
and my opt/var/spool directory does not exist:

Code:
@RT-AC86U-99A8:/tmp/home/root# ls opt/var/spool/
ls: opt/var/spool/: No such file or directory

I see why the command you entered above did not work for you. Try the ls command on the directory /opt/var/spool notice the leading slash before opt. In there should be a ntp directory with the following contents after the installation is complete with any modifications for the RT-AC86U and ntpd is running.
Code:
-rw-r--r--    1 1000     1000          4904 Nov  6 15:45 Tools_NtpdStats.asp
-rw-r--r--    1 hardcat  root             6 Dec 23 07:13 ntp.drift
-rw-r--r--    1 hardcat  root           571 Dec 14 13:14 ntp.log
-rw-rw-rw-    1 hardcat  root        128320 Dec 23 07:55 stats.rrd
-rw-rw-rw-    1 hardcat  root        352519 Nov 12 09:01 stats.xml

Clearly, as you had requested previously and because the RT-AC86U requires modifications to the installation procedures provided by @kvic, a step-by-step guide is what you need.

My current configuration at this time is working and I do not want to redo it yet in order to create a step-by-step, but will certainly keep it in mind for when I do. In the mean time perhaps @JDB will get a chance to complete what he was planning once he receives his RT-AC86U.:)
 

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