this is a back to the future bug and the delta between system time (at boot) and real time is larger than the double... hence the assert...
I followed install instructions just the other day:ntpd fails the assertion here: https://github.com/ntp-project/ntp/blob/stable/libntp/systime.c#L111
Don't know why...can you try with the newer binary from #71?
I have used the latest binaries and get the same result:
Jun 6 21:11:02 ntpd[11595]: ntpd 4.2.8p7@1.3265 Fri May 13 15:44:00 UTC 2016 (8): Starting
Jun 6 21:11:02 ntpd[11595]: Command line: ntpd -c /jffs/etc/ntp.conf
Jun 6 21:11:02 ntpd[11596]: systime.c:111: INSIST(sys_fuzz >= 0) failed
Jun 6 21:11:02 ntpd[11596]: exiting (due to assertion failure)
Thank you for the suggestion, but there is no additional information in the system log.
==== NTP =====
Time is the school in which we learn,\\
Time is the fire in which we burn.
-- Delmore Schwartz
Time is incredibly important when tracking performance, so we need to have a solid baseline for current time.
**Install NTP**
sudo apt install ntp
Not much to do here, except enable logging, and set up the servers...
sudo nano /etc/ntp.conf
Uncomment the stats...
# Enable this if you want statistics to be logged.
statsdir /var/log/ntpstats/
Optional - Update/modify the servers - in 16.04, the default pack has pools, not servers, so it's a choice, both are good.
# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
server 0.ubuntu.pool.ntp.org
server 1.ubuntu.pool.ntp.org
server 2.ubuntu.pool.ntp.org
server 3.ubuntu.pool.ntp.org
# Use Ubuntu's ntp server as a fallback.
server ntp.ubuntu.com
And save the file, restart/kick ntp...
sudo service ntp restart
you can check status by;
$ ntpq -p
Should see something similar to
$ ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
repos.lax-noc.c 127.67.113.92 2 u 1 64 1 19.803 -0.605 1.258
blue.1e400.net 173.66.221.127 2 u - 64 1 85.346 -0.744 0.581
hydrogen.consta 200.98.196.212 2 u 1 64 1 154.068 -32.902 16.849
*time-a.timefreq .ACTS. 1 u 1 64 1 75.428 2.214 1.264
2001:67c:1560:8 193.79.237.14 2 u 7 64 1 173.743 10.322 0.000
Back to the future - also make sure if the ntpstats is enabled in ntp.conf that the directory is writeable...
I don't quite understand entware / opkg. Is there some reason I should not use this binary?
ntpstats is disabled in the package of this thread. we don't use ntpstats for graphing.
Nice quote in your conf file btw
rrdtool graph \
--imgformat PNG /opt/home/public/localhost-ntp-offset.png \
--width 600 --height 200 \
--vertical-label "localhost" \
--title "`TZ=EST5EDT /bin/date -d 197001010000.1473552000`" \
--start 1473552000 \
--end 1473652800 \
DEF:offset=/opt/home/ntp/localhost.rrd:offset:LAST \
CDEF:noffset=offset,1000,/ \
LINE1:noffset#0000FF:"offset" \
GPRINT:noffset:LAST:%le
rrdtool graph \
--imgformat PNG /opt/home/public/localhost-ntp-sysjit.png \
--width 600 --height 200 \
--vertical-label "localhost" \
--title "`TZ=EST5EDT /bin/date -d 197001010000.1473552000`" \
--start 1473552000 \
--end 1473652800 \
DEF:sjit=/opt/home/ntp/localhost.rrd:sjit:LAST \
CDEF:nsjit=sjit,1000,/ \
LINE1:nsjit#0000FF:"sysjit" \
GPRINT:nsjit:LAST:%le
rrdtool graph \
--imgformat PNG /opt/home/public/localhost-ntp-clkjit.png \
--width 600 --height 200 \
--vertical-label "localhost" \
--title "`TZ=EST5EDT /bin/date -d 197001010000.1473552000`" \
--start 1473552000 \
--end 1473652800 \
DEF:cjit=/opt/home/ntp/localhost.rrd:cjit:LAST \
CDEF:ncjit=cjit,1000,/ \
LINE1:ncjit#0000FF:"cjit" \
GPRINT:ncjit:LAST:%le
rrdtool graph \
--imgformat PNG /opt/home/public/localhost-ntp-wander.png \
--width 600 --height 200 \
--vertical-label "localhost" \
--title "`TZ=EST5EDT /bin/date -d 197001010000.1473552000`" \
--start 1473552000 \
--end 1473652800 \
DEF:wander=/opt/home/ntp/localhost.rrd:wander:LAST \
LINE1:wander#0000FF:"wander" \
GPRINT:wander:LAST:%le
rrdtool graph \
--imgformat PNG /opt/home/public/localhost-ntp-freq.png \
--width 600 --height 200 \
--alt-autoscale \
--vertical-label "localhost" \
--title "`TZ=EST5EDT /bin/date -d 197001010000.1473552000`" \
--start 1473552000 \
--end 1473652800 \
DEF:freq=/opt/home/ntp/localhost.rrd:freq:LAST \
LINE1:freq#0000FF:"frequency (ppm)" \
GPRINT:freq:LAST:%lf
rrdtool graph \
--imgformat PNG /opt/home/public/localhost-ntp-disp.png \
--width 600 --height 200 \
--alt-autoscale \
--vertical-label "localhost" \
--title "`TZ=EST5EDT /bin/date -d 197001010000.1473552000`" \
--start 1473552000 \
--end 1473652800 \
DEF:disp=/opt/home/ntp/localhost.rrd:disp:LAST \
CDEF:ndisp=disp,1000,/ \
LINE1:ndisp#0000FF:"dispersion" \
GPRINT:ndisp:LAST:%lf
admin@RT-N66U:/tmp/home/root# cp /jffs/configs/fstab /etc; mount -a
admin@RT-N66U:/tmp/home/root# /opt/etc/init.d/S77ntpd-custom start
Starting ntpd... failed.
admin@RT-N66U:/tmp/home/root# /opt/etc/init.d/S77ntpd-custom start
Starting ntpd... failed.
admin@RT-N66U:/tmp/home/root# /jffs/bin/ntpstats.sh
/jffs/bin/ntpq: read: Connection refused618x248
618x248
618x248
618x248
618x248
admin@RT-N66U:/tmp/home/root#
Hello!
I've followed the tutorial from the first page, but I'm stuck when I have to start ntp daemon:
Code:admin@RT-N66U:/tmp/home/root# cp /jffs/configs/fstab /etc; mount -a admin@RT-N66U:/tmp/home/root# /opt/etc/init.d/S77ntpd-custom start Starting ntpd... failed. admin@RT-N66U:/tmp/home/root# /opt/etc/init.d/S77ntpd-custom start Starting ntpd... failed. admin@RT-N66U:/tmp/home/root# /jffs/bin/ntpstats.sh /jffs/bin/ntpq: read: Connection refused618x248 618x248 618x248 618x248 618x248 admin@RT-N66U:/tmp/home/root#
Any help would be appreciated!
Thanks!
Hi, for the start failure, what errors did you see in syslog? If no error messages logged, you can increase debug verbosity by adding additional arg "-d 2" to ARGS="".
Increase the integer to see more errors..
The second error is expected since ntpd died.
Sep 19 14:01:41 ntpd[12087]: ntpd 4.2.8p4@1.3265 Fri Jan 1 10:34:19 UTC 2016 (8): Starting
Sep 19 14:01:41 ntpd[12087]: Command line: ntpd -c /jffs/etc/ntp.conf
Sep 19 14:01:41 ntpd[12088]: systime.c:109: INSIST(sys_fuzz >= 0) failed
Sep 19 14:01:41 ntpd[12088]: exiting (due to assertion failure)
Sep 19 14:01:52 admin: Failed to start ntpd from .
Sep 19 14:02:02 ntpd[12147]: ntpd 4.2.8p4@1.3265 Fri Jan 1 10:34:19 UTC 2016 (8): Starting
Sep 19 14:02:02 ntpd[12147]: Command line: ntpd -c /jffs/etc/ntp.conf
Sep 19 14:02:02 ntpd[12148]: systime.c:109: INSIST(sys_fuzz >= 0) failed
Sep 19 14:02:02 ntpd[12148]: exiting (due to assertion failure)
Sep 19 14:02:02 admin: Failed to start ntpd from .
Hi,
In syslog I see:
Code:Sep 19 14:01:41 ntpd[12087]: ntpd 4.2.8p4@1.3265 Fri Jan 1 10:34:19 UTC 2016 (8): Starting Sep 19 14:01:41 ntpd[12087]: Command line: ntpd -c /jffs/etc/ntp.conf Sep 19 14:01:41 ntpd[12088]: systime.c:109: INSIST(sys_fuzz >= 0) failed Sep 19 14:01:41 ntpd[12088]: exiting (due to assertion failure) Sep 19 14:01:52 admin: Failed to start ntpd from . Sep 19 14:02:02 ntpd[12147]: ntpd 4.2.8p4@1.3265 Fri Jan 1 10:34:19 UTC 2016 (8): Starting Sep 19 14:02:02 ntpd[12147]: Command line: ntpd -c /jffs/etc/ntp.conf Sep 19 14:02:02 ntpd[12148]: systime.c:109: INSIST(sys_fuzz >= 0) failed Sep 19 14:02:02 ntpd[12148]: exiting (due to assertion failure) Sep 19 14:02:02 admin: Failed to start ntpd from .
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!