- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ntpdate -B to adjust clock 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
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
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
10-07-2013 02:40 AM - last edited on 10-07-2013 07:13 AM by Liuqing
10-07-2013 02:40 AM - last edited on 10-07-2013 07:13 AM by Liuqing
Hi ,
Can i safely adjust my current server timings i.e hpux 11i v2 with Linux NTP server using ntpdate -B option .
Since this option slowly adjusts itself , can i do it in my production setup ?
P.S. This thread has been moved from HP-UX > System Administration to HP-UX > networking.
-HP Forum Moderator
Solved! Go to Solution.
- Tags:
- NTP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2013 06:13 PM - edited 10-08-2013 05:31 AM
10-07-2013 06:13 PM - edited 10-08-2013 05:31 AM
SolutionYes, using -B is the best way to adjust the clock. The -B option guarentees that there will be exactly 86,400 seconds per day. The OS clock will have each second trimmed or elongated a small fraction until the clock is in sync. But there are not enough seconds to adjust a difference of more than about 10 minutes. If you run ntpdate -B with a 20 minute or larger gap, the program will not run.
So before you change the time on a system running a typical commercial database, shut it down! Changing the date while databases are active can lead to sync issues between files and eventually a database recovery. While you could change the date manually, if you have *working* NTP servers, make sure the server listed in /etc/rc.config.d/netdaemons is working (hint: ntpdate -p <server_name>). Then shutdown and let the server reboot. By shutting down all the applications and databases, the system will be ready for a correct date/time on reboot.
Also be very careful about 1 hour time errors. You may have the timezone misconfigured. The OS is always set to UTC time, also known as Zulu or the obsolete Greenwich Mean Time (GMT) value. Then the OS libraries will translate this universal time into local time using the current value of the variable $TZ. This value is set when logging using the directive in /etc/TIMEZONE. If this is incorrect, do not set the time to compensate. Change the value in /etc/TIMEZONE, then login again and check the time.
The exact time is critical among clusters and networked databases (most are network-based). NTP will ensure exact sync (accurate to within 10ms). Every system should be running NTP service.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2013 10:13 PM
10-07-2013 10:13 PM
Re: ntpdate -B to adjust clock with NTP server
Hi Bill ,
thanks for that explaination.
We have a linux ntp server , when ntpq -pn gives
[root@centsvr ~]# ntpq -pn
remote refid st t when poll reach delay offset jitter
==============================================================================
-27.114.150.13 131.188.3.223 2 u 75 1024 377 72.199 18.831 20.477
+119.81.14.18 47.187.174.51 2 u 675 1024 377 75.027 -0.348 32.927
+59.106.180.168 131.112.181.48 2 u 642 1024 377 170.104 -9.848 16.875
*106.187.94.109 10.84.87.146 2 u 609 1024 377 147.155 1.175 0.514
127.127.1.0 .LOCL. 10 l 23 64 377 0.000 0.000 0.002
And timezone is on NTP server
[root@centsvr ~]# date +%Z
IST
[root@centsvr ~]# uname -a
Linux centsvr 2.6.18-194.el5xen #1 SMP Fri Apr 2 15:34:40 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
And on clients its hpux ;
root #/ >ntpq -np
remote refid st t when poll reach delay offset disp
==============================================================================
*10.1.5.xx 106.187.94.109 3 u 477 512 377 27.82 -0.366 0.66
127.127.1.1 127.127.1.1 3 l 33 64 377 0.00 0.000 10.01
root #/ >env|grep -i tz
TZ=IST-5:30
I hope there will be no Timezone issues here , right ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2013 11:10 PM - edited 10-07-2013 11:12 PM
10-07-2013 11:10 PM - edited 10-07-2013 11:12 PM
Re: ntpdate -B to adjust clock with NTP server
>This value is set when logging in using the directive in /etc/PATH. ... Change the value in /etc/PATH
I think you meant /etc/TIMEZONE instead. You can edit your post with Post Options > Edit Reply.
>I hope there will be no Timezone issues here, right?
Right. Linux and HP-UX use UTC for NTP and won't have a problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2013 05:36 AM
10-08-2013 05:36 AM
Re: ntpdate -B to adjust clock with NTP server
>> /etc/PATH should be /etc/TIMEZONE
(fixed)
>> ...no Timezone issues...
As long as this $TZ value matches your location. HP-UX can provide an exact match to any user logging into the system by setting the TZ value to match the local timezone. This means that all time/date values will be in local time for every user.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2013 01:37 PM
10-08-2013 01:37 PM
Re: ntpdate -B to adjust clock with NTP server
>This means that all time/date values will be in local time for every user.
Unless they like UTC or another timezone that they may be supporting.
Note: Some logfiles like syslog.log show the system's local time and not the user's.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2013 11:03 PM
10-08-2013 11:03 PM