- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Want to sync the time difference with NTP server
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
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
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
тАО02-22-2009 02:58 PM
тАО02-22-2009 02:58 PM
Want to sync the time difference with NTP server
I am having one server shubsas with below details
shubsas # uname -a
HP-UX shubsas B.11.11 U 9000/800 2504392625 unlimited-user license
shubsas # model
9000/800/rp7410
with 9 DB's and BSCS application running on the same.
My server is near about 4 mins i.e. 240 seconds behind the ntp server which is configured for this server
Please find below details for reference
shubsas # date
Mon Feb 23 04:23:27 IST 2009
mhprod:/#date
Mon Feb 23 04:27:17 IST 2009
The NTP server details on the shubsas server is
shubsas # ntpq -p
remote refid st t when poll reach delay offset disp
==============================================================================
mhprod 0.0.0.0 16 - - 64 0 0.00 0.000 16000.0
mhrate 0.0.0.0 16 - - 64 0 0.00 0.000 16000.0
To resolve the same I am planning below things
1.downtime for the server
2.manually change the server time respective
with NTP server's time
3.Checkout the time sync with NTP server
4.Up the apps & DB's and again check for the
time
Please suggest a remedy for above problem. It
will be great help to me.
Thanks in Advance ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-22-2009 04:08 PM
тАО02-22-2009 04:08 PM
Re: Want to sync the time difference with NTP server
date -a +240
Then check the time with the NTP server and you should see the time moving forward, about 2 minutes per hour. Once the time is within a few seconds, you can start xntpd. Check syslog.log to see any messages from xntpd. Your apps and databases can remain running.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-22-2009 04:08 PM
тАО02-22-2009 04:08 PM
Re: Want to sync the time difference with NTP server
NTP issues.
NTP can't resolve a discrepancy greater than an hour. So manual adjustment is required in that case.
Never adjust system time backward with running Oracle databases, that is an automatic crash.
Make sure your NTP servers themselves have access to an outside time server. If you depend on the system clock of an internal server it wont work.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-22-2009 05:16 PM
тАО02-22-2009 05:16 PM
Re: Want to sync the time difference with NTP server
When you setup your NTP servers, use at least three (3) reliable external sources. The NTP Pool is an ideal way:
http://www.pool.ntp.org/
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-22-2009 06:17 PM
тАО02-22-2009 06:17 PM
Re: Want to sync the time difference with NTP server
I tried with date -a +240 but getting the below output
# date -a +240
shubsas # date -a +240.000
Usage: date [-u] [+format]
date [-u] [mmddhhmm[[cc]yy]]
date [-a [-]sss.fff]
please suggest my server server clock is 4 mins behind than my NTP server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2009 01:58 AM
тАО02-23-2009 01:58 AM
Re: Want to sync the time difference with NTP server
In other words, the correct syntax is:
date -a 240
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2009 05:30 PM
тАО02-23-2009 05:30 PM
Re: Want to sync the time difference with NTP server
ntpdate mhprod
to set the server time with a step adjustment. No pestky date command formats to get correct. Then you can restart the xntpd manually if you don't wish to reboot.
Keep in mind it will take a few minutes before the xntpd supplied with HP-UX will sync with one of the time servers.
While you are at it, you should put one of mhprod or mhrate into the NTPDATE_SERVER line in /etc/rc.config.d/netdaemons (I may have some filenames/spelling off a bit). That way the ntpdate command will be executed on startup, and that will make sure the system clock is within the tolerances of the xntpd to be willing to synchronize with the time source(s).
The suggestions to have three or more time sources at each layer/stratum of NTP service is a good one. With only two, there really is no way for ntp to find a "false ticker" - it needs at least three for that.
All of this presumes that both mhprod and mhrate are properly synced to timesources themselves...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2009 07:44 PM
тАО02-23-2009 07:44 PM
Re: Want to sync the time difference with NTP server
Rick is correct. This will set the time instantly. However, this sudden change may not be healthy for apps and databases. Thus the suggestion to change the date slowly. However, if you can shutdown the apps and databases for a minute or so, you can use the ntpdate command. This is also the command that will be automatically used when your system reboots.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2009 12:59 AM
тАО02-24-2009 12:59 AM
Re: Want to sync the time difference with NTP server
I am scheduling this activity as
1) Will get down All apps and DB's on the
server
2) Then I will check the server time and then I
will sync with ntpdate command
It will be a great help if any more views on the same ...
Thanks to all the HP-UX Guru's.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2009 05:30 AM
тАО02-24-2009 05:30 AM
Re: Want to sync the time difference with NTP server
The ntpq -p command output above indicates that the ntp servers listed are not reachable. Before you schedule downtime you should make sure that you can ping the servers by name and that port 123 is not blocked or in use by something else.
Also have a look in /etc/ntp.conf
restrict statements must have an ip address number not a name.
You can check the operation of the ntp requests by using
ntpdate -d server1 server2 server3
This will show you the packet and request flow.
By the way you can list more than one server in
/etc/rc.config.d/netdaemons
export NTPDATE_SERVER="server1 server2 server3"
export XNTPD=1
At start up ntpdate will be used to set the time and date after which ntp will start.
ntpdate with the -B option will slew rather than set the clock but this may take some hours (or days) during which xntpd cannot be run.
As has been suggested I would go with the restart (or at least a database and application shutdown ) for a 10 minute gap.
I hope this helps
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2009 09:54 AM
тАО02-25-2009 09:54 AM
Re: Want to sync the time difference with NTP server
One more query on the same
I am having 9 running databases with BSCS application on the server, serving with different circles.
If I change the server time manually which is behind 4 mins by command line like "date" rather than NTP commands like "ntpdate" from ntp server after getting down apps & all DB's. Will it affect to other circles/servers ?
Thanks in advance for your valuable suggestions.
Many Thanks,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2009 10:03 AM
тАО02-25-2009 10:03 AM
Re: Want to sync the time difference with NTP server
> If I change the server time manually which is behind 4 mins ...
Why would you want to have only one time source? For that matter, why would you make that source some local server?
This is so easy to setup and there are so many reliable time sources:
http://www.pool.ntp.org
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2009 10:18 AM
тАО02-25-2009 10:18 AM
Re: Want to sync the time difference with NTP server
Also, there may be cases where the goal isn't so much for the systems to have the "correct" time but to all have the "same" time.
Further, there can be value in having at least one "good" timesource which does not depend on one's ISP to maintain your link to the outside world.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2009 10:26 AM
тАО02-25-2009 10:26 AM
Re: Want to sync the time difference with NTP server
@ RicK: Your points are very well taken (of course). I'm lucky. In my environment the network folks appreciate the value of good timekeeping and gave me what I wanted. That, and/or they didn't want to listen to me :-)
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2009 01:20 PM
тАО02-25-2009 01:20 PM
Re: Want to sync the time difference with NTP server
This is not an HP-UX question. You must ask the application and database administrators. However, since your servers are not currently synchronized, it might not cause a problem, but I would check first, or be safe and setup all your servers to use NTP, but not set the time until a maintenance window.
Bill Hassell, sysadmin