ntpd won't continue running on my "stratum 2" server (making our other systems a tad untrustworthy "as time goes by"). $ uname -a FreeBSD ezekiel.daleco.biz 6.2-RELEASE FreeBSD 6.2-RELEASE #5: Sat Jan 20 16:41:42 CST 2007 root@ezekiel.daleco.biz:/usr/obj/usr/src/sys/GENERIC i386 using ktrace and kdump I get this prior to exit: 12195 ntpd NAMI "/var/run/logpriv" 12195 ntpd RET connect 0 12195 ntpd CALL sendto(0x4,0xbfbfdd50,0x3e,0,0,0) 12195 ntpd GIO fd 4 wrote 62 bytes "<13>Mar 13 13:32:06 ntpd: logging to file /home/kadmin/ntp.log" 12195 ntpd RET sendto 62/0x3e 12195 ntpd CALL clock_gettime(0,0xbfbfeb08) 12195 ntpd RET clock_gettime 0 12195 ntpd CALL sigaction(0x1,0xbfbfeac0,0xbfbfeae0) 12195 ntpd RET sigaction 0 12195 ntpd CALL fork 12195 ntpd RET fork 12196/0x2fa4 12195 ntpd CALL exit(0) After this, I can't `pgrep ntpd` or find a pid with "ps -aux". I've found nothing in the logs; even using "-l $HOME/ntp.log". A windows box complains "no response" using Softros' "NTS". `ntpq -p" here shows ntpq -p remote refid st t when poll reach delay offset jitter ======================================================================= ezekiel.daleco. .INIT. 16 u 148 1024 0 0.000 0.000 4000.00 I can confirm that ntpd will continue to run if called with "-n" (do not fork). I've started a "buildworld" cycle. Any other suggestions? Can I do anything else "debugging" wise? Machine is about as close to "production" as we get, so rebuild with a debug kernel isn't something we'd really want to do, I think.... Thanks, Kevin Kinsey -- Computer programmers do it byte by byte.
Hi, Kevin-- On Mar 13, 2007, at 1:14 PM, Kevin Kinsey wrote:> ntpd won't continue running on my "stratum 2" server (making our > other systems a tad untrustworthy "as time goes by"). > > $ uname -a > FreeBSD ezekiel.daleco.biz 6.2-RELEASE FreeBSD 6.2-RELEASE #5: Sat > Jan 20 16:41:42 CST 2007 root@ezekiel.daleco.biz:/usr/obj/usr/src/ > sys/GENERIC i386 > > using ktrace and kdump I get this prior to exit:[ ... ] The logging paths seen in the ktrace are rather non-standard-- perhaps ntpd doesn't have the right permissions to write to them? Normally, ntpd logs to the NTP facility and critical messages might appear in /var/log/messages, so additional clues are probably there. Showing your ntp.conf file would also help, but if you'd like to see an example of a working stratum-2 conf file which has been in use for quite some time: 1-pi# cat /etc/ntp.conf # /etc/ntp.conf, configuration for ntpd driftfile /etc/ntp.drift statsdir /var/log/ntp/ statistics sysstats filegen sysstats file sysstats type week enable #logconfig =syncevents +sysevents # +allclock #statistics loopstats peerstats clockstats #filegen loopstats file loopstats type day enable #filegen peerstats file peerstats type day enable #filegen clockstats file clockstats type day enable server time.nist.gov maxpoll 12 server bonehed.lcs.mit.edu maxpoll 12 server sundial.columbia.edu maxpoll 12 server wwv.otc.psu.edu maxpoll 12 #peer pi.codefab.com maxpoll 12 peer pong.codefab.com maxpoll 12 peer shot.codefab.com maxpoll 12 peer ns1.pkix.net maxpoll 12 restrict default nomodify restrict localhost #discard average 9 minimum 2 #restrict default limited restrict 64.152.61.123 kod # ...list of bad clients being fed "kod" or "ignore" trimmed... 2-pi# grep ntp /etc/syslog.conf ntp.debug /var/log/ntp/ntp.log 3-pi# ntpq -p remote refid st t when poll reach delay offset jitter ======================================================================== =====-time.nist.gov .ACTS. 1 u 41m 68m 37 49.991 7.961 0.580 *bonehed.lcs.mit .CDMA. 1 u 204 68m 377 20.057 -2.610 6.201 +hickory.cc.colu 128.59.39.48 2 u 245 68m 377 25.537 -1.196 7.415 -otc1.psu.edu .WWV. 1 u 276 68m 377 36.047 -21.679 0.037 +pong 18.145.0.30 2 u 274 1024 377 0.257 -3.274 2.857 +shot 65.212.71.103 2 u 495 1024 377 0.343 1.467 0.664 -ns1 129.6.15.29 2 u 929 1024 376 0.389 -5.890 0.769 For more details, one could also see: http://ntp1.codefab.com/ntpstats/ntp_stats.txt http://www.pool.ntp.org/scores/199.103.21.227 -- -Chuck
In the last episode (Mar 13), Kevin Kinsey said:> ntpd won't continue running on my "stratum 2" server (making our other > systems a tad untrustworthy "as time goes by"). > > $ uname -a > FreeBSD ezekiel.daleco.biz 6.2-RELEASE FreeBSD 6.2-RELEASE #5: Sat Jan 20 16:41:42 CST 2007 root@ezekiel.daleco.biz:/usr/obj/usr/src/sys/GENERIC i386 > > using ktrace and kdump I get this prior to exit: > > 12195 ntpd NAMI "/var/run/logpriv" > 12195 ntpd RET connect 0 > 12195 ntpd CALL sendto(0x4,0xbfbfdd50,0x3e,0,0,0) > 12195 ntpd GIO fd 4 wrote 62 bytes > "<13>Mar 13 13:32:06 ntpd: logging to file /home/kadmin/ntp.log" > 12195 ntpd RET sendto 62/0x3e > 12195 ntpd CALL clock_gettime(0,0xbfbfeb08) > 12195 ntpd RET clock_gettime 0 > 12195 ntpd CALL sigaction(0x1,0xbfbfeac0,0xbfbfeae0) > 12195 ntpd RET sigaction 0 > 12195 ntpd CALL fork > 12195 ntpd RET fork 12196/0x2fa4 > 12195 ntpd CALL exit(0)It seems you're missing the -i flag to ktrace, which means you aren't tracing the child of this fork operation. This ktrace output looks a lot like the code in ntpd.c:ntpdmain(), in which ntpd forks, the parent immediately exits, and the child continues. -- Dan Nelson dnelson@allantgroup.com