- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Changing System Clock
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
02-04-2007 11:55 PM
02-04-2007 11:55 PM
OS - 11i
The system clock on is not accurate. For example, the system clock is off by 2 hours and 6 minutes (Two hours behind). This server currently is not pointing to a ntp server.
I would like to point the server network time server. I will lookup instructions to do so. I'm just concerned of the following:
1) What are the risk of changing the clock with that much varience to bring it current?
2) Will the server have to be shutdown as well as the database and applications? Will Single user mode be best to implement NTP?
Thank You in advace for all replies.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2007 12:03 AM
02-05-2007 12:03 AM
Re: Changing System Clock
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2007 12:04 AM
02-05-2007 12:04 AM
Re: Changing System Clock
2) You don't need to shutdown anything or boot to implement NTP. Simply make the appropriate entries in the /etc/ntp.conf file. (man xntpd for details)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2007 12:04 AM
02-05-2007 12:04 AM
Re: Changing System Clock
Any advice on how to proceed or what to check prior to me changing the system clock?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2007 12:04 AM
02-05-2007 12:04 AM
SolutionWhen you setup NTP ('xntpd') you need to set your server's time to a very nearly correct value to allow 'xntpd' to synchronize your server's time. NTP will abandon all attempts at time synchronization if its time source and its server differ by more than about 1000 seconds.
I would suggest that you configure NTP to set the server time to that of its time source(s) during bootup (by configuring the NTPDATE_SERVER variable in '/etc/rc.config.d/netdaemons') and thereafter let NTP run continuously.
Setting your local time forward isn't a problem. Setting time backwards can cause great problems with database recovery, transaction synchronization, logs and cron tasks. Should you need to step the time backwards, having configured the NTPDATE_SERVER variable means that the time the change is made during startup before the time-sensitive things (databases) are started.
Hence, if you need to move time backwards, I would arrange a point where you can simply reboot with the above configuration in place. If your local time is behind true time, you can simply step (with 'date mmddhhmm') the time to very near what is correct and thereafter let NTP synchronize your clock.
Setting up NTP is simple and it can be done during normal production. There is an excellent guide in the "Installing and Administering Internet Services" manual in chapter-7.
Your best source of an external time source is three (3) servers from the NTP "pool" of public sources:
http://ntp.isc.org/bin/view/Servers/NTPPoolServers
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2007 12:29 AM
02-05-2007 12:29 AM
Re: Changing System Clock
date -u
Then find the current UTC time using the web page:
http://tycho.usno.navy.mil/cgi-bin/anim
If your system clock is within is couple of minutes of the UTC time, then NTP will work OK -- but first verify that all your NTP servers are available:
ntpq -p
If this reports an error or all the servers have a REACH=0 or DISP=16000, then your network is blocking NTP. Contact your network admin to unblock portr 123.
Now if UTC is correct and your login time is wrong, the value for $TZ is incorrect. HP-UX can use *ANY* timezone in the world -- all at the same time! The TZ value points to an entry in /usr/lib/tztab which then tells the library calls how to format the time for the local timezone.
Now if date -u shows the time is slow by 2 hours, you can move the time forward safely. However, to avoid issues with the TZ value, set the date with date -u and use the current GMT value. Then use date with no options to see the local date as translated by TZ.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2007 12:42 AM
02-05-2007 12:42 AM
Re: Changing System Clock
/>/usr/sbin/ntpq -p
/usr/sbin/ntpq: read: Can't assign requested address
Maybe it is blocked by the firewall. So I guess I'll use the date -u command as suggested until I can get the firewall port opened.
Can I do this without shutting down the databases and application?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2007 03:22 AM
02-05-2007 03:22 AM
Re: Changing System Clock
> /usr/sbin/ntpq: read: Can't assign requested address
Nope, this is not what you would see if it were blocked. This is an internal error and generally means that the xntpd daemon is not running. This probably has been the case for a long time and may have been caused by some root administrator logging in with the wrong TZ value, seeing the time was off and changed it. The xntpd daemon sees the massively wrong time and refuses to fix it because NTP is a very conservative program. These errors have been logged in /var/adm/syslog/syslog.log for a long time. Every administrator needs to understand that on a production machine, especially with databases running, changing the time can have serious consequences.
DO NOT use the start/stop script for xntpd as it will force the time to jump to the correct value. You will make the needed adjustment manually when it is safe.
> Can I do this without shutting down the databases and application?
Only if you have to move the time forward. Moving it backwards can cause the database to detect future timestamps or worse, duplicate timestamps which may possibly corrupt the database. Note that NTP can correct the time (slowly) up to about 10 minutes. It will do so without gaining or losing any time ticks.
So if date -u is within a few minutes of UTC time, manually start xntpd. It will immediately move to daemon status and you'll get your prompt back. If all is well, you can use:
ntpq -p
and it should show all your NTP sources. If not, look at the end of syslog:
tail -20 /var/adm/syslog/syslog.log
You should see xntpd messages. If there are errors, you'll need to post them here.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2007 03:29 AM
02-05-2007 03:29 AM
Re: Changing System Clock
Bill I will use your suggestion and reply with I have done.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2007 05:36 AM
02-05-2007 05:36 AM
Re: Changing System Clock
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2007 05:48 AM
02-05-2007 05:48 AM