Solve NTP time drift on VPS server

Time

Recently I found that on my VPS server there is incorrect time often called time drift. As you know having correct time is very important - especially in Active Directory environments. Back to my case - I have VPS running on XEN and I reported to hosting company this issue. They replied that they will not change ntp settings for hosts but they said that I can do it by myself.

So encouraged by them (of course by not solving my ticket at all) I did small digging and I found this solution.

1
echo "1" < /proc/sys/xen/independent_wallclock

I just restarted ntpd deamon and now I am synced quite ok. I assume you configured your box as ntp client - which is of course so trivial that I will not describe it.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
[root@vps]# **ntpq -p**

# remote           refid      st t when poll reach   delay   offset  jitter

+nac.oa.uj.edu.p 149.156.70.3     2 u   24   64  377   17.076  -12.822  14.582
  
*ntp.ifj.edu.pl  10.0.2.4         2 u   24   64  377   18.393  -20.868   6.604
  
histeria.pl     .INIT.          16 u    -   64    0    0.000    0.000   0.000
  
LOCAL(0)        .LOCL.          10 l   28   64  377    0.000    0.000   0.001
All rights reserved © Wojciech Marusiak
Last updated on 27 Jan, 2013 23:01 ETC
Built with Hugo
Theme Stack designed by Jimmy