Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-10-2012, 07:30 AM
|
#1
|
LQ Newbie
Registered: Nov 2011
Distribution: WindRiver, RedHat
Posts: 17
Rep: 
|
NTPD exits after time reset
Hi,
I use ntpdate before starting ntpd on my board, however, as soon as the time is synchronized with the NTP server, ntpd exits silently with no messages in the logs :
Code:
root@myServer:/# cat /var/log/messages | grep ntp
Feb 10 13:10:16 NOTICE ntpdate[974]: step time server 192.168.29.211 offset 5.610707 sec
Feb 10 13:10:17 NOTICE ntpd[985]: ntpd 4.2.4p0@1.1472-o Thu Jan 6 11:12:03 UTC 2011 (1)
Feb 10 13:10:17 INFO /etc/init.d/ntpd: ntpd startup - OK
Feb 10 13:10:17 INFO ntpd[986]: precision = 10.895 usec
Feb 10 13:10:17 INFO ntpd[986]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled
Feb 10 13:10:17 INFO ntpd[986]: Listening on interface #1 lo, 127.0.0.1#123 Enabled
Feb 10 13:10:17 INFO ntpd[986]: Listening on interface #2 eth0, 192.168.29.200#123 Enabled
Feb 10 13:10:17 INFO ntpd[986]: kernel time sync status 0040
Feb 10 13:12:15 INFO watchdog[1292]: pidfile: /var/run/ntpd.pid
Feb 10 13:13:32 INFO ntpd[986]: synchronized to 192.168.29.211, stratum 11
Feb 10 13:13:32 NOTICE ntpd[986]: kernel time sync enabled 0001
Feb 10 13:28:39 NOTICE ntpd[986]: time reset +0.215637 s
Feb 10 13:28:45 ERROR watchdog[1292]: pinging process 986 (/var/run/ntpd.pid) gave errno = 3 = 'No such process'
Feb 10 13:28:45 INFO watchdog: Watchdog restarted ntpd
Feb 10 13:28:45 ERROR /etc/init.d/ntpd: ntpd shutdown - FAILED
Feb 10 13:28:46 NOTICE ntpd[1624]: ntpd 4.2.4p0@1.1472-o Thu Jan 6 11:12:03 UTC 2011 (1)
Feb 10 13:28:46 INFO ntpd[1625]: precision = 10.895 usec
Feb 10 13:28:46 INFO ntpd[1625]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled
Feb 10 13:28:46 INFO ntpd[1625]: Listening on interface #1 lo, 127.0.0.1#123 Enabled
Feb 10 13:28:46 INFO ntpd[1625]: Listening on interface #2 eth0, 192.168.29.200#123 Enabled
Feb 10 13:28:46 INFO ntpd[1625]: kernel time sync status 0040
Feb 10 13:28:46 INFO /etc/init.d/ntpd: ntpd startup - OK
Feb 10 13:32:01 INFO ntpd[1625]: synchronized to 192.168.29.211, stratum 11
Feb 10 13:32:01 NOTICE ntpd[1625]: kernel time sync enabled 0001
Every time I observe a "time reset" message in the log, the ntpd process gets killed somehow however the PID file still exits. I don't have any idea why is this happening. Here are the contents of my ntp.conf file :
Code:
driftfile /var/lib/ntp/drift
restrict 0.0.0.0 mask 0.0.0.0 noserve
server 192.168.29.211 prefer
restrict 192.168.29.211 mask 255.255.255.255 nomodify notrap noquery
I use the following command to start ntpd on my board:
Code:
ntpd -u ntp:ntp -p /var/run/ntpd.pid -g
The debug info shows the following:
Code:
ntpq> as
ind assID status conf reach auth condition last_event cnt
===========================================================
1 51965 9014 yes yes none reject reachable 1
ntpq> rv 51965
assID=51965 status=9014 reach, conf, 1 event, event_reach,
srcadr=192.168.29.211, srcport=123, dstadr=192.168.29.200, dstport=123,
leap=00, stratum=11, precision=-20, rootdelay=0.000,
rootdispersion=11.093, refid=LOCAL(0), reach=007, unreach=0, hmode=3,
pmode=4, hpoll=6, ppoll=6, flash=400 peer_dist, keyid=0, ttl=0,
offset=-0.314, delay=1.119, dispersion=1937.996, jitter=0.356,
reftime=d2e4ad11.612a2f53 Tue, Feb 14 2012 15:21:13.379,
org=d2e4ad1d.5fd4fdf0 Tue, Feb 14 2012 15:21:25.374,
rec=d2e4ad1d.600e34aa Tue, Feb 14 2012 15:21:25.375,
xmt=d2e4ad1d.5fc24ffd Tue, Feb 14 2012 15:21:25.374,
filtdelay= 1.12 0.47 0.47 0.00 0.00 0.00 0.00 0.00,
filtoffset= -0.31 0.03 0.05 0.00 0.00 0.00 0.00 0.00,
filtdisp= 0.02 0.98 1.95 16000.0 16000.0 16000.0 16000.0 16000.0
ntpdc> dmpeers
remote local st poll reach delay offset disp
===================================================================================
*192.168.29.211 192.168.29.200 11 64 377 0.00047 0.003895 0.04347
ntpdc> loopinfo
offset: 0.003637 s
frequency: 3.334 ppm
poll adjust: 18
watchdog timer: 27 s
ntpdc> monlist
remote address port local address count m ver code avgint lstint
===============================================================================
localhost 32782 127.0.0.1 5 7 2 2 54 0
192.168.29.211 123 192.168.29.200 10 4 4 1c0 64 46
ntpdc> pstats 192.168.29.211
remote host: 192.168.29.211
local interface: 192.168.29.200
time last received: 19s
time until next send: 47s
reachability change: 661s
packets sent: 11
packets received: 11
bad authentication: 0
bogus origin: 0
duplicate: 0
bad dispersion: 0
bad reference time: 0
candidate order: 6
flags: system_peer, config, bclient, prefer
ntptime
ntp_gettime() returns code 0 (OK)
time d2e4afb8.f3def000 Tue, Feb 14 2012 15:32:32.952, (.952621),
maximum error 65225 us, estimated error 1218 us
ntp_adjtime() returns code 0 (OK)
modes 0x0 (),
offset 2877.000 us, frequency 3.359 ppm, interval 1 s,
maximum error 65225 us, estimated error 1218 us,
status 0x1 (PLL),
time constant 6, precision 1.000 us, tolerance 512 ppm,
ntpstat
synchronised to NTP server (192.168.29.211) at stratum 12
time correct to within 18 ms
polling server every 64 s
Any suggestions?
Thanks
Mantis
Last edited by PrayingMantis; 02-14-2012 at 04:50 AM.
|
|
|
02-12-2012, 12:37 PM
|
#2
|
LQ Guru
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 6,174
|
Just the facts please....
Hi. I am not sure I can help, but I do see a LOT of information you have not provided.
What distribution are we talking about?
How did you install ntpd? (I see the NTPD version in the log.)
Why are you not using the startup script for ntpd provided in your distribution package? (assuming several things here)
Are you very sure it is exiting? What have you checked?
What have you tried that did not work, and what behavior did you observe?
|
|
|
All times are GMT -5. The time now is 07:47 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|