Re: NTP (on Solaris)
Posted in 2006
The question was whether running NTP alongside Informix (IDS 7.31 on Solaris) causes problems. Replies focused not on the engine but on cron: if NTP steps the clock backwards (settimeofday is used when drift exceeds ~128ms), Solaris cron can fire the same job twice. Paul Watson argued NTP normally slews rather than steps, so adjustments should be milliseconds; Thomas Ronayne advised running ntpdate against two stratum-1 servers at boot before starting the daemon, using good pool servers, monitoring ntpq -p/logs, or using a GPS/radio clock. No definitive fix for the duplicate cron runs was recorded.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Platform-Specific Issues
Dirk Moolman schrieb: > Has anyone has any (mentionable) issues with running NTP together with > Informix ? (I am still running IDS7.31 FD3) > > > > > > > > Dirk Moolman > Database and Unix Administrator > Digicare Technologies (HealthCorp) > > > > "People demand freedom of speech as a compensation for the freedom of > thought which they seldom use." > > > > > The information on this e-mail including any attachments relates to the official business of DigiCare (Pty) Ltd. The information is confidential and legally privileged and is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised and as such any disclosure, copying, distribution or any action taken or omitted in reliance on it is unlawful. Please notify the sender immediately if it has inadvertently reached you and do not read, disclose or use the content in any way. > > > No responsibility whatsoever is accepted by DigiCare (Pty) Ltd if the information is, for whatever reason, corrupted or does not reach its intended destination. The views expressed in this e-mail are the views of the individual sender and should in no way be construed as the views of DigiCare (Pty) Ltd, except where the sender has specifically stated them to be the views of DigiCare (Pty) Ltd. > > Be sure that your (critical) cronjobs run really once. With time syncronisation it can be, that your cronjob start for example at 6 am, ntp corrects the time from 06:00:01 to 05:59:59 - and the cronjob start again... Regards, try_and_err
> -----Original Message----- > From: try_and_err@web.de [mailto:try_and_err@web.de] > Posted At: Saturday, January 28, 2006 2:48 AM > Posted To: comp.databases.informix > Conversation: NTP (on Solaris) > Subject: Re: NTP (on Solaris) > > > > Dirk Moolman schrieb: > > > Has anyone has any (mentionable) issues with running NTP > together with > > Informix ? (I am still running IDS7.31 FD3) > > [cutting] > Be sure that your (critical) cronjobs run really once. With time > syncronisation it can be, that your cronjob start for example at 6 am, > ntp corrects the time from 06:00:01 to 05:59:59 - and the > cronjob start > again... > > Regards, > try_and_err Ntp should never apply a delta, it should work by drifting the 'clock' i.e. slowing or speeding up. Once sync'd the changes tend to be a the milliseconds level anyway Paul Watson Tel: +44 1414161772 Mob: +44 7818003457 GO FURTHER with DB2 GET THERE FASTER with Informix. Attend the IDUG 2006 North America Conference. Tampa, Florida, USA. 7-11 May 2006. Visit http://www.iiug.org/conf for more information. >
Paul Watson schrieb: > Ntp should never apply a delta, it should work by drifting the 'clock' > i.e. slowing or speeding up. Once sync'd the changes tend to be a the > milliseconds level anyway Correct - it SHOULD. But: How will NTP discipline my Clock? - settimeofday(2) to step (set) the time. This method is used if the time if off by more than 128ms. For example (on Linux): ntpd[1234]: time reset -1.081474 s nagios: Warning: A system time change of 1 seconds (backwards in time) has been detected. Compensating... In my experience cron doesn't compensating this change (on Solaris). Regards, try_and_err
> -----Original Message----- > From: try_and_err@web.de [mailto:try_and_err@web.de] > Posted At: Saturday, January 28, 2006 11:59 AM > Posted To: comp.databases.informix > Conversation: NTP (on Solaris) > Subject: Re: NTP (on Solaris) > > > > Paul Watson schrieb: > > Ntp should never apply a delta, it should work by drifting > the 'clock' > > i.e. slowing or speeding up. Once sync'd the changes tend > to be a the > > milliseconds level anyway > > Correct - it SHOULD. > But: > How will NTP discipline my Clock? > - settimeofday(2) to step (set) the time. This method is used if the > time if off by more than 128ms. > For example (on Linux): > ntpd[1234]: time reset -1.081474 s > nagios: Warning: A system time change of 1 seconds (backwards in time) > has > been detected. Compensating... > In my experience cron doesn't compensating this change (on Solaris). > > Regards, > try_and_err > Wonder how the date drift on Solaris works then, wonder if it applies X x 128ms movements. But I never dug deep into it. Looked at some of our prod Solaris boxes, the ntp adjust log shows a couple of millseconds adjustement Paul Watson Tel: +44 1414161772 Mob: +44 7818003457 GO FURTHER with DB2 GET THERE FASTER with Informix. Attend the IDUG 2006 North America Conference. Tampa, Florida, USA. 7-11 May 2006. Visit http://www.iiug.org/conf for more information.
"In my experience cron doesn't compensating this change (on Solaris)." Is this when the time difference is large i.e. if you start ntp when the clock is out by more than a few seconds? I would make sure that the time is correct on the machine BEFORE you activate the NTP process for the first time. Or it is that the NTP process is adjusting the time by one second and this causes a problem?
david@smooth1.co.uk wrote: > "In my experience cron doesn't compensating this change (on Solaris)." > > Is this when the time difference is large i.e. if you start ntp when > the > clock is out by more than a few seconds? > > I would make sure that the time is correct on the machine BEFORE > you activate the NTP process for the first time. > > Or it is that the NTP process is adjusting the time by one second and > this > causes a problem? > NTP should be started at system boot and left alone after that. In the start script in rc2.d (or rc3.d or wherever you choose), stick a line in before the daemon start like this: <path_to>/ntpdate -v stratum_1_server stratum_1_server (yes, two stratum 1 servers). That sets the clock dead on and then you start the daemon. I use two servers at Argonne National Laboratories just because they're close. Pick a couple close to you. I use three pool servers in ntp.conf. Once the daemon has synchronized (based on delay, offset and jitter -- execute nptq -p and look), the system clock is, more or less, continuously nudged to stay on time. You should not see many entries in your log file, but if you do you need to find some better pool servers. I use 0.pool.ntp.org, 1.pool.ntp.org and 2.pool.ntp.org (check the web site for the pool servers available in your area). You really need to look at the log every so often and deal with any problems that might crop up (problems meaning try other external servers if you have large values in the ntpq -p display). You really won't see adjustments of seconds in the log -- if you do, you've got a problem to solve. If you're really serious, get a radio clock, hook it up to one of your servers and use that one as your timeserver for the whole internal network... There are some nice GPS clocks available. -- Everything works -- if you let it.
david@smooth1.co.uk schrieb: >> "In my experience cron doesn't compensating this change (on Solaris)." > > Is this when the time difference is large i.e. if you start ntp when > the clock is out by more than a few seconds? No, it was weeks/months later (after reboot). > I would make sure that the time is correct on the machine BEFORE > you activate the NTP process for the first time. Yes, this was done with 'ntpdate'. > Or it is that the NTP process is adjusting the time by one second and > this causes a problem? Yes, NTP was changing (backwards) the time and cron has started the same cronjobs a second time. Maybe an another had have the same problem and knows, that a newer or other cron daemon on solaris don't have this problem ? Regards, try_and_err