LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 07-17-2007, 06:33 AM   #1
rimvydazas
Member
 
Registered: Dec 2006
Posts: 44

Rep: Reputation: 15
system time goes ahead....even with NTP


hi guys,

I have interesting issue.I have Suse Linux Enterprise running on VMware with several other servers on the same machine. I have problems setting time on Suse. The time would always be wrong so I enabled NTP with appropriate time server to synchronize the time with Suse. During startup the time synchronizes and shows up just fine. Then the time starts going ahead about 5 min each hour. After a whole day I have like 1 hour ahead from normal time. I know that time server works just fine. It seems like time on Suse installation is going faster than it is supposed to... Any ideas?
 
Old 07-17-2007, 10:05 AM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,017
Blog Entries: 5

Rep: Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787
run hwclock to see what time your hardware clock has. If it is off you should run ntpdate to bring your system time back in then run "hwclock --systohc" to update the hardware clock to have the system time.

Also you might want to reboot and check the BIOS (setup). Some hardware clocks have setting to always be UTC so may be confused by the system time. I believe disabling this helps from other posts I've seen.
 
Old 07-17-2007, 01:31 PM   #3
rimvydazas
Member
 
Registered: Dec 2006
Posts: 44

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jlightner
run hwclock to see what time your hardware clock has. If it is off you should run ntpdate to bring your system time back in then run "hwclock --systohc" to update the hardware clock to have the system time.

Also you might want to reboot and check the BIOS (setup). Some hardware clocks have setting to always be UTC so may be confused by the system time. I believe disabling this helps from other posts I've seen.
I did like you said. I noticed that hardware clock runs synchronous with time server, but system time runs ahead again. Is it posible to set up NTP to update system time every xx min?
 
Old 07-17-2007, 01:59 PM   #4
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,017
Blog Entries: 5

Rep: Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787
ntpd should be doing this job and you really shouldn't see it moving ahead the quickly anyway.

I'm wondering if maybe you have a mismatch in timezones somewhere. System time is always stored as UTC (a/k/a GMT or Zulu) but your time zone configuration displays how it is seen. The time zone used by your system is /etc/localtime which should be a copy of a time zone file in /usr/share/zoneinfo. You can use zdump to see what is in /etc/localtime.

If you were using one timezone in /etc/localtime and another in your TZ variable (echo $TZ to see this) you might be seeing some sort of mismatch from what you expect.

You could always set up ntpdate in cron to do the date change every few minutes but that shouldn't be necessary if you're running ntpd.

If you type "ps -ef | grep ntpd" do you see the daemon running?
Have you check /etc/ntp.conf and /etc/ntp/* configuration files to be sure ntp is looking at appropriate time servers?
 
Old 08-27-2007, 01:28 PM   #5
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,017
Blog Entries: 5

Rep: Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787
Follow up:
Recently saw issue on my XP/FC6 dual boot laptop with time not being correct after a boot despite use of ntp - disabling UTC time in the BIOS fixed it as suggested by earlier reading and my earlier comment above.
 
Old 08-31-2007, 03:13 PM   #6
petcherd
Member
 
Registered: Dec 2006
Location: Portland, OR - USA
Distribution: Formerly Slackware; now RH, SuSE, Debian/Ubuntu, & Asianux
Posts: 55

Rep: Reputation: 15
Just for the record, I'm seeing similar behavior on a VMWare machine running Slackware 11:

ntpdate launched by rc.local sets the time to a nearby server with a GPS receiver, then the ntpd daemon is invoked. /var/logs/messages shows ntpd syncing to 127.0.0.1, then the nearby time server once hourly for the next four hours or so, then it does one last sync to l27.0.0.1 without syncing to the canonical time server. Sometime later, the ntpd daemon is no longer running, but there's no log-file entry to tell me that it died.

I'll let you know if I find a solution that works.
 
Old 08-31-2007, 04:48 PM   #7
petcherd
Member
 
Registered: Dec 2006
Location: Portland, OR - USA
Distribution: Formerly Slackware; now RH, SuSE, Debian/Ubuntu, & Asianux
Posts: 55

Rep: Reputation: 15
Exclamation

VMWare's official white-paper on the matter can be found at http://www.vmware.com/pdf/vmware_timekeeping.pdf
 
Old 09-02-2007, 03:45 AM   #8
rimvydazas
Member
 
Registered: Dec 2006
Posts: 44

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by petcherd View Post
VMWare's official white-paper on the matter can be found at http://www.vmware.com/pdf/vmware_timekeeping.pdf
I have followed those instructions. However, I ran into another problem with VMWare tools installation. For now I use cron to update system time with time server every 5 min via ntpdate. Not the best solution, but the only one so far.
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NTP time sync with windows 2000 AD time csghosh Linux - Enterprise 7 02-24-2012 03:46 PM
Time Synchronize or NTP Management gurl4sh25 Linux - Software 5 06-04-2007 03:39 PM
NTP time servers with Suse 10.2 sadiqdm Suse/Novell 0 03-17-2007 11:35 PM
Sync KDE/System Time w/ NTP carlosinfl Linux - General 6 03-15-2006 03:37 PM
ntp time sync eyewittness Linux - Networking 2 08-11-2004 09:18 AM


All times are GMT -5. The time now is 04:11 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration