如何处理Amazon EC2的时钟漂移? [英] How to deal with the amazon ec2's clock drift?

查看:87
本文介绍了如何处理Amazon EC2的时钟漂移?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在Amazon上有几个ec2实例,并且我们使用了Amazon AIM Linux进行设置。实例类型为m1.medium。

We have a couple of ec2 instances on amazon, and we used amazon AIM Linux to set up. The instance type is m1.medium.

一切正常,直到本周为止。

Everything is going well until this week.

我们从日志中发现文件中会突然出现大的时钟偏移,有时会有5分钟的差异。

We found from log file that there would be a huge clock drift happened suddenly, and sometimes there has a 5-minutes discrepancy。

我想问问是否有人遇到这个问题?如何处理它?<​​/ p>

I would like to ask if anyone else encounter this problem? How to deal with it?

推荐答案

由于实例资源的过度利用,可能会发生时间漂移。我鼓励您检查一下cloudwatch CPU图形,以尝试确定您的CPU是否被过度使用。

Time drift can occur due to over utilization of your instances resources. I would encourage you to check you cloudwatch CPU graphs to try identify if your CPU was being over utilized.

如果您正在运行Amazon Linux AMI,则默认安装NTP。

If you are running amazon linux AMI, NTP is installed by default.

要验证NTP是否正在运行,请运行

To verify if NTP is running run


sudo服务ntpd状态

sudo service ntpd status

如果未安装,则可以运行以下命令进行安装:

If it is not installed you can run the following to install it:


sudo yum install ntp

sudo yum install ntp

如果NTPD正在运行并且您的时钟时间已关闭,我将尝试重新启动它并查看它是否与您已设置的NTP服务器同步。您还可以通过编辑/etc/ntp.conf文件来添加更多NTP服务器。只需搜索NTP服务器以查找要添加的服务器即可。

If NTPD is running and your clock time is off I would try to restart it and see if it synchs with the NTP servers your have setup. You can also add more NTP servers by editing the /etc/ntp.conf file. Just search for NTP servers to find ones to add.

这篇关于如何处理Amazon EC2的时钟漂移?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆