- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- NTP and Cron
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2001 10:17 AM
тАО11-02-2001 10:17 AM
When you change the system time with "date" the system warns you - I'm assuming for that very reason.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2001 10:23 AM
тАО11-02-2001 10:23 AM
Re: NTP and Cron
I guess what you say is correct. Cron may repeat the sdame job, if the time resets backward.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2001 10:34 AM
тАО11-02-2001 10:34 AM
Re: NTP and Cron
man pages of xntpd:
The good news is that NTP can be forced to never make a STEP, but instead SLEW the clock to drive the offset to zero. This is accomplished with the -x option on the command line. This effectively removes the middle operating regime. You won't get millisecond (or microsecond) precision with this method, but you probably can't get that over a WAN anyway.
It is important to note that SLEWING is a cover-up for a more fundamental problem (poor connection to the timesource), and it does not solve this problem. SLEWING is not recommended by HP because it causes reduced accuracy and stability, and it leads to anamolous behavior that can be quite confusing.
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2001 10:35 AM
тАО11-02-2001 10:35 AM
Re: NTP and Cron
Are you running a driftfile? The driftfile will tell you the last correction and the timestamp. Then next time it happens, you can look at the driftfile and see that the time changed overlapping the cron job's time.
Format is an entry like this:
driftfile /etc/ntp.drift
Add a the ntp.drift file with an initial entry of '1' in the file...
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2001 10:36 AM
тАО11-02-2001 10:36 AM
Re: NTP and Cron
I am sure that it would kick off the job twice.
You may want to update your system time more often if you clock is fast and an update has to move the time back in big chunks.
C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2001 10:46 AM
тАО11-02-2001 10:46 AM
Re: NTP and Cron
Because of that, we do not run xntpd, but instead use ntpdate to sync the time immediately. We do this at boot time and also have a cron job that does it twice a day. That way we can choose a time where setting the clock back or forward a few minutes does not have an impact.
I think it depends on how time sensitive your application and cron jobs are and the impact of them running more than once if the time was set back.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2001 10:50 AM
тАО11-02-2001 10:50 AM
Re: NTP and Cron
But, if you are running xntpd and the clock on your server is functioning fairly normally, xntpd should never have adjust the time that much.
I have been running xntpd on production servers for at least 2 years and I have never had anything like that happen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2001 11:02 AM
тАО11-02-2001 11:02 AM
Re: NTP and Cron
Several comments.
First, 'xntpd' will adjust a server's time if the difference between it and its source time is greater than 1000 seconds. This prevents some measure of time insanity.
Second, time adjustments are made gradually in small increments. This too, lessens the kind of behavior about which you worry.
Thirdly, remember that the granularity of 'cron' jobs is one minute. This too, limits the periods of union for the behavior about which you worry.
Lastly, one a server's clock is synchronized, time is very stable. Afterall, that's the reason to run 'xntp' in the first place; to provide continuous, very small adjustments as necessary.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2001 11:04 AM
тАО11-02-2001 11:04 AM
Re: NTP and Cron
Even if the system "slews" a microsecond and doesn't "step", couldn't a cron job kick off twice ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2001 11:13 AM
тАО11-02-2001 11:13 AM
Re: NTP and Cron
You mention in your second point that time adjustments are made gradually, are you referring to slewing like Harry. And where is this "-x" option in the manpages ?
The system that I was testing "stepped" the time back 2 seconds, something that I don't want to happen. I think "slewing" sounds like a better idea for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2001 11:20 AM
тАО11-02-2001 11:20 AM
Re: NTP and Cron
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2001 11:21 AM
тАО11-02-2001 11:21 AM
Re: NTP and Cron
NTP does a good job at what it's designed for: keep the time sync'ed with a time source. It should be most unusual for NTP to change the time enough to cause a cron job to run twice. Is it possible? Probably, in theory. I've used it in DCE and DFS environments which are rather particular about the time and had no problems.
Concerning the -x argument, we never used it. The man page for xntpd is rather interesting, particularly about slewing. According to the man page, xntpd usually operates in slewing mode anyway. This is because it usually keeps the time within 128 milliseconds of the time source. If off by 129 - 1000 msecs, xntpd will step. That might occur at boot. Above 1000 msecs, xntpd will shutdown because it assumes the time is so far off human intervention is needed.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2001 11:23 AM
тАО11-02-2001 11:23 AM
SolutionYou will not see the -x xntpd option unless you are running 11x. I tend to agree with your assessment that slewing is exactly what you want in spite of the man pages warning. The last thing I want to happen (other than very early in the boot process) is to step the time backwards. Cronjobs are the least of your worries. The real problems are timestamps especially in databases. You can easily get into the situation where a transactions with a higher sequence number have an earlier datastamp because something was monkeying with the time. It is far better to 'slow' the system clock until 'real' time catches up which is just what 'slewing' does. Stepping time backwards can also mess up deveopment machine so that objects and executables appear inconsistant with the source files so that makes behave very strangely.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2001 11:26 AM
тАО11-02-2001 11:26 AM
Re: NTP and Cron
Take a look at the recent man pages for 'xntpd':
http://docs.hp.com/hpux/onlinedocs/B2355-90692/B2355-90692.html
There is the discussion of the SLEW mechanism and what constitutes STEP. I think once time is synchronized and the 'xntpd' daemon isn't interrupted, all will be well. I don't run with the slewing (-x) option.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-02-2001 02:18 PM
тАО11-02-2001 02:18 PM
Re: NTP and Cron
I knew I should have copied and pasted that info but it just doesn't paste pretty in this dang small window!
Darrell