setup NTP on ubuntu 14.04 for utc timezone

apt-get install ntp ntpdate

apt-get install ntp ntpdate

cat /etc/ntp.conf
driftfile /var/lib/ntp/ntp.drift
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
server 0.ubuntu.pool.ntp.org
server 1.ubuntu.pool.ntp.org
server 2.ubuntu.pool.ntp.org
server 3.ubuntu.pool.ntp.org
server ntp.ubuntu.com
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
restrict 127.0.0.1
restrict ::1


service ntp restart

service cron stop && service cron start

Check ntp stats
================

#ntpq -pn

-p : Print a list of the peers known to the server as well as a summary of their state.
-n : Output all host addresses in dotted-quad numeric format rather than converting to the canonical host names.


# ntpq -pn

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*131.107.13.100  .ACTS.           1 u   39   64  377    6.668   -1.887   2.894
+199.101.100.221 130.207.244.240  2 u   12   64  377   89.209   -8.376   1.750
-129.250.35.251  129.250.36.26    2 u   36   64  377   25.029   -8.342   3.061
+129.6.15.28     .ACTS.           1 u   34   64  377   78.681   -4.869  27.612
-91.189.89.199   170.224.124.217  2 u   40   64  377  141.474   -6.736   2.311


No comments:

Post a Comment