Koozali.org: home of the SME Server

Problems with time drift, hardware clock, and ntp - solved?

Offline holck

  • *
  • 317
  • +1/-0
Last week I noticed that the time on my small server was off by several hours, even though I have ntp configured and running. I corrected the time, restarted ntp, and hoped that everything was ok. But the next day, the clock was wrong again. I /var/log/messages I found a few line like this
Code: [Select]
May 30 21:59:59 katrine kernel: set_rtc_mmss: can't update from 0 to 59
I I am certainly not an expert in ntp, so I spent a lot of time trying to figure out what was going on, and how to solve it. I got a lot of help from these:
Using ntpq I could see that my clock was drifting crazily - several seconds per minute. As I understood it, I had some problems with my hardware clock. I installed the package adjtimex, and by removing /etc/adjtime and /etc/ntp drift, and using the programs tickadj and adjtimex, I finally managed to get ntpd up, running and synchronizing with remote ntp servers again.

Right now, ntpq -p shows

Code: [Select]
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+loin.ploup.net  88.191.254.6     3 u  822 1024  377   24.987    0.473   0.721
+server01.coloce 46.19.33.5       3 u  872 1024  377   19.108   -1.275   0.034
-37.247.49.133   64.90.182.55     2 u  672 1024  377   26.183   10.493   0.250
*ev003.tilaa.nl  193.67.79.202    2 u  143 1024  377   16.690   -0.456   0.029

so this looks fine, I think. But /var/log/ntpd/current shows

Code: [Select]
2013-06-01 22:23:23.577990500  1 Jun 22:23:23 ntpd[12861]: Listening on interface wildcard, 0.0.0.0#123 Disabled
2013-06-01 22:23:23.578033500  1 Jun 22:23:23 ntpd[12861]: Listening on interface lo, 127.0.0.1#123 Enabled
2013-06-01 22:23:23.578074500  1 Jun 22:23:23 ntpd[12861]: Listening on interface eth1, 5.103.132.90#123 Enabled
2013-06-01 22:23:23.578113500  1 Jun 22:23:23 ntpd[12861]: Listening on interface eth0, 192.168.10.1#123 Enabled
2013-06-01 22:23:23.578171500  1 Jun 22:23:23 ntpd[12861]: kernel time sync status 0040
2013-06-01 22:23:24.152584500  1 Jun 22:23:24 ntpd[12861]: frequency initialized 0.000 PPM from /etc/ntp/drift
2013-06-01 22:26:39.585026500  1 Jun 22:26:39 ntpd[12861]: synchronized to 46.19.33.6, stratum 2
2013-06-01 22:26:39.585078500  1 Jun 22:26:39 ntpd[12861]: kernel time sync disabled 0001
2013-06-03 01:02:31.597177500  3 Jun 01:02:31 ntpd[12861]: synchronized to 37.247.49.133, stratum 2
2013-06-03 01:21:49.595153500  3 Jun 01:21:49 ntpd[12861]: synchronized to 46.19.33.6, stratum 2

and I'm wondering about the "kernel time sync disabled" message. Should I worry about this? Should I just hope that everything is fine now, or do I need to do something about my hardware clock?

Thanks, Jesper
......

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Problems with time drift, hardware clock, and ntp - solved?
« Reply #1 on: June 05, 2013, 11:08:57 AM »
is it a virtual machine o a physical one?

Offline holck

  • *
  • 317
  • +1/-0
Re: Problems with time drift, hardware clock, and ntp - solved?
« Reply #2 on: June 05, 2013, 08:34:14 PM »
It is physical, a small HP Proliant server
......

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Problems with time drift, hardware clock, and ntp - solved?
« Reply #3 on: June 05, 2013, 08:38:40 PM »
never had such an issue.. and I have several hp server working with SME..

what about HP customer care? seems like a machine bug to me..

Offline larieu

  • ****
  • 214
  • +0/-0
Re: Problems with time drift, hardware clock, and ntp - solved?
« Reply #4 on: June 05, 2013, 10:46:46 PM »
I had something like this before
SME 7.x working ok
after almost 2 years of working ok one update of kernel for SME arrived
after that the clock get crazy

http://forums.contribs.org/index.php/topic,42831.msg202622.html#msg202622

the problem was the cipset (INTEL MB original) which wasn't supported any more by CentOS
verify the cipset vs the known clock related problems on CentOS
if everybody's life around you is better, probably yours will be better
just try to improve their life