How to check NTP service in Linux

How to check and start NTP service in Linux:



1.Check the NTPD service is running or not

#pgrep ntpd

or

#ps -eaf |grep -i ntpd




2.If there is no NTP service is running then start the service


Start NTP Server and check /var/log/messages


#/sbin/chkconfig --list ntpd

#/sbin/chkconfig ntpd on


#systemctl start ntpd.service

or

#/etc/init.d/ntp start

or

#/etc/init.d/xntpd start

#ntpdate -u "NTP server IP address"




3.Check the NTP is synced or not

#ntpq -p

#ntpstat

//show the network time synchronization status




4.Check the NTP config file is the server IP entered correctly.

#more /etc/ntp.conf


Post a Comment

0 Comments