Operating System - HP-UX
1748250 Members
3224 Online
108760 Solutions
New Discussion юеВ

Re: NTP and a financial system

 
paulto
New Member

NTP and a financial system

I am retiring the old time server on my network and need to ensure the new time server will not cause a problem with my financial systems clock. What I am trying to do is to have the clock slowly adjust to the new time so it does not go out of the databases acceptable time window.

I believe the step command would do the trick, but I have never used this option and can't afford to bring down the system based on a guess how this command works.

In the ntp.conf file would I add the line :

step 0.100

to have the system adjust by 1/10th of a second at a time till the time is caught up? And what is the interval for the adjustment?

thanks for the help, still new to unix and getting used to it's touchiness.
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: NTP and a financial system

Shalom,

ntp will not adjust a system that is off by more than a few hours.

It will not bring down a system at the standard default ntp.conf configuration if there is a small time difference.

Oracle doesn't like backward time adjustments but ntp will merely run the clock slowly if an adjustment back is required.

I would leave ntp.conf alone in this matter. The adjustment rate will not crash any applications.

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
Bill Hassell
Honored Contributor

Re: NTP and a financial system

xntpd (the NTP daemon) will adjust time by changing the length of each second by a very small fraction. For example, to adjust a 10 minute error will require several hours. xntpd guarantees that there will be exactly 86400 seconds per 24 hours. To speed up the local clock, the time between seconds will be slightly less until sync has occurred.

If the time difference is less than 10 minutes, there is nothing to do. After a few hours, the time will be in sync with the new server. The step option in ntp.conf is virtually never used and if used, requires extensive understanding of the NTP protocol and calculations.


Bill Hassell, sysadmin
paulto
New Member

Re: NTP and a financial system

Unfortunately in my situation an adjustment of the time servers clock of 2 mins did take down my system. I need to know how to adjust the steps so it does not do it in the future.

The system we use has many databases that are spread across 20 different HP-UX servers that require the time be synch'd across the board to ensure reliable financial transactions.
James R. Ferguson
Acclaimed Contributor

Re: NTP and a financial system

Hi:

Who's horse and who's cart here when you say, "to ensure the new time server will not cause a problem with my financial systems clock"?

In my opinion, you need to establish your internal time server to synchronize with at least three external sources. You can easily use sources from the NTP POOL at:

http://www.pool.ntp.org/

Then, for each of your servers, configure NTP in each '/etc/rc.config.d/netdaemons' to point to this time source:

export NTPDATE_SERVER=mytimeserver.xyz.com
export XNTPD=1
export XNTPD_ARGS=-x

Begin by establishing your new internal time server and get it correctly synchronized to the correct time.

Then, server-by-server, plan a reboot or a quiesced period where you can manually adjust the server's time _before_ enabling synchronization to the new server.

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: NTP and a financial system

> Unfortunately in my situation an adjustment of the time servers clock of 2 mins did take down my system. I need to know how to adjust the steps so it does not do it in the future.

Did you mean to say that you changed the NTP server's clock? With only one server, that should never be done without a complete shutdown of all the applications on all the systems that use this clock. That's why James suggests never to use a single NTP server. Most modern routers have NTP capability built in and use multiple servers on the Internet to provide extreme accuracy (less than 1/10 sec accuracy).

If you meant to say that the new time server was off by 2 minutes from the old time server, there are a lot of concerns. First, the new server should have been synced to the old server. Once the new server is within one second of accuracy (check with ntpq -p), change all your servers thatt refer to the old server to add the new server to ntp.conf (don't use the "prefer" option). Then after a few hours (or days), turn off the old NTP server. All the client systems will keep in step with the new server with no loss of sync.

If you meant to say that your server was 2 minutes behind, then how did you start xntpd? If you used the start/stop script called xntpd, then that was the prblem. This cript should only be run at bootup. The reason is that during startup, the clock is jumped to the right time long before any applications are run. The first thing the xntpd script does is to call ntpdate which forces an instant change of the current time.


Bill Hassell, sysadmin