1834403 Members
2969 Online
110067 Solutions
New Discussion

gradually sync

 
SOLVED
Go to solution
JuDi_4
Occasional Advisor

gradually sync

Hi!
I have a HP-UX 11.23 server with oracle DB. I can’t stop database. Time of sever differ from real time more than 3 hour. I want to gradually sync the time.
I will start client: /sbin/init.d/xntpd start. What settings of NTP client for the gradually sync?
How to verify decrease difference of times? When the server time will be synchronized?

Thanks a million,

Judi.
4 REPLIES 4
Kenan Erdey
Honored Contributor

Re: gradually sync

Hi,

if you have an ntp server in your environment or you can access a public ntp server,first put the ntp server in /etc/rc.config.d/netdaemons:

NTPDATE_SERVER=â ip_of_ntp_serverâ
XNTPD=1

then in /etc/ntp.conf file:

server ip_of_ntp_server
driftfile /etc/ntp.drift


then start the daemon:

#/bin/init.d/xntpd start

to adjust time according to server run this command:

#ntpdate -b ip_of_ntp_server

just to query the difference:

#ntpdate -q ip_of_ntp_server

Kenan.






Computers have lots of memory but no imagination
Steven E. Protter
Exalted Contributor

Re: gradually sync

Shalom Judi,

ntp may not work if the time difference is too great.

The oracle db will crash if you roll back the time on the system.

So if you want to push the time forward, on the oracle db system, you can use the date command and them ntp will make the final adjustment.

Depending on the time difference, it can take from a few minutes to several hours for the sync to occur.

You need to watch /var/adm/syslog/syslog.log and see if the ntpd process fails or not.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven E. Protter
Exalted Contributor

Re: gradually sync

Should have added this.

ntp gradually syncs by running the clock faster or slower by a small factor to do the job.

if the system is 30 minutes ahead of the ntp server, it will run the clock slightly more slowly for several hours to sync things up without disruption.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor
Solution

Re: gradually sync

Hi:

You have two choices and one thing you must do.

Your first choice is to schedule a reboot. Shutdown your database; set the time correctly; and reboot.

Your second choice is to use 'date -a' to gradually adjust the clock. This may take several days in your case.

Setting up NTP before you correct your server's time isn't going to work. The NTP daemon will abandon synchronization efforts if its local time is found to be more than about 1000 seconds from the correct time.

I suggest you schedule a reboot, a time correction and a proper NTP configuration with three external time sources.

Regards!

...JRF...