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.

GHammer

Senior Member
Thank you. I'm a bit of a persnickety person regarding time.
Now, I'll have to see what is needed for a minimal install; i.e. just this.
 

EmeraldDeer

Very Senior Member
1.0.9 released
Changelog
Code:
Completion of rename from ntpdMerlin to ntpMerlin
To update, use option u on the ntpmerlin menu
I have not had a graph update since upgrading to 1.0.9.
  • There was a lock message in the syslog
  • It turned out that there was an identical cron job at the top and bottom of cron table
  • Deleted second cronjob but no graphs
  • Uninstalled and reinstalled without deleting data
  • Somehow double cron job was back so deleted top one this time
  • Uninstalled again, with deleting data and ensuring no cron jobs left
  • No graph updates, just the initial blank graphs
  • File ntpdstats_rrd.rrd gets updated every five minutes
  • Output of ntpq -p looks fine
 

Butterfly Bones

Very Senior Member
Something new with v1.0.9. Not causing any issues as I can see, just a heads up in case it is important. I edited out all the other syslog entries, just for clarity.
Code:
Mar 26 16:30:48 ntpdMerlin: New version of ntpdMerlin available - updating to v1.0.9
Mar 26 16:30:49 ntpdMerlin: ntpdMerlin successfully updated
Mar 26 16:35:01 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 16:55:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 17:00:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 17:05:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 17:10:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 17:15:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 17:20:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 17:25:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 17:35:01 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 17:40:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 17:45:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 17:50:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 17:55:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 18:00:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 18:05:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 18:10:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Seems to have affected timing in the graph, but maybe I misunderstand the significance(?)

 

L&LD

Part of the Furniture
Something new with v1.0.9. Not causing any issues as I can see, just a heads up in case it is important. I edited out all the other syslog entries, just for clarity.
Code:
Mar 26 16:30:48 ntpdMerlin: New version of ntpdMerlin available - updating to v1.0.9
Mar 26 16:30:49 ntpdMerlin: ntpdMerlin successfully updated
Mar 26 16:35:01 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 16:55:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 17:00:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 17:05:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 17:10:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 17:15:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 17:20:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 17:25:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 17:35:01 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 17:40:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 17:45:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 17:50:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 17:55:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 18:00:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 18:05:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Mar 26 18:10:00 ntpMerlin: Lock file found (age: 0 seconds) - stopping to prevent duplicate runs
Seems to have affected timing in the graph, but maybe I misunderstand the significance(?)

Does a reboot help?

I have just completed a new (first!) RT-AC86U install and have installed RMerlin 384.10, amtm (+ more scripts, see my signature) and ntpMerlin. I see no such entries in syslog.
 

Butterfly Bones

Very Senior Member
I have not had a graph update since upgrading to 1.0.9.
  • There was a lock message in the syslog
  • It turned out that there was an identical cron job at the top and bottom of cron table
  • Deleted second cronjob but no graphs
  • Uninstalled and reinstalled without deleting data
  • Somehow double cron job was back so deleted top one this time
  • Uninstalled again, with deleting data and ensuring no cron jobs left
  • No graph updates, just the initial blank graphs
  • File ntpdstats_rrd.rrd gets updated every five minutes
  • Output of ntpq -p looks fine
There is a double entry in the /jffs/scripts/services-start script now. (First two are mine for the external LEDs on at 0700 and off at 2200). I used nano and removed one.
Code:
cru a lightsoff "0 22 * * * /jffs/scripts/ledsoff.sh"
cru a lightsson "0 7 * * * /jffs/scripts/ledson.sh"
/jffs/scripts/ntpmerlin startup # ntpdMerlin
/jffs/scripts/ntpmerlin startup # ntpMerlin
Does a reboot help?

I have just completed a new (first!) RT-AC86U install and have installed RMerlin 384.10, amtm (+ more scripts, see my signature) and ntpMerlin. I see no such entries in syslog.
I have had ntpMerlin since the first version posted yesterday and have done at least three updates.

I hate reboots. I'm an old long time Linux geek where we used to compete for long uptimes, 1000+ days. Rebooting is a numnum Microsoft wool-over-the-eyes solution to cover up real problems that are not solved. :D :p

I think removing the double entries in the /jffs/scripts/services-start script and editing the crontab -e are better solutions to the real problem instead of just blind reboots. Maybe I'm just a stubborn old geek. :rolleyes:
 
Last edited:

EmeraldDeer

Very Senior Member
I have not had a graph update since upgrading to 1.0.9.
  • There was a lock message in the syslog
  • It turned out that there was an identical cron job at the top and bottom of cron table
  • Deleted second cronjob but no graphs
  • Uninstalled and reinstalled without deleting data
  • Somehow double cron job was back so deleted top one this time
  • Uninstalled again, with deleting data and ensuring no cron jobs left
  • No graph updates, just the initial blank graphs
  • File ntpdstats_rrd.rrd gets updated every five minutes
  • Output of ntpq -p looks fine
I am starting to get graph data now. Perhaps waiting a half hour for graph data after a reinstall is called for even through the data files were being updated every five minutes.
 

L&LD

Part of the Furniture
There is a double entry in the /jffs/scripts/services-start script now. (First two are mind for the external LEDs on at 0700 and off at 2200). I used nano and removed one.
Code:
cru a lightsoff "0 22 * * * /jffs/scripts/ledsoff.sh"
cru a lightsson "0 7 * * * /jffs/scripts/ledson.sh"
/jffs/scripts/ntpmerlin startup # ntpdMerlin
/jffs/scripts/ntpmerlin startup # ntpMerlin

I have had ntpMerlin since the first version posted yesterday and have done at least three updates.
I hate reboots. I'm an old long time Linux geek where we used to compete for long uptimes, 1000+ days. Rebooting is a numnum Microsoft wool-over-the-eyes solution to cover up real problems that are not solved. :D :p

I think removing the double entries in the /jffs/scripts/services-start script and editing the crontab -e are better solutions to the real problem instead of just blind reboots. Maybe I'm just a stubborn old geek. :rolleyes:
That must be an error in the updater?

I have no double entry here.

Code:
#!/bin/sh

/jffs/scripts/ntpmerlin startup # ntpMerlin
 

L&LD

Part of the Furniture
I am starting to get graph data now. Perhaps waiting a half hour for graph data after a reinstall is called for even through the data files were being updated every five minutes.
Good to see it working for you.

Are the graphs supposed to auto-refresh? Or do I need to click the Refresh button at the bottom of that page?
 

Butterfly Bones

Very Senior Member
That must be an error in the updater?

I have no double entry here.

Code:
#!/bin/sh

/jffs/scripts/ntpmerlin startup # ntpMerlin
Yes, must be. I have no lock found entries now and cru l just shows one line for ntpMerlin, so I think that was it with the v.1.0.9 update.
 

EmeraldDeer

Very Senior Member
Good to see it working for you.

Are the graphs supposed to auto-refresh? Or do I need to click the Refresh button at the bottom of that page?
I am not sure it auto-refreshes.

Although there is some data displayed, all is not well. My recollection is that the graph would change along with a new timestamp every five minutes. Mine is stuck at 10:00 PM, one half hour ago. Oh well.
 

L&LD

Part of the Furniture
I am not sure it auto-refreshes.

Although there is some data displayed, all is not well. My recollection is that the graph would change along with a new timestamp every five minutes. Mine is stuck at 10:00 PM, one half hour ago. Oh well.
If I wait for the 5-minute marks and hit Refresh, it updates for me too. Otherwise, it just shows the last one displayed.
 

Butterfly Bones

Very Senior Member
The double entries in /jffs/scripts/services-start keep coming back, and therefore the double cron entries and the lock detected in syslog. I have completely uninstalled ntpMerlin, checked crontab (clean) and /jffs/scripts/services-start (one ntpMerlin cron entry - removed).

Now reinstall shows the cron entry in cru l and crontab, and not entry at all in /jffs/scripts/services-start. Hopefully this is solved. I see no lock detected entries in syslog after 20 minutes. :fingerscrosssed:
 

Jack Yaz

Part of the Furniture
Apologies all, I'll push 1.0.10 later to clean up the old name entries.

In the meantime, things to check are :

/jffs/scripts/services-start
cru d ntpdMerlin

The lock file was likely caused by concurrent cron jobs. The lock file resides in /tmp and can be removed if a stale entry is left (rebooting also works)

Time would have been fine during rhese issues, the problem was purely with stats/graph generation
 
Last edited:

Jack Yaz

Part of the Furniture
I am not sure it auto-refreshes.

Although there is some data displayed, all is not well. My recollection is that the graph would change along with a new timestamp every five minutes. Mine is stuck at 10:00 PM, one half hour ago. Oh well.
No auto refresh, manual required. Unfortunately the WebUI caches images for an hour, so despite best efforts in the asp page, a force reload (ctrl f5) is often required to see the latest graphs
 

JDB

Very Senior Member
No auto refresh, manual required. Unfortunately the WebUI caches images for an hour, so despite best efforts in the asp page, a force reload (ctrl f5) is often required to see the latest graphs
My solution to this was to put a refresh button at the top of the page rather than the bottom so it was easily accessible. I tried about 10 different forced auto refresh options in the asp and none worked as you say, only the button!


Sent from my iPhone using Tapatalk
 

Jack Yaz

Part of the Furniture
My solution to this was to put a refresh button at the top of the page rather than the bottom so it was easily accessible. I tried about 10 different forced auto refresh options in the asp and none worked as you say, only the button!


Sent from my iPhone using Tapatalk
Even the button proves unhelpful to me (in Chrome, at least). Seems location.reload(true) isn't honoured anymore? Not a web dev so there may be a better way!
 

Jack Yaz

Part of the Furniture
Really the issue is lighttpd adding a cache control header to image content type. That's likely firmware level and not something we can override for a single page
 

JDB

Very Senior Member
Hmm, odd. I’ll dig out my old version. I’m sure all I did was move the existing button, maybe I changed what it called too.
Sadly no lighttpd.conf.add option in @RMerlin custom config list as you could then probably change the config to disable caching.


Sent from my iPhone using Tapatalk
 

JDB

Very Senior Member
Hmm, odd. I’ll dig out my old version. I’m sure all I did was move the existing button, maybe I changed what it called too.
Sadly no lighttpd.conf.add option in @RMerlin custom config list as you could then probably change the config to disable caching.


Sent from my iPhone using Tapatalk
Looking at the source code looks like httpd pulls all its config directly from NVRAM so the caching header is probably baked into the source


Sent from my iPhone using Tapatalk
 

JDB

Very Senior Member
Hmm, odd. I’ll dig out my old version. I’m sure all I did was move the existing button, maybe I changed what it called too.
Sadly no lighttpd.conf.add option in @RMerlin custom config list as you could then probably change the config to disable caching.


Sent from my iPhone using Tapatalk
No mine was just doing location.reload(true); as well.
 
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