- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- HP Support Statement for XNTPD Leap Second Process...
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-03-2005 01:09 AM
11-03-2005 01:09 AM
Leap Second processing in HP's xntpd
Purpose
The purpose of this document is to explain the processing of leap
seconds in HP's xntpd.
Leap Second Overview
For the benefit of readers who are not aware of the leap second
terminology, this section explains the concept of the leap
second. Readers familiar with the leap second concept may wish to
skip this section.
While the Earth is expected to make one complete rotation about its
own axis in 86400 seconds (one mean solar day), in reality it is not
the case. Earth takes slightly more than 86400 seconds to make one
complete rotation and hence one mean solar day is slightly longer than
86400 seconds. This introduces a slight error in the time calculations
used by the atomic clocks, because the atomic clocks were designed
to consider 86400 seconds as one day. In order to synchronize the
time derived from the atomic clocks with the astronomical time,
the concept of leap second was introduced.
Leap seconds were meant to synchronize the standard time (UTC)
with the astronomical time. However an exact synchronization is
not maintained. Leap seconds only guarantee that the UTC time does
not deviate more that 0.9 seconds from the astronomical time. Leap
seconds can be either positive or negative. A positive leap second
denotes a second to be added to the time on which it is applied,
while a negative leap second denotes a second to be removed.
Since a positive leap second adds an extra second to the time, the
UTC clock during midnight advances as follows :
23:59:58
23:59:59
23:59:60 <= leap second
00:00:00
00:00:01
Note the presence of an extra second - the positive leap second -
at 23:59:60.
Application of a negative leap second causes the UTC clock to advance
in the following fashion during midnight :
23:59:58
00:00:00
00:00:01
Note that the clock jumps directly from 23:59:58 to 00:00:00. The
59th second is skipped.
As of the date of publication of this document there has never been
an instance of negative leap second adjustment to UTC.
NTP and leap seconds
NTP has provisions in the packet to denote leap second adjustments. A
2-bit provision in NTP packet called the Leap Indicator (LI) can
denote the occurrence of either a positive leap second or a negative
leap second.
HP's xntpd and LI
HP's xntpd can handle LI in NTP packets and adjust the time
accordingly. Both positive and negative leap seconds are handled by
xntpd. xntpd implements positive leap seconds by going backward in
time and negative leap seconds by going forward in time. The default
behavior of xntpd is to step the clock in the right direction, when
xntpd needs to apply the leap second. Positive leap adjustments are
done by stepping the clock backward and negative leap adjustments
are done by stepping the clock forward. However this sudden step of
time can cause harm to certain applications. For example databases
can have problems when a positive leap second triggers xntpd to step
the system time backward. When this stepping of time is undesirable,
administrators may consider the option of starting xntpd with the
'-x' option. The '-x' option causes xntpd to always do a slew instead
of a step, to perform time adjustments. When the '-x' option is
set, xntpd slews the time in the right direction (either forward
or backward) when leap second occurs. However the consequences of
slewing must be completely understood before deciding to use the
'-x' option. See xntpd(1M) for more details.
When xntpd performs leap second adjustments it displays the following
messages in syslog ( at LOG_NOTICE level ) :
For positive leap adjustments, xntpd displays
"leap second occurred, stepped time back 1 second"
and for negative leap adjustments, xntpd displays
"leap second occurred, stepped time forward 1 second"
However xntpd logs the above mentioned messages only if sync events
or sys events are enabled in xntpd's conditional log mask. See the
logconfig command in ntp.conf(5) for more details. Unless altered,
xntpd by default logs sync events and hence logs the above mentioned
leap second related messages.
Note that irrespective of whether xntpd did a step or a slew, it
displays the message "..., stepped time ...". This message can cause
system administrators to wrongly believe that xntpd always performs
leap second adjustments by stepping. Note that with the -x option,
xntpd will perform leap second adjustments by slewing but displays
a wrong message.
Summary
This section summarizes the behavior of HP's xntpd with respect to
leap second adjustments.
o xntpd can perform both positive and negative leap second adjustments.
o xntpd can perform leap second adjustments by either stepping or
slewing the clock in the right direction. The default behavior of
xntpd is to the step the time, but the -x option causes xntpd to
slew the time to make leap second adjustments.
o xntpd displays the following messages in syslog. "leap second
occurred, stepped time back 1 second" is displayed for positive
leap second adjustments and "leap second occurred, stepped time
forward 1 second" is displayed for negative leap second adjustments.
o Positive leap second step adjustments can cause the clock to go
back slightly in time. If this is not desirable, customers may
consider starting xntpd with the -x option, which ensures that xntpd
performs time adjustments by slewing. The consequences of slewing
must be completely understood before deciding to use the '-x' option.
o A minor bug causes xntpd to always display the message "...,
stepped time ..." even if xntpd makes leap second adjustments by
slewing the clock.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2005 01:27 AM
11-03-2005 01:27 AM
Re: HP Support Statement for XNTPD Leap Second Processing
Regards,
Devender
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2005 01:34 AM
11-03-2005 01:34 AM
Re: HP Support Statement for XNTPD Leap Second Processing
This information is very useful for me.
Regards,
Borislav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2005 01:43 AM
11-03-2005 01:43 AM
Re: HP Support Statement for XNTPD Leap Second Processing
Thanks to HP's Expert Center for putting efforts to share this information at ITRC.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2005 02:00 AM
11-03-2005 02:00 AM
Re: HP Support Statement for XNTPD Leap Second Processing
This is quite a nice document. I presume that it is already (or will be soon) added to the TKB. It certainly deserves to be!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2005 02:02 AM
11-03-2005 02:02 AM
Re: HP Support Statement for XNTPD Leap Second Processing
Thanks !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2005 02:08 AM
11-03-2005 02:08 AM
Re: HP Support Statement for XNTPD Leap Second Processing
Doc ID: KBAN00001231
It should be posted in 24-48 hours.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2005 02:40 AM
11-03-2005 02:40 AM
Re: HP Support Statement for XNTPD Leap Second Processing
Thanks for the TKB and thanks for the nice work!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2005 05:16 AM
11-03-2005 05:16 AM
Re: HP Support Statement for XNTPD Leap Second Processing
I appreciate
Thanks again
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2005 05:24 AM
11-03-2005 05:24 AM
Re: HP Support Statement for XNTPD Leap Second Processing
Thank You very much,
florian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2005 05:48 AM
11-03-2005 05:48 AM
Re: HP Support Statement for XNTPD Leap Second Processing
If not totally relavent to my job, I really, really enjoyed it.
I encourage others at HP do do this.
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
11-03-2005 07:42 AM
11-03-2005 07:42 AM
Re: HP Support Statement for XNTPD Leap Second Processing
Here are two other gems:
http://h71000.www7.hp.com/openvms/products/year-2000/leap.html
http://h71000.www7.hp.com/wizard/wiz_2315.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2005 08:07 AM
11-03-2005 08:07 AM
Re: HP Support Statement for XNTPD Leap Second Processing
It appears that leap seconds may occur yearly but the exact date for this event is determined after extensive measurements. Here is a great article from the US Naval Observatory: http://tycho.usno.navy.mil/leapsec.html
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2005 08:14 AM
11-03-2005 08:14 AM
Re: HP Support Statement for XNTPD Leap Second Processing
There is a section in the man page that talks about slew. Its a little long so I did not want to post it. Users would have to determine if their applications would be affected. HP generally doesnt recommend using slew, see "man 1m xntpd"
At this time I don't think there is an enhancement to update the man pages but I can certainly check and if not request one.
Thanks for posting the link.
Todd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2005 10:19 AM
11-03-2005 10:19 AM
Re: HP Support Statement for XNTPD Leap Second Processing
regards!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2005 07:59 AM
11-04-2005 07:59 AM
Re: HP Support Statement for XNTPD Leap Second Processing
URL Reference
http://www.ntp.org/ntpfaq/NTP-s-time.htm#Q-TIME-LEAP-SECOND
During a leap second, either one second is removed from the current day, or a second is added. In both cases this happens at the end of the UTC day. If a leap second is inserted, the time in UTC is specified as 23:59:60. In other words, it takes two seconds from 23:59:59 to 0:00:00 instead of one. If a leap second is deleted, time will jump from 23:59:58 to 0:00:00 in one second instead of two. See also Section 5.2.
Laboratories:
http://tycho.usno.navy.mil/leapsec.html (Master Clock)
http://www.npl.co.uk/time/leap_second.html
Discussion about a leap second
http://www.ucolick.org/~sla/leapsecs/onlinebib.html
According to the IERS a leap second will be introduced Jan 1 2006.
http://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat
Other References
http://tf.nist.gov/general/leaps.htm
http://www.cl.cam.ac.uk/~mgk25/time/leap/
http://tf.nist.gov/timefreq/pubs/bulletin/leapsecond.htm
http://www.livescience.com/technology/050705_leap_second.html
http://www.leapsecond.com/
Enjoy and thanks for the feedback.
Todd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2005 09:09 AM
11-04-2005 09:09 AM
Re: HP Support Statement for XNTPD Leap Second Processing
Because the tidal forces are always making the days longer --- and moving the moon farther away ---, the leap seconds are always expected to be positive. There are other mechanism in play which cause the rotational period of the earth to vary but the tidal forces are the first-order forces. Because angular momentum must be conserved, about the only mechanism (other than a collision with a rather large body) that could cause a negative leap second to be added would be an incredibly violent tectonic event. In either of those cases, I doubt very much that knowing the "correct" time will matter very much.
There is also a movement to do away with leap seconds to make timekeeping easier although the astronomical community is very opposed to this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2005 01:47 AM
11-28-2005 01:47 AM
Solution23:59:58
23:59:59
00:00:00
00:00:00 <== "leap second occurred, stepped time back 1 second"
00:00:01
And not like this:
23:59:58
23:59:59
23:59:60
00:00:00
00:00:01
I am correct?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2006 03:34 AM
01-01-2006 03:34 AM
Re: HP Support Statement for XNTPD Leap Second Processing
Linux systems:
==============
system1 (kernel: 2.6.9-22)
--------------------------
/var/log/messages:
Jan 1 01:59:59 system1 kernel: Clock: inserting leap second 23:59:60 UTC
Jan 1 02:29:06 system1 ntpd[2234]: kernel time sync enabled 0001
Results from my program:
...
01/01/06 01:59:58.866391
01/01/06 01:59:59.118342
01/01/06 01:59:59.370286
01/01/06 01:59:59.622226
01/01/06 01:59:59.874171
01/01/06 01:59:59.126121 <<=== Note here
01/01/06 01:59:59.378062
01/01/06 01:59:59.630009
01/01/06 01:59:59.881953
01/01/06 02:00:00.133904
...
system2 (kernel: 2.6.9-5):
--------------------------
/var/log/messages:
Jan 1 01:59:59 system2 kernel: Clock: inserting leap second 23:59:60 UTC
Jan 1 02:32:06 system2 ntpd[2132]: kernel time sync enabled 0001
system3 (kernel: 2.4.21-20):
----------------------------
/var/log/messages:
Jan 1 01:21:48 system3 ntpd[19207]: kernel time discipline status change 11
Jan 1 01:59:59 system3 kernel: Clock: inserting leap second 23:59:60 UTC
Jan 1 02:30:05 system3 ntpd[19207]: kernel time discipline status change 1
Results from my program:
...
01/01/06 01:59:58.935352
01/01/06 01:59:59.195363
01/01/06 01:59:59.455370
01/01/06 01:59:59.715380
01/01/06 01:59:59.975388
01/01/06 01:59:59.235399 <<=== Note here
01/01/06 01:59:59.495409
01/01/06 01:59:59.755416
01/01/06 02:00:00.015423
...
HP-UX
=====
system4 (kernel: B.11.00):
--------------------------
/var/adm/syslog/syslog.log:
Jan 1 02:00:01 system4 xntpd[1096]: leap second occurred, stepped time back 1 second
Results from my program:
...
01/01/06 01:59:58.927018
01/01/06 01:59:59.187032
01/01/06 01:59:59.447046
01/01/06 01:59:59.707136
01/01/06 01:59:59.967033
01/01/06 02:00:00.227297
01/01/06 02:00:00.487192
01/01/06 02:00:00.747122
01/01/06 02:00:01.007174
01/01/06 02:00:01.267101
01/01/06 02:00:01.527165
01/01/06 02:00:01.787064
01/01/06 02:00:02.047041
01/01/06 02:00:02.307016
01/01/06 02:00:02.567112
01/01/06 02:00:02.827070
01/01/06 02:00:02.087247 <<=== Note here
01/01/06 02:00:02.347235
01/01/06 02:00:02.607201
01/01/06 02:00:02.867181
01/01/06 02:00:03.127217
...
The results show that both Linux and HP-UX systems inserted the leap second roughly on time 02:00 am; this is because the systems run on EET (i.e., UTC+2) time zone.
Linux systems inserted the leap second AFTER 01:59:59, so my program logged the time period 01:59:59 - 02:00:00 two times (note that there was no time 01:59:60).
HP-UX systems inserted the leap second AFTER 02:00:01; but actually my program logged the time period 02:00:02 - 02:00:03 two times.
This is just an information for curious people like me. :)
The program is attached...