LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-29-2014, 02:05 AM   #1
Since1995
LQ Newbie
 
Registered: Sep 2008
Posts: 11

Rep: Reputation: 0
Cool Server time becomes incorrect within seconds


Hi Friends,

I'm facing a weird issue. Did anyone face similar issue? Any idea how to fix this?

My server time becomes fast by around 40 seconds within seconds of correction.

Due to this huge offset, NTP can not help us to sync the time. So I've rather decided to keep NTPD disabled for the timebeing.

I've tried to correct the hardware clock. For few seconds it shows the correct time but after around 10/15 seconds the time again becomes incorrect.

See below for an example on how my server time behaves,

Code:
[root@naughtyserver ~]# ntpdate 1.2.3.4; date
29 Aug 01:01:10 ntpdate[19120]: step time server 1.2.3.4 offset -37.250722 sec
Fri Aug 29 01:01:10 CDT 2014
[root@naughtyserver ~]# ntpdate 1.2.3.4; date
29 Aug 01:01:55 ntpdate[21368]: adjust time server 1.2.3.4 offset 0.001948 sec
Fri Aug 29 01:01:56 CDT 2014
[root@naughtyserver ~]# ntpdate 1.2.3.4; date
29 Aug 01:02:45 ntpdate[23553]: step time server 1.2.3.4 offset -37.250969 sec
Fri Aug 29 01:02:45 CDT 2014
[root@naughtyserver ~]#
As you can see, the time became incorrect within seconds

The server is hosted inside VMware. RHEL 6.1 x86 64bit. Other servers hosted inside the same VMware host are not facing the issue.

Last edited by Since1995; 08-29-2014 at 02:10 AM. Reason: some texts put inside code tag
 
Old 08-29-2014, 03:12 AM   #2
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
Did you make sure the hardware clock and system clock are same? i dont think so ntpdate will reset the hardware clock.
use the "hwclock" to set the correct time and then sync with the NTP
 
Old 08-29-2014, 04:28 AM   #3
Since1995
LQ Newbie
 
Registered: Sep 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Hello,

I've corrected the hardware clock also(immediately after correcting system time through ntpdate).

Code:
#ntpdate <remote NTP server IP>
.....
#hwclock --systohc
As a last resort, I've even rebooted the server and corrected the time in the BIOS. Again the same issue.

Last edited by Since1995; 08-29-2014 at 06:43 AM.
 
Old 08-29-2014, 04:53 AM   #4
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
If its only this one machine I would check the vmware settings. As for kvm you can either use the hardware clock of the host system. Or have an extra clock for the guests. Or maybe some hardware settings of the host are making the clock run faster. Or even the load on the host system is to high that the host does not get enough time to have proper clock sequence. Though I highly doubt that.
 
Old 08-29-2014, 06:37 AM   #5
Since1995
LQ Newbie
 
Registered: Sep 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Yeah... it was the VMWare settings that was causing this issue.

We usually keep the "Sync time with the host" kind of option inside vCenter to "off", but somehow this box skipped it. The Vmware ESX host's time was not correct. As the server was constantly correcting time with the ESX host(which was not correct), we had this issue.

Thank you all(and to zhjim for reminding us about the overlook).

Last edited by Since1995; 08-29-2014 at 06:44 AM. Reason: typo
 
Old 09-02-2014, 02:16 AM   #6
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by Since1995 View Post
Thank you all(and to zhjim for reminding us about the overlook).
Thats what we're here for
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Replace time format to seconds? murke Linux - Newbie 2 06-30-2011 11:22 AM
Calculate Local Time in seconds omriar Linux - General 3 09-03-2010 10:54 PM
voicemail server time incorrect bcbotha SUSE / openSUSE 4 05-21-2009 03:03 AM
Incorrect Time Displayed in Terminal Server session kkpal Linux - Newbie 1 07-01-2008 01:30 PM
VB, 30 seconds of your time, please? rhoyerboat Programming 2 02-27-2007 02:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration