[ntp:questions] NTP time synchronization issue in linux embedded target

William Unruh unruh at invalid.ca
Wed Sep 3 14:38:04 UTC 2014


On 2014-09-02, Murugesh S <murugesh_ssn at yahoo.com> wrote:
> Hello,
>
> This email is regarding NTP time synchronization issue that we see in our linux embedded systems.
> NTP version that is being used: 4.2.6p4.
>
> Brief description about issue:
> Our linux system is configured with NTP running 4.2.6.p4. After couple of weeks the system clock has local time ahead /faster than actual time in NTP.
> The time delta is between 15 minutes to 30 minutes. The ntp.drift file reads value 500.00. This issue is observed in more than one system.

ntpd does not handle drifts higher than 500PPM. Your computer's clock is
misadjusted (eg bad initial calibration) or something else is badly
wrong.
You could try using chrony instead, which can handle faster drifts.

>
> From the logs, could see that the local system clock reference time was frozen weeks ago. 
> From the ntp association logs, could see that the NTP protocol exchange still happens rcv time : (Aug 12 10:32:36 CDT 2014); But the reference time reads : (Jul 21 21:03:46 CDT 2014)  from ntp status log.
>
> Trying to find out why / how the ntp.drift file reached 500.00 on several systems. 
>
> Logs captured in system with issue:
>==========================
> 1. clock: 
> 2014-08-12 10:32:15 CDT
>
>
> 2. ntp status:
>   Leap                     Clock is synchronized                                
>   Stratum                  5                                                    
>   Reference                <ip address of NTP server>
>   Frequency                500.0000 Hz                                          
>   Precision                2^-17                                                
>   Reference time           d7784502.1b9babc2 (Jul 21 21:03:46 CDT 2014)         
>   Clock Offset             164.519 msec                                         
>   Root delay               164.519 msec                                         
>   Root Dispersion          0.000 msec                                           
>
> 3. ntp associations detail:
> Server reachable, auth_none,last_event: reachable, stratum 4
> ref ID <ip address of server>, time d794a58f.4ccd83ab (Aug 12 09:39:11 CDT 2014)
> our mode client, peer mode server, our poll intvl 10, peer poll intvl 10
> root delay 109.30 msec, root disp 0.00, reach 377, 
> delay 0.06 msec, offset -882.6050 msec, dispersion 35.20
> precision 2**-6,
> org time 00000000.00000000 (Feb 07 00:28:16 CST 2036)
> rcv time d794b214.1bc65df9 (Aug 12 10:32:36 CDT 2014)
> xmt time 00000000.00000000 (Feb 07 00:28:16 CST 2036)
> filtdelay =  55.87  55.70  55.68  55.61  115.01  56.03  55.72  59.62  
> filtoffset =  -881879.45  -881396.98  -880822.61  -880219.19  -879752.22  -879248.85  -878747.85  -8filterror =  15.63  31.16  46.70  62.64  78.77  94.25  110.24  125.78  
> filterror =  15.63  31.16  46.70  62.64  78.77  94.25  110.24  125.78  
>
> Logs captured in working system with no issues:
>====================================
> 1. clock:
> 2014-08-12 10:17:35 CDT
>
> 2. ntp status :
>   Leap                     Clock is synchronized                                
>   Stratum                  5                                                    
>   Reference                <ip address of NTP server>                                       
>   Frequency                20.4580 Hz                                           
>   Precision                2^-17                                                
>   Reference time           d794ae92.b24e1fec (Aug 12 10:17:38 CDT 2014)         
>   Clock Offset             164.818 msec                                         
>   Root delay               164.818 msec                                         
>   Root Dispersion          0.000 msec                                  
>
> 3. ntp associations detail
> Server reachable, auth_none,stratum 4
>
> ref ID <ip address of server>, time d794a58f.4c7e6992 (Aug 12 09:39:11 CDT 2014)
> our mode client, peer mode server, our poll intvl 10, peer poll intvl 10
> root delay 109.30 msec, root disp 0.00, reach 377, 
> delay 0.06 msec, offset -1.8231 msec, dispersion 31.13
> precision 2**-6,
> org time 00000000.00000000 (Feb 07 00:28:16 CST 2036)
> rcv time d794ae92.b24e1fec (Aug 12 10:17:38 CDT 2014)
> xmt time 00000000.00000000 (Feb 07 00:28:16 CST 2036)
> filtdelay =  55.52  55.89  55.77  55.59  90.48  55.80  57.92  98.94  
> filtoffset =  -177.06  -187.36  -88.16  13.55  -11.23  18.13  15.52  -13.33  
> filterror =  15.63  31.22  46.76  62.31  78.24  94.35  109.88  125.34  
>
> Config file:
> -------------
> # Created by IMI. /var/etc/ntp.conf
> server <ip address of NTP> iburst
>
> # Drift file
> driftfile /etc2/ntp.drift
>
> restrict 127.0.0.1 
>
>
> It would be of great help, If NTP experts can help understand the root cause of this issue:
> 1. Why and what causes the drift to reach 500.00 on certain systems.
> 2. Any pointers to debug this issue would be really helpful. I am trying to google and find how others have debugged similar issue. No luck yet to identify root cause.
> 3. Has there been similar issues reported in NTP version 4.2.6p4 ? 
>
> Thanks & Regards,
> Murugesh.



More information about the questions mailing list