Server rentals :: NFOservers.com

Forums

All times are UTC - 8 hours



Author Message
 Post subject: VDS Time
PostPosted: Thu May 03, 2012 12:19 pm 
Offline
A semi-regular
A semi-regular

Joined: Sat Mar 24, 2012 6:23 am
Posts: 28
Howdy,

Does anybody have a solution to getting the time on my VDS set correctly? I have tried setting the date/time with the date command, I have tried manually setting the hwclock and then syncing the system date/time with the hw clock date/time. For some reason it won't stay.

On another forum I read that I should set the hw clock, sync then reboot. I rebooted the machine and it comes up with a crazy time. The ss I posted was taken at 15:16 CST and the ss is showing 16:04. On that same forum I was reading somebody said that the box time wasn't set correctly so my vds wouldn't show the right time. Only reason I am asking is because it's very confusing when I am trying to read logs and the date/time is all fubar'd.

I am running the Centos 5.6 64 bit.

Image



Thank you for any solutions or suggestions!

Hot Carl


Top
 Profile  
 
 Post subject: Re: VDS Time
PostPosted: Thu May 03, 2012 12:26 pm 
Offline
Founder
Founder
User avatar

Joined: Thu Apr 18, 2002 11:04 pm
Posts: 9234
Location: Seattle
To ensure the correct time, it would be best to install and run ntpd. Here's one guide for how to do this:

http://www.cyberciti.biz/faq/howto-inst ... ver-clock/


Top
 Profile  
 
 Post subject: Re: VDS Time
PostPosted: Thu May 03, 2012 12:35 pm 
Offline
A semi-regular
A semi-regular

Joined: Sat Mar 24, 2012 6:23 am
Posts: 28
Wow I feel like a dummy, the same forum I was reading those other comments on was talking about it but I had never used it before.

I installed then synced the hw clock with the system and now everything is dandy.

Learn something new everyday!

Thanks for your help and thanks for the quick response,
Carl :D


Top
 Profile  
 
 Post subject: Re: VDS Time
PostPosted: Thu May 03, 2012 12:41 pm 
Offline
Founder
Founder
User avatar

Joined: Thu Apr 18, 2002 11:04 pm
Posts: 9234
Location: Seattle
Not a problem :)

The hardware clock output will reset every time that your VDS is rebooted (since it is based on the Xen clock, which seems to be off), but ntpd should start with the system and correct this as part of the process.


Top
 Profile  
 
 Post subject: Re: VDS Time
PostPosted: Tue Jun 12, 2012 11:05 am 
Offline
A semi-regular
A semi-regular

Joined: Sat Mar 24, 2012 6:23 am
Posts: 28
John,

Sorry to bring this up again but ntpd didn't solve my problem. My clock is running fast for some reason and I am unable to fix it. I have googled and googled and tried several things but it still isn't working. For example around noon I re-sync'd with servers and everything was ok, it is now 1403 CST and my server thinks it is 1411 CST.

Do you have any suggestions on how I can keep this in sync? Only reason I am asking is our TS server is giving out a warning telling me the time isn't right and it could cause issues.

Thanks,
Carl


Top
 Profile  
 
 Post subject: Re: VDS Time
PostPosted: Tue Jun 12, 2012 11:19 am 
Offline
A semi-regular
A semi-regular

Joined: Sat Mar 24, 2012 6:23 am
Posts: 28
Sorry to double post, but I just saw a post on another forum about deleting the drift file. I just did that and will let it run for 24 hours to see if that does the trick.

I will post back if that doesn't work.

Thanks,
Carl


Top
 Profile  
 
 Post subject: Re: VDS Time
PostPosted: Tue Jun 12, 2012 11:20 am 
Offline
Founder
Founder
User avatar

Joined: Thu Apr 18, 2002 11:04 pm
Posts: 9234
Location: Seattle
Are you absolutely certain ntpd is running correctly? It's meant for exactly this scenario. Check "ps auxw | grep ntpd" to make sure that it's started, and also make sure that the time is correct before it begins (because it will take ages to fix it otherwise, by default). Look in /var/log/messages for errors that it might be spitting out, as well.

If you can't get ntpd working right, you could set up a cronjob to run ntpdate -u (or the equivalent ntpd command) regularly, but that's a stopgap measure.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
It is currently Wed May 22, 2013 3:18 am
Powered by phpBB® Forum Software © phpBB Group