- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- NTP forced sync
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
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
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-04-2002 04:25 AM
11-04-2002 04:25 AM
NTP forced sync
Just a "simple" question.
Is there any way to force NTP deamon to syncronize the hour with the peers even if the diference between server's hour is more than 1000 seconds?
Thanks in advance.
SN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2002 04:25 AM
11-04-2002 04:25 AM
Re: NTP forced sync
Try this and tell us how does it works.
Juanma.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2002 04:28 AM
11-04-2002 04:28 AM
Re: NTP forced sync
/sbin/init.d/xntp stop
ntpdate ip-adres-timeserver
/sbin/init.d/xntpstart
Regards,
RoebrtJan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2002 04:37 AM
11-04-2002 04:37 AM
Re: NTP forced sync
You can use ntpdate to accomplish this, but you need to be certain there will be no adverse effects. Database logs, in particular, don't like to have their time set backwards. Use with caution.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2002 04:50 AM
11-04-2002 04:50 AM
Re: NTP forced sync
As far as I know NTP will allow synchronisation to a server that has a time difference of less than one hour. It will take a huge time step, but it will (should) work. If the time difference is more than one hour, no attempts are made to synchronize times; an error message is logged indicating that the difference is too great and the time should be set manually, somewhere around the actual time, after which xntpd can take over.
In other words, the xntpd process does not have to be killed or restarted in order to synchronize times. It can take a while, however, NTP is a slow process.
Hope this helps,
Timo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2002 05:28 AM
11-04-2002 05:28 AM
Re: NTP forced sync
The subject of time keeping and the "danger" of abruptly stepping time (particularly backwards) has been discussed often.
By design, the 'xntpd' daemon will die if the difference in the server's time and the clock to which it is try to synchronize is greater than 1000 seconds. This prevents synchronizaton to a clock that has run wild.
In my opinion, if you are initially correcting such a difference is times you should shutdown all databases, manually set the time and reboot to start 'cron', 'xntpd' and your applications cleanly and quickly. Yes, you can use 'ntpdate' to step or slew the time (see its man pages), and yes, you can use 'data -a' to slew the time but these methods will take quite a while to bring synchronization. If correct timekeeping has mattered little to you then a reboot shouldn't matter either.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2002 01:51 PM
11-04-2002 01:51 PM
Re: NTP forced sync
date -u mmddhhmm
Then, if you are close, like a minute or so, ntp will sync the time.
Note: The date command is used in UTC (Universal time.) For me in Utah, we are something like 7 or 8 hours behind Universal Time. I always get mixed up about which right after a Daylight Savings change...
Hope it helps
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2002 02:08 PM
11-04-2002 02:08 PM
Re: NTP forced sync
setting the time forward then there is no real problem setting the date forward with a date command or an ntpdate command to steo the time forward abruptly. You would the start the NTP daemon and all would be well.
However, if you need to set the time backwards then the above method is very dumb. It is very possible that you would have a database transaction where transaction 1000 happens before transaction 999. Try to explain to a customer why his A/R is correct in that case!
On development machines where timestamps are used to determine source/object file dependencies, you can confuse the make utility terribly. You can also cause incremental backups to miss files. For these reasons, if you must adjust time, the smart play is to use date -a to slew the time. The time might not be accurate for a bit but it would be self-consistant.