1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

NTP, NTPD, and NTPD_SYNCED ???

Discussion in 'Asuswrt-Merlin' started by Jeffrey Young, Mar 28, 2020.

  1. Jeffrey Young

    Jeffrey Young Regular Contributor

    Joined:
    Dec 22, 2019
    Messages:
    65
    Location:
    Canada
    Ok, so while we all have been stuck huddled in our home during this time, I have been playing around learning the more finer points of getting my router to do varies nifty things just because I can, and because I am bored.

    I have been doing a lot of searching here and on Google for how to play around with time (like I don't have plenty of it now). I have seen a few scripts on the wiki that talk about 'ntpclient', however, that command seems to be depreciated in favour of the Busybox ntp/d command. Thing is, there does not seem to be any good, and simple language, articles as to what is the difference between NTP and NTPD. I am assuming one is the client, and one is the server. Yet, the help for each is identical. On the web, Busybox speaks about the /etc/config/system file - which does not exist on merlin.

    Lastly, the -S option to each (from other posts here) is pointed to /sbin/ntpd_synced and it runs every 11 minutes. I am assuming this is part of the server side of ntp or ntpd.

    This all started out with just wanting to set the time, which I think I can do by simply using

    ntp -q -t -p time.nrc.ca

    Yet I read another post that tells me that ntp will not set the time, but ntpd will.

    Someone want to un-confuse me about what the three actually do (ntp, ntpd, ntpd_synced).

    Thanks
     
    peepsnet likes this.
  2. dave14305

    dave14305 Part of the Furniture

    Joined:
    May 19, 2018
    Messages:
    2,939
    Location:
    USA
    I’ll take the easy part. ntpd_synced is a utility to inform the rest of the firmware that ntp has successfully synced the time and to take actions on services that require a restart once the router has a valid clock.
     
  3. dave14305

    dave14305 Part of the Furniture

    Joined:
    May 19, 2018
    Messages:
    2,939
    Location:
    USA
    ntp and ntpd both link to busybox, so I assume ntp is just an alias for ntpd.
     
  4. Jeffrey Young

    Jeffrey Young Regular Contributor

    Joined:
    Dec 22, 2019
    Messages:
    65
    Location:
    Canada
    That is good to know ...... Also seems to be very important. Thanks
     
  5. EmeraldDeer

    EmeraldDeer Very Senior Member

    Joined:
    Dec 22, 2017
    Messages:
    656
    Location:
    Massachusetts
    I cannot definitively answer your questions and do not see the point in doing so.

    Busybox compiles stripped down versions into one binary which responds based on the link name by which it is called. The idea is to minimize resource requirements on modest hardware such as in home routers.

    The point of adding a feature to the firmware is that it is only configured minimally through the GUI, resulting in superior reliability as opposed to people fiddling around in the dark with it.

    The firmware NTP has both an NTP client "/usr/sbin/ntp -> ../../bin/busybox" and an NTP server "/usr/sbin/ntpd -> ../../bin/busybox". Both are contained within the busybox binary. I do not know what "/sbin/ntpd_synced -> rc" is. I suspect that it is related to providing synchronization status to other router services and not part of client or server.

    An NTP client synchronizes just the device it runs on while an NTP server can also provide synchronization to other devices. Providing NTP service to the devices on your network from the router is good form because only one device is polling multiple internet time servers. Otherwise, all your devices could add up to dozens of servers being polled.

    For those who want to tinker with the full version of NTPD there is the addon ntpMerlin.