You could try setting the NTP server (Administration > System > NTP Server) to a bogus value.I am using Asus RT-AC56u (FW 380.62) at the mom I dont need the ntp service, because I set actual datetime manually.
How can I disable it persistently?
There isn't one.BTW which function does exist in router os to show actual state of a service?
I don't know, try it and find out. But I suspect the watchdog process will restart it. There are some parts of the routers functionality that require an accurate time source that a lot of effort has been directed to making sure the NTP client is always running.Would be a "killall ntp" at first on services-start a solution?
If you aren't using the TrendMicro stuff (Adaptive QoS, etc), the ability to disable the NTP service is available on my fork.I did this, but that doesnt really stops the service, every 30sec there is a syslog entry from ntp.
When the datetime is set manually (e.g. python script) on services-start event it seems it will be overwritten by another process back to original FW time.
Would be a "killall ntp" at first on services-start a solution?
Sticky post near the top of the forum.....374.43 LTS releasesI am new in this forum, where is y fork located?
In a pinch, you could try this to prevent the Asus' NTP CLIENT from running:How can I disable it persistently?
#!/bin/sh
if [ -f /jffs/clock-saved ]; then
# restore the clock
CLOCK="$(/usr/bin/head /jffs/clock-saved)" && SECONDS=${CLOCK#*.} && SECONDS=${SECONDS#*0} && /bin/date -u -s ${CLOCK%.*}.$(($SECONDS + 48))
# disable the Asus' NTP CLIENT
if [ $? -eq 0 ]; then
/usr/bin/killall ntpclient
/bin/mount -o bind /dev/null /usr/sbin/ntpclient
/usr/sbin/nvram set ntp_ready=1
/usr/sbin/nvram unset ntp_server0
/usr/sbin/nvram unset ntp_server1
/usr/sbin/nvram unset ntp_server_tried
fi
fi
#!/bin/sh
# save clock
/bin/date -u +%Y%m%d%H%M.%S > /jffs/clock-saved
Would be a "killall ntp" at first on services-start a solution?
When is this exactly? How can I find out when these events happen according to syslog?...kill it only after it has done its initial task of setting the clock and the nvram flag.
Am I right when I would set this global CLOCK value by the USB RTC device it would be to late because the RTC is available not until post-mount/services-start runs?...
if [ -f /jffs/clock-saved ]; then
# restore the clock
CLOCK="$(/usr/bin/head /jffs/clock-saved)" && SECONDS=${CLOCK#*.} && SECONDS=${SECONDS#*0} && /bin/date -u -s ${CLOCK%.*}.$(($SECONDS + 48))
...
Does this descrease the lifetime of the router in general? I dont run the router on 24/7 base it will be startup/shutdown upto 2 times /day only....
/usr/sbin/nvram set ntp_ready=1
/usr/sbin/nvram unset ntp_server0
/usr/sbin/nvram unset ntp_server1
/usr/sbin/nvram unset ntp_server_tried
...
When is this exactly? How can I find out when these events happen according to syslog?
My script requires that you set the clock manually, at some point. Example:Am I right when I would set this global CLOCK value by the USB RTC device it would be to late because the RTC is available not until post-mount/services-start runs?
/bin/date -s 201701201258.00
$GPZDA,205423.00,20,01,2017,00,00*63
$GPZDA,205424.00,20,01,2017,00,00*64
$GPZDA,205425.00,20,01,2017,00,00*65
$GPZDA,205426.00,20,01,2017,00,00*66
$GPZDA,205427.00,20,01,2017,00,00*67
$GPZDA,205428.00,20,01,2017,00,00*68
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!