LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
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


Reply
  Search this Thread
Old 02-10-2012, 08:30 AM   #1
PrayingMantis
LQ Newbie
 
Registered: Nov 2011
Distribution: WindRiver, RedHat
Posts: 17

Rep: Reputation: Disabled
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 05:50 AM.
 
Old 02-12-2012, 01:37 PM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,420

Rep: Reputation: 2630Reputation: 2630Reputation: 2630Reputation: 2630Reputation: 2630Reputation: 2630Reputation: 2630Reputation: 2630Reputation: 2630Reputation: 2630Reputation: 2630
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ntpd - time server, not time source bramankp Linux - Server 4 07-15-2011 09:58 AM
ntpdate/ntpd time is in UTC instead of local time? m4rtin Linux - Software 7 05-06-2011 08:57 AM
[SOLVED] Time sync in ntpd Hariharan Linux - Software 4 09-24-2010 03:36 AM
secure time synchronization with ntpd [GOD]Anck Slackware 3 04-03-2009 07:05 PM
ntpd time server problem MGrosskopf Linux - Networking 0 02-06-2005 09:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 10:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration