Linux system time synchronization

Problem Description:

  An operation timing of a task synchronization time ,, see time but found less than 5 seconds time server

 #  crontab -l 

  0 * * * *  /usr/sbin/ntpdate  192.168.37.111

 # /usr/sbin/ntpdate 192.168.37.111
7 Apr 16:03:07 ntpdate[23403]: adjust time server 192.168.37.111 offset -5.000101 sec



Worse 5 seconds

  

Charles never thought for a long time ,, then finally find a reason, and now sort out problems locating method in which it arose:

1, see the crontab log to see if there is an error

2, view the message log to see if this time there is an error

3, to see if there are other regular services conflict

 

(1) View crontab log: vim / var / log / cron

  Not found error logs

(2) view the system log: vim / var / log / message

  See this time there chronyd log "Apr 7 15:23:29 master0 chronyd [962]: Selected source 119.28.206.193"

   No system log error log, but there chrony logging, time synchronization service chrony also see the process of chrony

(3) see the system log chrony view the process of recording ,, ,, 

  # ps -elf |grep chrony

  Found this service has been launched ,, Linux system has two synchronization service time, so time synchronization deviation needs to close a time synchronization service

(4) I chose to shut down the service chrony

# systemctl stop chronyd
# systemctl disable chronyd

  So, time synchronization problem solved. . .

 

Guess you like

Origin www.cnblogs.com/carriezhangyan/p/12654286.html