[ntp:questions] Trouble Simulating Leap Seconds

Jim Witschey jim.witschey at datastax.com
Thu Apr 2 21:18:21 UTC 2015


I used

    while true ; do echo "`date +%s%N` `date -u`" ; sleep .5 ; done

Output around midnight looked like:

    1435708798151332202 Tue Jun 30 23:59:58 UTC 2015
    1435708798660770847 Tue Jun 30 23:59:58 UTC 2015
    1435708799170680057 Tue Jun 30 23:59:59 UTC 2015
    1435708799680093377 Tue Jun 30 23:59:59 UTC 2015
    1435708800189430358 Wed Jul  1 00:00:00 UTC 2015
    1435708800698723411 Wed Jul  1 00:00:00 UTC 2015
    1435708801208174011 Wed Jul  1 00:00:01 UTC 2015
    1435708801717843414 Wed Jul  1 00:00:01 UTC 2015
    1435708802227355779 Wed Jul  1 00:00:02 UTC 2015
    1435708802737252335 Wed Jul  1 00:00:02 UTC 2015

As much as I wish it were, I don't think it's a measurement problem --
even half-second resolution should have caught it. Thanks for the tip,
though, Brian!
Jim Witschey

Software Engineer in Test | 434-270-8586 | jim.witschey at datastax.com





On Thu, Apr 2, 2015 at 4:57 PM, Brian Inglis
<Brian.Inglis at systematicsw.ab.ca> wrote:
> To get higher resolution try something like:
>         while sleep 0.1 ; do date -u -Ins ; done
>
> --
> Take care. Thanks, Brian Inglis
>
>
> On 2015-04-02 08:08, Jim Witschey wrote:
>>
>> UTC -- I'm using `date -u`.
>
>
>> On Thu, Apr 2, 2015 at 2:44 AM, Marco Marongiu <brontolinux at gmail.com>
>> wrote:
>>>
>>> 23:59:59 of which timezone?
>>>
>>> Il 02/apr/2015 03:14 "Jim Witschey" <jim.witschey at datastax.com> ha
>>> scritto:
>
>
>>>> I'm trying to simulate a leap second on a cluster of Ubuntu AWS
>>>> instances via NTP, and I could use some help. I've set up a basic NTP
>>>> server with a leapfile as described here:
>>>>
>>>> https://support.ntp.org/bin/view/Dev/LeapSecondTest
>>>>
>>>> The server's warning for the upcoming leap second seems to propogate
>>>> to the clients, as I see `leap_armed` in the output for `ntpq -c rl`
>>>> before midnight, and `leap_event` afterwards. However, when I loop
>>>> `date -u` over the leap second, I don't see a leap second getting
>>>> inserted -- I expect 23:59:59 to last for 2 seconds, but it doesn't.
>>>> The time goes straight from 23:59:59 to 00:00:00 the next day.
>>>>
>>>> In addition, I don't see any information about inserted leap seconds
>>>> in the logs when I search with `dmesg | grep leap` or `sudo grep leap
>>>> /var/log/syslog`.
>>>>
>>>> Am I missing something? I can provide more information on request.
>
>
> _______________________________________________
> questions mailing list
> questions at lists.ntp.org
> http://lists.ntp.org/listinfo/questions


More information about the questions mailing list