LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   system time goes ahead....even with NTP (http://www.linuxquestions.org/questions/linux-server-73/system-time-goes-ahead-even-with-ntp-570050/)

rimvydazas 07-17-2007 06:33 AM

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...:confused: Any ideas?

MensaWater 07-17-2007 10:05 AM

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.

rimvydazas 07-17-2007 01:31 PM

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?

MensaWater 07-17-2007 01:59 PM

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?

MensaWater 08-27-2007 01:28 PM

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.

petcherd 08-31-2007 03:13 PM

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.

petcherd 08-31-2007 04:48 PM

VMWare's official white-paper on the matter can be found at http://www.vmware.com/pdf/vmware_timekeeping.pdf

rimvydazas 09-02-2007 03:45 AM

Quote:

Originally Posted by petcherd (Post 2877227)
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.


All times are GMT -5. The time now is 03:26 PM.