Sunday, July 30, 2017

what is meant by ntp and how to setup ntp on node using the cookbook

What is ntp?
Network Time Protocol (NTP) is a networking protocol for clock synchronization between computer systems over packet-switched, variable-latency data networks. In operation since before 1985, NTP is one of the oldest Internet protocols in current use.

Manual process:

How to install ntp in centos7?

 yum install ntpd
 systemctl enable ntpd
 systemctl start ntpd
 systemctl status ntpd

How to check ntpdate?
[root@default-centos-73 ~]# ntpdate
30 Jul 20:58:52 ntpdate[4662]: no servers can be used, exiting



How to check sourceip address of the ntpserver of the node? 
ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
-204.44.81.142.s 92.27.75.51      2 u   49  128  377   80.299  111.250  20.678
+pool-72-80-171- 209.51.161.238   2 u   64  128  377   43.400   92.246  18.945
+nimitz.jeremych 142.66.101.13    2 u  123  128  377   46.324  100.206  15.133
*block.steinhoff 204.9.54.119     2 u  121  128  377   11.698   95.785  14.339


How to check logs?
just grep for ntp in /var/log/messages
This will tell you if/where ntp activity is being logged:
grep log /etc/ntp.conf


Chef process:

 

No comments:

Post a Comment