1834533 Members
2475 Online
110069 Solutions
New Discussion

Re: To Sync time or not

 
Marty Metras
Super Advisor

To Sync time or not

I want to make sure our HP 9000 time is almost right all the time. I know we can sync up the time with our time clock server that syncs up with an Internet clock some where.
What I want to do is just compare the HP 9000 with our master clock server and then have it email when the time are not with in 5 minute or so.
This way I can check it and not change the time unless I what to.
The reason to compare is because today the time clock server was off 23 days. In the Unix world we can use people to set clocks if needed.
Can you help?
Marty

The only thing that always remain the same are the changes.
6 REPLIES 6
Pete Randall
Outstanding Contributor

Re: To Sync time or not

We use a simple script like this attachment.

HTH,
Pete

Pete
Jeff Schussele
Honored Contributor

Re: To Sync time or not

Hi Marty,

It actually would be easier to just go ahead & setup ntp & it's daemon xntpd than it would be to write the script you mention. And besides if you ever start using NFS you'll HAVE to use NTP or strange things will happen because NFS needs all systems connected to be fairly close time-wise.
Do a man on ntp for instructions - trust me it's easy.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
John Strang
Regular Advisor

Re: To Sync time or not

My opinion is that you should use ntp - because once it is configured correctly (which is straightforward to do, just search this forum and you will find many threads describing how to) you can be confident that the time on your servers will be correct.

John

If you never make a mistake you'll never make anything.
James R. Ferguson
Acclaimed Contributor

Re: To Sync time or not

Hi Marty:

I can't think of a reason why I would *not* want to synchronize to a reliable external time source!!!

You wrote that the "reason to compare is because today the time clock server was off 23 days."

You clearly have a problem. Network Time Protocol ('ntp') is easy to setup and there are many ultra accurate time sources freely available.

A very simple guide to setting up Network Time Protocol (NTP) is found in the "Installing and Administering Internet Services" manual:

http://docs.hp.com/hpux/onlinedocs/B2355-90685/B2355-90685.html

For a good list of available time sources, see:

http://www.eecis.udel.edu/~mills/ntp/clock1.htm
If you wish to merely synchronize locally take a look at Knowledge Base document #A5864817. You can use one of your servers as a "master" clock for the remaining ones without going outside of your local network.

Regards!

...JRF...

A. Clay Stephenson
Acclaimed Contributor

Re: To Sync time or not

Hi:

You are really doing this the fundamentally wrong way. First of all, 5 minutes is an enormous time error; secondly, you don't not want abrupt time changes especially backwards. The problem with your approach is this. Consider an application that has a sequential transaction number and a timestamp. In your world, transaction 999 could have a later timestamp than transaction 1000 if the time were reset. Yoy really need to setup NTP and let the system maintain time to withing a few tens of milliseconds constantly. Moreover, the adjustments are made by speeding up or slowing down clock ticks so that abrupt changes are avoided. You will need to do an initial fix for your 23 day problem but after that it's set it and forget it. You can actually set all this up using sam.

Man xntpd for details.
If it ain't broke, I can fix that.
Pete Randall
Outstanding Contributor

Re: To Sync time or not

Maybe I should explain a little further that our script originated before we had NTP. We now use NTP on one server and sync the others to it with ntpdate. The exception to this is a linux server (spls7 in the script) that does not have NTP capabilities at all.

I must agree with everyone else that NTP is the way to go, however you can choose for yourself.

Good luck,
Pete

Pete