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!

From the UI, I checked the box to store data on the usb instead of jffs, and when I looked at the system log, I had a fatal error:

Fatal error : Could not open configuration file /opt/share/ntpmerlin.d/chrony.conf : No such file or directory

I thought it was already set to usb, but I switched it back to jffs. Maybe a bug, but probably a windshield. I guess I should have put a config file there first?
I reset conmon to usb also and I thought it was already there, but it seemed to transition OK.

EDIT: My bad. The solid circles in the UI looked empty to me, and I had them backwards. Chalk up another mistake to the rookie.
 
Last edited:
I would have done the full reset days ago. A properly working router isn't an option today, it is a necessity. :)
 
how is this different from the NTP intercept already in the Merlin firmware on the System screen under Admin. Does that setting need to be off before installing this?
 
how is this different from the NTP intercept already in the Merlin firmware on the System screen under Admin. Does that setting need to be off before installing this?

It offers the choice of either a full ntpd function, or chrony.
It also provides a router GUI graph of how accurately it’s keeping time.

Chrony seems to be the latest super accurate means of keeping system time.
Ive tried both the ntpd & chrony options, a big difference in the graph. Chrony is the best for me.

Yes, turn off the router ntp option.
 

Hi Jack, can I float a few ideas for next release by you? I know you mentioned you were thinking that you might split chrony off in future and these aren't proper pull requests but my syntax is a bit rusty so I'll post them here instead, please forgive that :p

1) The script header on the menu when using chrony looks like this
Screenshot from 2020-10-26 14-07-06.png

Would it be ok to centre align the config line (not seen how the ntpmerlin equiv looks)
Code:
printf "\\e[1m##  Config location: %-35s ##\\e[0m\\n" "$CONFFILE_MENU"



2) Can we add an option to both show and toggle (similar to option t) whether chronyd is running able to listen and use ipv4+v6 ('ipv4+v6 mixed (default)' mode) or in ipv4 only ('ipv4 only' mode).
Perhaps there's a similar possibility for ntpd?

For chrony at least, something like this to check whether the -4 is present:

Code:
if [ "$TIMESERVER_NAME_MENU" = "chronyd" ]
    if [ grep -Fqsx 'ARGS="-r -u nobody -f $SCRIPT_STORAGE_DIR/chrony.conf"' /opt/etc/init.d/S77chronyd ]; then
        CHRONY_IP_VER="v4+v6 mixed"
    elif [ grep -Fqsx 'ARGS="-4 -r -u nobody -f $SCRIPT_STORAGE_DIR/chrony.conf"' /opt/etc/init.d/S77chronyd ]; then
        CHRONY_IP_VER="v4"
else
    CHRONY_IP_VER="N/A"
fi
and something like this that adds or removes the -4 on a toggle, then restarts chronyd with this new setting to take effect?
Code:
if [ "$TIMESERVER_NAME_MENU" = "chronyd" && $CHRONY_IP_VER="v4+v6 mixed" ]; then
    sed -i 's/ARGS="-r -u nobody -f $SCRIPT_STORAGE_DIR\/chrony.conf"/ARGS="-4 -r -u nobody -f $SCRIPT_STORAGE_DIR\/chrony.conf"/g' /opt/etc/init.d/S77chronyd
    Menu_RestartTimeServer
elif [ "$TIMESERVER_NAME_MENU" = "chronyd" && $CHRONY_IP_VER="v4" ]; then
    sed -i 's/ARGS="-4 -r -u nobody -f $SCRIPT_STORAGE_DIR\/chrony.conf"/ARGS="-r -u nobody -f $SCRIPT_STORAGE_DIR\/chrony.conf"/g' /opt/etc/init.d/S77chronyd
    Menu_RestartTimeServer
fi

(Again, apologies for the mess, I at least know the sed and grep commands do the right thing ha :oops::D)



3) Finally idea 3 might mean that the above suggestion makes the list of options in the menu and bit long. Perhaps split off the options related to graphs and stats to a separate 'stats menu' that could be invoked with s? I would love an option that could include 'none' as an option to turn off any stat collection that wasn't essential wherever possible.

Please tweak these as you see fit, I humbly submit them for inclusion! Thank you :)
 
Hi Jack, can I float a few ideas for next release by you? I know you mentioned you were thinking that you might split chrony off in future and these aren't proper pull requests but my syntax is a bit rusty so I'll post them here instead, please forgive that :p

1) The script header on the menu when using chrony looks like this
View attachment 27273
Would it be ok to centre align the config line (not seen how the ntpmerlin equiv looks)
Code:
printf "\\e[1m##  Config location: %-35s ##\\e[0m\\n" "$CONFFILE_MENU"



2) Can we add an option to both show and toggle (similar to option t) whether chronyd is running able to listen and use ipv4+v6 ('ipv4+v6 mixed (default)' mode) or in ipv4 only ('ipv4 only' mode).
Perhaps there's a similar possibility for ntpd?

For chrony at least, something like this to check whether the -4 is present:

Code:
if [ "$TIMESERVER_NAME_MENU" = "chronyd" ]
    if [ grep -Fqsx 'ARGS="-r -u nobody -f $SCRIPT_STORAGE_DIR/chrony.conf"' /opt/etc/init.d/S77chronyd ]; then
        CHRONY_IP_VER="v4+v6 mixed"
    elif [ grep -Fqsx 'ARGS="-4 -r -u nobody -f $SCRIPT_STORAGE_DIR/chrony.conf"' /opt/etc/init.d/S77chronyd ]; then
        CHRONY_IP_VER="v4"
else
    CHRONY_IP_VER="N/A"
fi
and something like this that adds or removes the -4 on a toggle, then restarts chronyd with this new setting to take effect?
Code:
if [ "$TIMESERVER_NAME_MENU" = "chronyd" && $CHRONY_IP_VER="v4+v6 mixed" ]; then
    sed -i 's/ARGS="-r -u nobody -f $SCRIPT_STORAGE_DIR\/chrony.conf"/ARGS="-4 -r -u nobody -f $SCRIPT_STORAGE_DIR\/chrony.conf"/g' /opt/etc/init.d/S77chronyd
    Menu_RestartTimeServer
elif [ "$TIMESERVER_NAME_MENU" = "chronyd" && $CHRONY_IP_VER="v4" ]; then
    sed -i 's/ARGS="-4 -r -u nobody -f $SCRIPT_STORAGE_DIR\/chrony.conf"/ARGS="-r -u nobody -f $SCRIPT_STORAGE_DIR\/chrony.conf"/g' /opt/etc/init.d/S77chronyd
    Menu_RestartTimeServer
fi

(Again, apologies for the mess, I at least know the sed and grep commands do the right thing ha :oops::D)



3) Finally idea 3 might mean that the above suggestion makes the list of options in the menu and bit long. Perhaps split off the options related to graphs and stats to a separate 'stats menu' that could be invoked with s? I would love an option that could include 'none' as an option to turn off any stat collection that wasn't essential wherever possible.

Please tweak these as you see fit, I humbly submit them for inclusion! Thank you :)
to answer:

1) i'll get that fixed, my bad

2) is this something a lot of users want? i'm loathe to add settings for the sake of

3) ntpmerlin is designed for stats collection and monitoring so i'm not keen to add an option that turns off my hard developed eye candy :(
 
to answer:

1) i'll get that fixed, my bad

2) is this something a lot of users want? i'm loathe to add settings for the sake of

3) ntpmerlin is designed for stats collection and monitoring so i'm not keen to add an option that turns off my hard developed eye candy :(
1) Minor ocd level problem, you needn't apologise lol

2) Chrony is great, but by default it runs listening on and ready to use ipv4 and ipv6 addresses. I'm sure users would like to have the option to disable ipv6 if they can't or don't use it.
Other programs like unbound provide the option 'do-ip6: yes/no' and give the user the choice, but unlike unbound, this would only require minor tweaking (adding -4) to the config and not necessarily need its own section of a config file.
With every ntpmerlin update using chrony, this line would otherwise need to be reapplied to tell it to stop listening on a protocol it can't use. This is the easier option because a better way would be to give the user the option at install of chrony ("would you like to install in v4 or mixed mode?"), but then they'll have to change the config if they change their mind later on which isn't ideal.

3) It is indeed lovely eye candy and tremendously helpful to look at when monitoring, but some users will just want to install it and forget about it and never ever look at stats at all. Why wouldn't there be an option to choose to turn it off?
 
3) It is indeed lovely eye candy and tremendously helpful to look at when monitoring, but some users will just want to install it and forget about it and never ever look at stats at all. Why wouldn't there be an option to choose to turn it off?

I like the eye candy! Helpful when tuning chrony client and server.
if users want an install and forget (which ntpmerlin does well) just don’t visit the add-on web page?
 

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