[ntp:questions] Re: Monitoring the leap second tonight
Johan Swenker
no_spam_please at swenker.xs4all.nl
Sun Jan 1 01:23:38 UTC 2006
On Sat, 31 Dec 2005 21:02:44 +0000, Markus Kuhn wrote:
> If you have nothing better to do around midnight UTC tonight, then
> install
>
> http://www.cl.cam.ac.uk/~mgk25/time/leap/timelog.c
A few hours earlier I wrote a simple loop with a similar functionality:
{
usleep( DELAY );
gettimeofday(&tv, &tz);
bt=localtime( &tv.tv_sec );
printf( "tijd: %d.%06d, %d-%02d-%04d %02d:%02d:%02d %s",
tv.tv_sec, tv.tv_usec, bt->tm_mday, 1+bt->tm_mon, 1900+bt->tm_year,
bt->tm_hour, bt->tm_min, bt->tm_sec, ctime(&tv.tv_sec) );
}
Part of the produced data is (local timezone is 1 hour ahead of UTC):
tijd: 1136073599.970036, 1-01-2006 00:59:59 Sun Jan 1 00:59:59 2006
tijd: 1136073599.990039, 1-01-2006 00:59:59 Sun Jan 1 00:59:59 2006
tijd: 1136073599.010063, 1-01-2006 00:59:59 Sun Jan 1 00:59:59 2006
tijd: 1136073599.030040, 1-01-2006 00:59:59 Sun Jan 1 00:59:59 2006
Thus tm_sec did not become 60, even though the man page says it would
become 60.
The system log is very nice:
Jan 1 00:59:59 nano kernel: TIME_INS: inserting second 23:59:60 UTC
The problem however is in the NTP-servers I synchronised with. My own
GPS-clock works perfectly. The NTP-servers from my ISP did not insert the
leapsecond. Thus my ntp-server decides to declare the GPS-clock an
outlier and jumps time one second. My systemlog shows:
Jan 1 00:45:07 nano ntpd[1407]: kernel time sync disabled 2317
Jan 1 00:46:10 nano ntpd[1407]: kernel time sync enabled 2117
Jan 1 01:01:15 nano ntpd[1407]: kernel time sync enabled 2107
Jan 1 01:07:04 nano ntpd[1407]: synchronized to LOCAL(0), stratum=4
Jan 1 01:07:44 nano ntpd[1407]: synchronized to 194.109.20.19, stratum=2
Jan 1 01:09:05 nano ntpd[1407]: pps sync disabled
Jan 1 01:15:10 nano ntpd[1407]: peer PPS(0) event 'event_unreach' (0x83) status 'unreach, conf, 15 e
vents, event_unreach' (0x80f3)
Jan 1 01:24:57 nano kernel: adjtime: ntpd used obsolete ADJ_OFFSET_SINGLESHOT
Jan 1 01:24:58 nano ntpd[1407]: time reset +0.999757 s
By now it is synchronized to my GPS as it jumped back.
Jan 1 01:43:11 nano ntpd[1407]: synchronized to GPS_JUPITER(0), stratum=0
Jan 1 01:45:09 nano ntpd[1407]: pps sync disabled
Jan 1 01:58:08 nano ntpd[1407]: time reset -1.032670 s
But it still is very messy (just look at the refid from *.xs4all.nl):
Sun Jan 1 02:09:01 CET 2006
remote refid st t when poll reach delay offset jitter
==============================================================================
+ardezo.swenker. 145.7.191.18 4 u 74 512 37 0.180 70.104 154.576
etulo.swenker.o .STEP. 16 u 49d 512 0 0.000 0.000 4000.00
auth1.xs4all.nl .<C1>CO<CA>. 16 u 78 256 36 10.690 -230.67 8.402
auth2.xs4all.nl 193.79.237.14 2 u 204 256 17 9.465 457.497 227.735
auth3.xs4all.nl .<C1>O<ED>^N. 16 u 72 256 36 10.564 1103.50 65.098
auth4.xs4all.nl .<83><BC>^C<DC>. 16 u 75 256 36 10.486 -148.68 19.983
+ntp.aots.nl 194.159.73.43 3 u 75 512 37 14.237 101.902 130.298
*GPS_JUPITER(0) .GPS. 0 l 5 64 377 0.000 357.043 150.272
LOCAL(0) LOCAL(0) 4 l 13 64 377 0.000 0.000 0.001
PPS(0) .PPS. 0 l 708 64 0 0.000 0.000 4000.00
[In case someone is interested, ntpq output like the above from every
minute from 23:00 untill 01:00 UTC is available at
http://www.xs4all.nl/~ardezo/ntp-001.txt It is output from the script
LOGFILE=/var/log/ntp-`date +%j`
echo >> $LOGFILE
date >> $LOGFILE
/usr/local/bin/ntpq -c pe >> $LOGFILE
/usr/local/bin/ntpq -c rl >> $LOGFILE
/usr/local/bin/ntptime >> $LOGFILE
/usr/local/bin/pps_spy.pl >> $LOGFILE
that runs every minute
]
Regards, Johan Swenker
More information about the questions
mailing list