1751922 Members
4699 Online
108783 Solutions
New Discussion юеВ

Re: Time running forward

 
wayne_104
Regular Advisor

Time running forward

Hi I need help

I have a system whose time is running forward.

It has a database on it. the time has jumped by 15 days forward.

I cannot just set the time back as this will mess up the data base.

I cannot stop the system and wait the 15 days as it is a production system'

if i use ntpdate -B i get an invalid argument error.

How do i slow time down so we can catch up?
6 REPLIES 6
Matti_Kurkela
Honored Contributor

Re: Time running forward

15 days???

Tuning the kernel timekeeping parameters with the adjtimex command would probably be the best way to implement such a large time-change operation. You would do it by using "adjtimex -t " to set the timetick value as small as possible: the default is usually 10000, and the minimum is 9000. Each step in the timetick value slows down or speeds up the system clock by about 8.64 seconds per day.

So with the timetick value set to the minimum, you can adjust the clock by 8640 seconds, or about 2 hours per day.

15 days is 1 296 000 seconds. So it will take about 150 (= 1296000 / 8640) days to fix your time difference.

You might want to ask your DBA and application people if it is possible to fix things with a like this:

Step 1.) applications shutdown, database remains up
Step 2.) DBA runs a mass update to fix the erroneous time values inside the database
Step 3.) Database shutdown: only the OS remains running.
Step 4.) You adjust the system clock.
Step 5.) Reboot and start database, verify the database is OK
Step 6.) Start applications, verify everything is OK.

This would have the advantage of having a clearly-defined transition point. Before the transition, the time values are 15 days off; after the transition, they are correct again. If you adjust the time gradually, everyone that uses the time data of your database must know how to calculate the correct time from your database time values.

MK
MK
wayne_104
Regular Advisor

Re: Time running forward

will ask them
Alzhy
Honored Contributor

Re: Time running forward

If your System is +15 days -- then your likely screwed Big Time unless your applications/Database is agnostic to system time -- meaning it uses "logical date"!

Ours always use logical date -- the DB "never" relies on OS time.

Is this server a Virtual Server by any chance? If it is -- can you give us the virtualization environment?

EIther way -- do you have NTP enabled?
Hakuna Matata.
wayne_104
Regular Advisor

Re: Time running forward

Yes is a virtual server

On vmware. Not sure of all the details as the vm specialist set it up.

I look at the os side only.

But just started to jump a day ahead at random.

It is linux redhat enterprise 5.5.
Alzhy
Honored Contributor

Re: Time running forward

Do you have the latest Vmwaer Tools installed on your RHEL 5.5 Guest?
Also - what kind of vMware Hypervisor? -- Is it Vmware Server 2.0 or ESXi or ESX or vSphere?

Hakuna Matata.
Alzhy
Honored Contributor

Re: Time running forward

Either you are on VMware Server 1.x with Power Management on or you do not have Vmware Tools installed.

What is the verson of your vMware and RHEL Guest?


Have a look here too:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006427
Hakuna Matata.