Results 1 to 7 of 7

Thread: ntp Offset value too high

  1. #1
    Junior Member
    Join Date
    May 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Unhappy ntp Offset value too high

    Hi guys,

    i have a problem here whereby some 20 over servers in my network is having regular Offset values. The configured threshold is 55, but whenever it exceeds 55, i have alerts coming in. My questions are;

    1)how do i find out what is causing the Offset value to be high?
    2)i have workaround in mind, that is to create a cronjob to restart the ntp daily, or hourly - is this workaround an acceptable practice?


    My main concern is to find out what is causing the frequent offset spike/increase...please advise on this...


    real example from my servers:

    -bash-2.05b$ /usr/sbin/ntpq -np -c assoc
    remote refid st t when poll reach delay offset jitter
    ================================================== ============================
    *10.211.0.246 57.7.62.97 4 u 111 128 377 0.679 -0.689 0.159
    +10.211.0.254 57.7.62.97 4 u 109 128 377 288.260 144.072 143.251
    ind assID status conf reach auth condition last_event cnt
    ================================================== =========
    1 47484 9614 yes yes none sys.peer reachable 1
    2 47485 9414 yes yes none candidat reachable 1


    root@server:~# /usr/sbin/ntpq -np -c assoc
    remote refid st t when poll reach delay offset jitter
    ================================================== ============================
    10.211.0.246 57.7.62.97 4 u 22 64 1 0.439 0.044 0.004
    10.211.0.254 57.7.62.97 4 u 23 64 1 1245.50 623.659 0.004
    ind assID status conf reach auth condition last_event cnt
    ================================================== =========
    1 40284 9014 yes yes none reject reachable 1
    2 40285 9014 yes yes none reject reachable 1

  2. #2
    Senior Member raj's Avatar
    Join Date
    Jun 2005
    Location
    Hyderabad
    Posts
    565
    Thanks
    57
    Thanked 40 Times in 37 Posts
    Rep Power
    13

    Default

    Are you running your os inside XEN or any other virtualization based technology? Usually, those needs some tweaking using /etc/sysctl.conf kernel values. Also check out ntp log file. Also, please post your output using code tags so that is readable for rest of us.
    Raj
    Linux rulz.
    I have never turned back in my life ; I shall not do so today.. haha

  3. #3
    Junior Member
    Join Date
    May 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    hi Raj,

    These are not vm, but physical HP (ProLiant BL680c G5) boxes, with RHEL 4 and 5. Below are my logs..
    Code:
    root@server:~# ntpstat
    synchronised to NTP server (10.211.0.246) at stratum 5
       time correct to within 58 ms
       polling server every 1024 s
    
    
    root@server:~# ntptrace
    localhost.localdomain: stratum 5, offset 0.004120, synch distance 0.198797
    some.ntpserver.com: stratum 4, offset 0.000032, synch distance 0.1                                                                                                                  44475
    57.7.62.97: timed out, nothing received
    ***Request timed out
    
    
    
    root@server:~# grep -i ntp /var/log/messages
    May 18 09:22:59 server ntpd[21964]: ntpd exiting on signal 15
    May 18 09:22:59 server ntpd: ntpd shutdown succeeded
    May 18 09:23:00 server ntpdate[30499]: step time server 10.211.0.246 offset 0.003243 sec
    May 18 09:23:00 server ntpd:  succeeded
    May 18 09:23:00 server ntpd[30507]: ntpd 4.2.0a@1.1190-r Thu Nov 26 06:49:51 EST 2009 (1)
    May 18 09:23:00 server ntpd[30507]: precision = 1.000 usec
    May 18 09:23:00 server ntpd: ntpd startup succeeded
    May 18 09:23:00 server ntpd[30507]: Listening on interface wildcard, 0.0.0.0#123
    May 18 09:23:00 server ntpd[30507]: Listening on interface lo, 127.0.0.1#123
    May 18 09:23:00 server ntpd[30507]: Listening on interface bond0, 10.211.40.48#123
    May 18 09:23:00 server ntpd[30507]: kernel time sync status 0040
    May 18 09:23:00 server ntpd[30507]: configure: keyword "authenticate" unknown, line ignored
    May 18 09:23:00 server ntpd[30507]: frequency initialized -18.536 PPM from /var/lib/ntp/drift
    May 18 09:27:17 server ntpd[30507]: synchronized to 10.211.0.246, stratum 4
    May 18 09:30:31 server ntpd[30507]: kernel time sync disabled 0041
    May 18 09:32:41 server ntpd[30507]: kernel time sync enabled 0001
    May 19 04:29:42 server ntpd[30507]: ntpd exiting on signal 15
    May 19 04:29:42 server ntpd: ntpd shutdown succeeded
    May 19 04:29:43 server ntpdate[8613]: step time server 10.211.0.246 offset 0.003315 sec
    May 19 04:29:43 server ntpd:  succeeded
    May 19 04:29:43 server ntpd[8621]: ntpd 4.2.0a@1.1190-r Thu Nov 26 06:49:51 EST 2009 (1)
    May 19 04:29:43 server ntpd[8621]: precision = 1.000 usec
    May 19 04:29:43 server ntpd: ntpd startup succeeded
    May 19 04:29:43 server ntpd[8621]: Listening on interface wildcard, 0.0.0.0#123
    May 19 04:29:43 server ntpd[8621]: Listening on interface lo, 127.0.0.1#123
    May 19 04:29:43 server ntpd[8621]: Listening on interface bond0, 10.211.40.48#123
    May 19 04:29:43 server ntpd[8621]: kernel time sync status 0040
    May 19 04:29:43 server ntpd[8621]: configure: keyword "authenticate" unknown, line ignored
    May 19 04:29:43 server ntpd[8621]: frequency initialized -17.775 PPM from /var/lib/ntp/drift
    May 19 04:34:00 server ntpd[8621]: synchronized to 10.211.0.246, stratum 4
    May 19 04:37:14 server ntpd[8621]: kernel time sync disabled 0041
    May 19 04:41:33 server ntpd[8621]: kernel time sync enabled 0001
    May 19 09:48:21 server ntpd[8621]: ntpd exiting on signal 15
    May 19 09:48:21 server ntpd: ntpd shutdown succeeded
    May 19 09:48:26 server ntpdate[20639]: step time server 10.211.0.246 offset -0.003932 sec
    May 19 09:48:26 server ntpd:  succeeded
    May 19 09:48:26 server ntpd[20647]: ntpd 4.2.0a@1.1190-r Thu Nov 26 06:49:51 EST 2009 (1)
    May 19 09:48:26 server ntpd[20647]: precision = 1.000 usec
    May 19 09:48:26 server ntpd[20647]: Listening on interface wildcard, 0.0.0.0#123
    May 19 09:48:26 server ntpd[20647]: Listening on interface lo, 127.0.0.1#123
    May 19 09:48:26 server ntpd[20647]: Listening on interface bond0, 10.211.40.48#123
    May 19 09:48:26 server ntpd[20647]: kernel time sync status 0040
    May 19 09:48:26 server ntpd: ntpd startup succeeded
    May 19 09:48:26 server ntpd[20647]: configure: keyword "authenticate" unknown, line ignored
    May 19 09:48:26 server ntpd[20647]: frequency initialized -16.103 PPM from /var/lib/ntp/drift
    May 19 09:52:44 server ntpd[20647]: synchronized to 10.211.0.246, stratum 4
    May 19 09:55:58 server ntpd[20647]: kernel time sync disabled 0041
    May 19 10:04:34 server ntpd[20647]: kernel time sync enabled 0001
    root@server:~#
    
    
    
    root@server:~# ntpq -pn
         remote           refid      st t when poll reach   delay   offset  jitter
    ==============================================================================
    *10.211.0.246    57.7.62.97       4 u   11 1024  377    0.712    1.131   2.777
    +10.211.0.254    57.7.62.97       4 u   29 1024  377    1.007   -0.017   0.570

  4. #4
    Senior Member raj's Avatar
    Join Date
    Jun 2005
    Location
    Hyderabad
    Posts
    565
    Thanks
    57
    Thanked 40 Times in 37 Posts
    Rep Power
    13

    Default

    silverhawk,

    Your ntp is working correctly. Frankly speaking offset gives you more idea about random measurement errors. A small value in milli-seconds is always expected i.e. 1.131 milli-seconds is not an order of magnitude different. Take a look at this page Troubleshooting ; it explains few things including how to plot the offset through out the day. Also ntptrace is no longer supported.

    Hope this helps!
    Raj
    Linux rulz.
    I have never turned back in my life ; I shall not do so today.. haha

  5. #5
    Junior Member
    Join Date
    May 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    hi Raj,

    how would you determine that the NTP is working correctly?

    i am sorry but i can't really understand "Frankly speaking offset gives you more idea about random measurement errors. A small value in milli-seconds is always expected i.e. 1.131 milli-seconds is not an order of magnitude different."

    hope you can explain further. and another thing, does any hardware clock can cause the offsets? sometime, the offset goes as high as 400 - 600 and the the alert come every day. all that we/i do is to restart the NTP daemon.

  6. #6
    Is that all you got? rockdalinux's Avatar
    Join Date
    May 2005
    Location
    Planet Vegeta
    Posts
    987
    Thanks
    27
    Thanked 71 Times in 62 Posts
    Rep Power
    19

    Default

    i am sorry but i can't really understand "Frankly speaking offset gives you more idea about random measurement errors. A small value in milli-seconds is always expected i.e. 1.131 milli-seconds is not an order of magnitude different."
    The offset value shows the difference between the reference time and the system clock. ntpd will use reference time from a reference clock (the most accurate clock) i.e. a reference clock will provide the current time for you using ntp.

    For a tiny offset ntpd will adjust the local clock as usual; for small and larger offsets, ntpd will reject the reference time for a while. In the latter case the operation system's clock will continue with the last corrections effective while the new reference time is being rejected. After some time, small offsets (significantly less than a second) will be slewed (adjusted slowly), while larger offsets will cause the clock to be stepped (set anew). Huge offsets are rejected, and ntpd will terminate itself, believing something very strange must have happened. Do you see ntpd terminated in log? If so you need to set correct public server and restart ntpd:
    Code:
    server 0.rhel.pool.ntp.org
    server 1.rhel.pool.ntp.org
    server 2.rhel.pool.ntp.org
    how would you determine that the NTP is working correctly?
    The output of the following should be always 0, which indicates that my ntp is working correctly:
    Code:
    ntpstat && echo $?
    If you want to see how ntp is syncing up, start ntpd and run the following on terminal one
    Code:
    watch ntpq -pn
    If you see out of range values run tcpdump (filter only ntp traffic) on termonal two to get clear cut idea about ntp traffic.
    Rocky Jr.
    What's wrong? I hope I am not making you uncomfortable...

    Never send a boy to do a mans job.

  7. The Following User Says Thank You to rockdalinux For This Useful Post:

    grifs71 (20th May 2011)

  8. #7
    Junior Member
    Join Date
    Dec 2007
    Location
    Prairie Grove, Arkansas
    Posts
    22
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Quote Originally Posted by rockdalinux View Post
    The offset value shows the difference between the reference time and the system clock. ntpd will use reference time from a reference clock (the most accurate clock) i.e. a reference clock will provide the current time for you using ntp.

    For a tiny offset ntpd will adjust the local clock as usual; for small and larger offsets, ntpd will reject the reference time for a while. In the latter case the operation system's clock will continue with the last corrections effective while the new reference time is being rejected. After some time, small offsets (significantly less than a second) will be slewed (adjusted slowly), while larger offsets will cause the clock to be stepped (set anew). Huge offsets are rejected, and ntpd will terminate itself, believing something very strange must have happened. Do you see ntpd terminated in log? If so you need to set correct public server and restart ntpd:
    Code:
    server 0.rhel.pool.ntp.org
    server 1.rhel.pool.ntp.org
    server 2.rhel.pool.ntp.org
    The output of the following should be always 0, which indicates that my ntp is working correctly:
    Code:
    ntpstat && echo $?
    If you want to see how ntp is syncing up, start ntpd and run the following on terminal one
    Code:
    watch ntpq -pn
    If you see out of range values run tcpdump (filter only ntp traffic) on termonal two to get clear cut idea about ntp traffic.

    I am adding this to my commands files:

    ntpstat && echo $?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Solved] Ubuntu Mount Root Disk Image As A Loop Device Using Offset
    By vamsi in forum Ubuntu / Debian
    Replies: 7
    Last Post: 22nd January 2012, 07:47 PM
  2. high performance clustering
    By tundenugba in forum Linux hardware
    Replies: 3
    Last Post: 20th October 2010, 11:45 AM
  3. NFS high availability
    By giri in forum High Availability Cluster
    Replies: 2
    Last Post: 15th July 2010, 09:40 AM
  4. OpenBSD won't let me set offset
    By php111 in forum All about FreeBSD/OpenBSD/NetBSD
    Replies: 0
    Last Post: 7th September 2007, 11:33 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •