Linux服务器时间同步

突然发现Ubuntu操作系统时间慢了10秒,简单记录一下操作步骤。

查看一下本地时间同步守护进程,正常:

# ps aux | grep ntpd
ntp       1636  0.0  0.0  31456  1488 ?        Ss    2016  25:45 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 103:109

从其他机器同步时间,结果出错:

# ntpdate xx.xx.xx.xx
13 Apr 01:14:03 ntpdate[1243]: the NTP socket is in use, exiting

需要先停ntpd进程,同步时间,再启动ntpd守护进程:

/etc/init.d/ntp stop
ntpdate xx.xx.xx.xx
/etc/init.d/ntp start

 

发表于 2017年04月14日 20:03   评论:0   阅读:1614  



回到顶部

首页 | 关于我 | 关于本站 | 站内留言 | rss
python logo   django logo   tornado logo