I'm working on getting some servers running in the EC2 environment and I'm noticing some errors with ntpd trying to sync (using CentOS).

I was reading on this site and the impression I get is that I don't need to run ntpd since EC2 is Xen and the host takes care of the time for the virtual servers.
http://support.ntp.org/bin/view/Support/KnownOsIssues

Is this accurate or do I need to figure out how to get around the error I'm having?
cap_set_proc() failed to drop root privileges
It looks like it involves building a new kernel and other stuff I'd rather not do if I don't have to.

link|improve this question

40% accept rate
feedback

2 Answers

up vote 1 down vote accepted

You shouldn't need to. The clock of your EC2 instance will be synchronized to the Xen Dom0. You can verify this by checking that the contents of /proc/sys/xen/independent_wallclock are 0.

link|improve this answer
1  
I could not find anything like this. Is this information still applicable? – Kariem Mar 28 '11 at 11:15
4  
@Kariem: Newer kernels have /sys/devices/system/clocksource/clocksource0/current_clocksource, see the comment below. – intgr Apr 13 '11 at 10:38
feedback

Yes, you need to run ntpd.

My clock was 18.5 seconds off on an EC2 micro instance (running Ubuntu UEC Maverick) with 5 days uptime.

After shutting down and starting again, it was back to normal, so there seems to be some kind of drift.

This is despite /sys/devices/system/clocksource/clocksource0/current_clocksource saying xen, by the way. I'm not sure why it's not working.

Installing the ntp package has solved the problem for me. The clock stays accurate, and there's nothing suspicious in the syslog that might indicate a conflict with Xen's clock synchronization. (It uses ntp.ubuntu.com as its server. I'm not sure if there's an NTP server in the AWS network that I could use instead, but the Ubuntu server will do nicely for now.)

link|improve this answer
3  
I just noticed a several minute drift in one of my servers in which /sys/devices/system/clocksource/clocksource0/current_clocksource is set to xen as well – jberryman Jul 7 '11 at 15:39
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.