News items for tag time - Koos van den Hout

2014-02-16 (#) 6 years ago
Since the old gpskit gps was showing problems in ntp tests earlier I decided now that the weatherstation computer is up and running on the alix.1c board to try a different gps unit: The Holux GR-213 GPS I still have from earlier wardriving. holux 213 gps

Not much of a succes sofar. First the GPS did not get a lock at all. I was expecting a delay in acquiring a lock since it hadn't been used in over a year but after a day and a half it still wasn't locking. So I moved it a bit which led to a lock (blinking led). But ntpd was still not using the GPS_NMEA driver. When I had time to have more of a look than just the graphs at NTP server stats I noticed ntpd was still seeing GPS_NMEA as a falseticker. Which is about right, when I look at the peer stats the GPS_NMEA clock has an offset of about 500 milliseconds(!!) compared to the rest.

To my best knowledge I can find the right offset with 'enable calibrate'. But documentation is very minimal on this matter: Reference clock drivers - ntp 4.0.99k documentation has:
The recommended procedure is to enable the function, let it run for an hour or so, then edit the configuration file using the time1 values displayed by the ntpq utility and clockvar command.
With 'enable calibrate' on I see after a long run:
ntpq> peer
     remote           refid      st t when poll reach   delay   offset  jitter
+greenblatt.idef    2 u  137  512  377    1.012    1.780  87.722
*metronoom.dmz.c .PPS.            1 u  166  512  377   18.297   -1.207  46.401    2 u  119  512  377   16.604   -1.104  27.267
xGPS_NMEA(0)     .GPS.            0 l    4   16  377    0.000  -529.94   3.286
ntpq> clockvar
associd=0 status=0000 , no events, clk_unspec,
device="NMEA GPS Clock",
poll=762, noreply=0, badformat=0, baddata=0, fudgetime1=0.000, stratum=0,
refid=GPS, flags=0
So even after running for a long time with clearly an offset between the other clocks and the reference clock there is no change in the suggestion for the time1 factor, still showing 0.000.

Remarks in [ntp:questions] enable calibrate? suggest 'enable calibrate' will only work when there is a PPS signal available, and confirm the lack of documentation and samples I found.

The Holux GR-213 also does not have a PPS signal to the outside at all, so I can't use a PPS signal anyway.

Update: Some sleep, thinking and reading later: first of all, time1 is the PPS time offset and time2 is the gps message offset, found by reading ntpd documentation Generic NMEA GPS driver.

So I started looking for the right offset with the driver in noselect mode. After some testing I found a reasonable answer with:
# GPS as time source without pps
server minpoll 1 maxpoll 4
fudge time2 +0.544
And now things look better:
ntpq> peer
     remote           refid      st t when poll reach   delay   offset  jitter
+greenblatt.idef    2 u    2   64   77    0.956   -2.252  41.400
*metronoom.dmz.c .PPS.            1 u    5   64   77   17.921   -2.236   1.190    2 u    3   64   77   16.254   -2.750   0.880
+GPS_NMEA(0)     .GPS.            0 l    2    8  377    0.000   -5.916   1.100

Tags: ,
2013-12-30 The wonderful world of week number standards 6 years ago
The wonderful thing about standards:
$ date "+%u %w %U %V %W"
1 1 52 01 52
And the explanations:

%u day of week (1..7); 1 is Monday

%w day of week (0..6); 0 is Sunday

%U week number of year, with Sunday as first day of week (00..53)

%V ISO week number, with Monday as first day of week (01..53)

%W week number of year, with Monday as first day of week (00..53)

And it's easy to find days with 3 different week numbers:
31 dec 1990 is 52 01 53
03 jan 1993 is 01 53 00
02 jan 1994 is 01 52 00
01 jan 1995 is 01 52 00
30 dec 1996 is 52 01 53
31 dec 1996 is 52 01 53
03 jan 1999 is 01 53 00
02 jan 2000 is 01 52 00
02 jan 2005 is 01 53 00
01 jan 2006 is 01 52 00
31 dec 2007 is 52 01 53
03 jan 2010 is 01 53 00
02 jan 2011 is 01 52 00
01 jan 2012 is 01 52 00
03 jan 2016 is 01 53 00
01 jan 2017 is 01 52 00
31 dec 2018 is 52 01 53
03 jan 2021 is 01 53 00
02 jan 2022 is 01 52 00
01 jan 2023 is 01 52 00
30 dec 2024 is 52 01 53
31 dec 2024 is 52 01 53
03 jan 2027 is 01 53 00
02 jan 2028 is 01 52 00
31 dec 2029 is 52 01 53
Calendering software, including the one from a software developer quite known for not following standards has converged on the ISO week number.

Tags: , ,
2013-12-24 (#) 6 years ago
Modelled after the ntp server statistics at I created years ago I recently started gathering stats on my own. Today I had some time to spare to actually create some graphs from those ntp stats: NTP server stats.

Tags: , ,
2013-12-17 (#) 6 years ago
I looked up the details of the right configuration for ntpd to allow a reset of the packet counters without restarting ntpd for the ntp server project. Relevant part of /etc/ntp.conf:
keys /etc/ntp/ntp.keys
trustedkey 10
requestkey 10
controlkey 10
And in /etc/ntp/ntp.keys is one key 10. And it works:
ntpdc> syss
time since restart:     12
time since reset:       12
packets received:       10
packets processed:      8
current version:        8
previous version:       0
ntpdc> reset sys
Keyid: 10
MD5 Password: 
ntpdc> syss
time since restart:     19
time since reset:       3
packets received:       2
packets processed:      1
current version:        1
previous version:       0
Learned from How do I configure remote administration - ntp faq and miscellaneous commands and options - ntpd.

Tags: , ,
2013-12-17 (#) 6 years ago
End of an era: just shut down which was timeserver for from August 2003 to August 2006 and still saw active ntp traffic today. The complete history of timekeeping at is at Ntp events log -

Tags: ,
2013-05-14 (#) 7 years ago
Update to the NTP server project: I took pictures of the hardware and all the crystals I saw on the mainboard, visible at NTP server set on flickr. And the crystal involved in timing was easy to find: the standard timing crystal in PCs uses a 14.318 MHz crystal, the fourth crystal in the pictures.

Tags: ,
2013-05-13 (#) 7 years ago
I found the old rockwell jupiter gps board which I had not used in years and hooked it up to the NTP server project system. I was used to this GPS taking ages to get a location fix and being very finicky about reception. Not this time: between hooking it up to the system and walking back to my laptop and checking the gps output with minicom it already had enough of a location fix to start sending PPS pulses. And next..
# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
*xxxxxxxxxxxxxxx .PPS.            1 u    1   16    7   15.570   -6.927   9.294
 xxxxxxxxxxxxxxx .INIT.          16 u    -   64    0    0.000    0.000   0.000
 chime1.surfnet.  2 u   35   64    1   18.643   -7.491   0.000
 chime2.surfnet. .GPS.            1 u   34   64    1   19.214   -6.526   0.000
oPPS(0)          .PPS.            0 l    1   16    3    0.000   15.431   1.227

Update: But the situation isn't ideal, the PPS is voted falseticker after a while. Looking at the NMEA data, specifically the $GPRMC messages I notice there is no fix at all, but the PPS indicator (carrier detect) keeps ticking so minicom keeps switching between 'Online' and 'Offline'. At least this means all the bits are working.

Tags: , ,
2013-05-12 (#) 7 years ago
Update for the NTP server project: the SATA cables arrived and I managed to fit everything in the case. I think I removed and replaced the central fan in the case about 15 times, it is always in the way whenever anything happens in the front area of the 1U case. Ubuntu 12.04 LTS is now happily installing on a linux software raid.

Interestingly, when I copy the Ubuntu 12.04 LTS .iso to an USB stick as-is it boots and works fine, when I use usb-creator-gtk on an Ubuntu 10.04.4 LTS system with the Ubuntu 12.04 LTS .iso (amd64) it creates an USB stick which hangs during boot. I guess Ubuntu is also using isohybrid for .iso images now but usb-creator-gtk doesn't recognize those somehow.

Update: The ntp package from Ubuntu 12.04 includes no ATOM refclock support (refclock 22). So I removed the package again and built ntpd from sources, using the hints from LinuxPPS NTPD support on how to make sure the right timepps.h is available. The first tests look good:
# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
*xxxxxxxxxxxxxxx .PPS.            1 u   11   16  377   15.920   -2.472  35.941
 xxxxxxxxxxxxxxx .INIT.          16 u    -   64    0    0.000    0.000   0.000
+chime1.surfnet.     2 u   39   64  177   14.826   -1.898  28.043
+chime2.surfnet. .GPS.            1 u   30   64  177   18.103   -3.296   1.623
 PPS(0)          .PPS.            0 l    -   16    0    0.000    0.000   0.000
I have a rockwell jupiter gps board with PPS support available to test with.

Tags: , ,
2013-05-04 (#) 7 years ago
Some more tries to get the server running which I've been working on a few times. To keep all my notes together I started a webpage about it: NTP server.

From PLD linux I was able to reset the IPMI config so I could manage the system remotely (away from the fan noise!). In the Ubuntu and Debian installers the remote keyboard access was unavailable so I still had to walk up to the system from time to time to answer installer questions, but I could view the progress bars from a different room.

Tags: , ,
2012-06-30 (#) 8 years ago
This day (30 June 2012) will have a leap-second at the end of the (UTC) day. I installed the iers bulletin on months ago, but the leap indicator in the outgoing ntp answers switched on at 00:00 UTC today (2012-06-30T00:00:00 UTC).
metronoom# ntpq -c rv
status=411d leap_add_sec, sync_atomic, 1 event, event_13,
version="ntpd 4.2.6@1.2089-o Fri Jan 15 14:31:14 UTC 2010 (1)",
processor="i386", system="FreeBSD/5.4-RELEASE-p13", leap=01, stratum=1,
precision=-19, rootdelay=0.000, rootdisp=1.140, refid=PPS,
reftime=d399c71c.6e6e43bf  Sat, Jun 30 2012 18:42:36.431,
clock=d399c72a.fee93d22  Sat, Jun 30 2012 18:42:50.995, peer=32717,
tc=6, mintc=3, offset=0.000, frequency=15.707, sys_jitter=0.002,
clk_jitter=0.002, clk_wander=0.004, tai=34, leapsec=201207010000,
The interesting side-effect is that since the leap indicator went on the rate of requests went up. From a rate which is the last year average around 850 requests per second it went to a peak of 24488 requests per second. Stats for My theory is that the infamous Turkish ntp pool clients have a problem with ntp answers with a leap indicator. Although isn't in Turkey, it is a volunteer server for to help with the load from that country.

The great part is that ntpd is using over 50% cpu time on the system but the load of requests has absolutely no influence on the stability of the timekeeping.

Update: The leap second was processed correctly everywhere:
Jul  1 01:59:59 doei kernel: TIME_INS: inserting second 23:59:60 UTC
Jun 30 02:10:18 greenblatt ntpd[6856]: kernel time sync status change 0011
Jul  1 01:59:59 greenblatt kernel: [2817910.960085] Clock: inserting leap second 23:59:60 UTC
Jul  1 02:04:34 greenblatt ntpd[6856]: kernel time sync status change 0001
Jul  1 01:59:59 abaris kernel: [9788209.066779] Clock: inserting leap second 23:59:60 UTC

Tags: , ,
2012-02-23 (#) 8 years ago
Good news: the lawsuit about the timezone database has been dropped.

The EFF helped defend against the Astrolabe lawsuit against Olson and Eggert. It's still not the ideal way to move the control of the database from Olson and Eggert to the Iana, and reading the facts about the timezone database lawsuit shows just how bad things were, from 12 January 2012:
And then we waited for Astrolabe to actually serve Olson and Eggert, which would allow litigation to commence in earnest. Perhaps realizing the absurdity of its legal position, however, Astrolabe didn’t bother to take that next step, leaving Olson and Eggert in legal limbo.

Today, we’re taking the battle to Astrolabe, and starting the process for seeking sanctions under Rule 11 of the Federal Rules of Civil Procedure. Rule 11 requires litigants to conduct a reasonable inquiry into the facts and law before filing any paper with the court.
I hope this causes a bit more trouble for Astrolabe than just having to say "Sorry, we should not have done this".

Tags: , ,
2011-11-23 (#) 8 years ago
Recently we had to move our computer science server-room. Which was a project in itself, but as part of the move we had to move the 'time lab' to a different location because there is no antenna access in the new server-room.

That was the harder project. A new location had to be found, the antenna set up there, power and network made available. Antenna cabling wasn't the easiest part: N-connectors are hard to get right. As part of the move the IP of the public ntp server changed too: the load of requests has a noticeable influence on firewall performance. It's now behind a simpler firewall which does not attempt to keep state on ntp requests.

It's now up and running again, serving the correct time. Part of the NTP Pool, at the moment peaking at 445 requests per second.

If I ever need to use N-connectors for a transmitting antenna where actual power will cross the wires I will get help to get it connected to the cable. Getting that right is hard!

Tags: , , ,
2011-10-17 (#) 8 years ago
All the feared mayhem with the timezone database lawsuit should calm now: the ICANN took over and the new home of the timezone database is at the IANA website. Source: ICANN rescues time zone database - The Register.

There is still a lawsuit in which Astrolabe looks quite stupid.

Tags: ,
2011-02-21 (#) 9 years ago
Causing a bit of a 'what the ?' reaction in me:
The BBC has been told that proposals to move Britain’s clocks forward to bring local time into line with most of the EC countries will be published by the Department of Culture, Media and Sport in the coming week.
I would rather have the Netherlands move to the more fitting timezone of the UK so our day is more balanced. And get rid of the insanity of 'daylight saving time' which makes it even worse.

Source: UK government to propose changing to WEu time - Media Network

Tags: , ,
2011-01-31 (#) 9 years ago
Found via quite other ways, but something to keep in mind when rebuilding the kernel for the wardriving box or building a kernel for the future weather station: Debian on Soekris lists some specific Linux kernel compile settings for Geode processors. Another powersaving option could always be a good idea for both. Although I plan to make the weather station also work as ntp server so any power saving which influences timing is a bad idea.

Tags: , , , ,
2010-03-04 (#) 10 years ago
It seems the Turkish provider fell off the Internet for a few hours today. Since we volunteered for the drop in traffic was very, very noticeable.

Tags: , , ,
2010-03-01 (#) 10 years ago
First peak at 5000 packets/second ntp traffic seen on Still going strong under this load.

Tags: , , ,
2010-02-01 (#) 10 years ago
We volunteered for extra capacity for the Turkish ntp pool, and the results are quite visible in the statistics. Suddenly peaks are near 5000 packets per second. But ntpd (and the freebsd kernel) deal with it without problems.

Tags: , , ,
2010-01-15 (#) 10 years ago
I upgraded ntpd on from 4.2.4 to 4.2.6 and suddenly I notice in the output that this has changed the stratum from 2 to 1.
$ ntpq -c rv
status=011d leap_none, sync_atomic, 1 event, event_13,
version="ntpd 4.2.6@1.2089-o Fri Jan 15 14:31:14 UTC 2010 (1)",
processor="i386", system="FreeBSD/5.4-RELEASE-p13", leap=00, stratum=1,
precision=-19, rootdelay=0.000, rootdisp=1.456, refid=PPS,
reftime=cefb066f.cbe638ff  Fri, Jan 15 2010 16:21:19.796,
clock=cefb0693.889dd5ee  Fri, Jan 15 2010 16:21:55.533, peer=7047, tc=6,
mintc=3, offset=-0.001, frequency=15.448, sys_jitter=0.002,
clk_jitter=0.001, clk_wander=0.002
Which matches the peer list where the PPS stratum is now 0:
$ ntpq -c peer
     remote           refid      st t when poll reach   delay   offset  jitter
*huygens.cs.uu.n .PPS.            1 u   23   64  377    0.197    0.009   0.258
+stardate.cs.uu. .PPS.            1 u   13   64  377    0.998   -0.058   0.033
+tijger.phys.uu. metronoom.dmz.c  2 u   15   64  376    0.599    0.004   0.185
 LOCAL(0)        .LOCL.          10 l  627   64    0    0.000    0.000   0.002
oPPS(0)          .PPS.            0 l   49   64  377    0.000   -0.002   0.002
 NTP.MCAST.NET   .MCST.          16 u    -   64    0    0.000    0.000   0.002
I guess some definition of PPS input has changed. Now I wonder how much more ntp traffic this will cause.

Tags: , ,
2010-01-12 (#) 10 years ago
Work on home server greenblatt: time for less disks with more storage. So I bought two sata disks, one huge one to store the camera archive and scratch files, and one for the system and home directories. The choice for two disks is so the one with the camera archive and the scratch files can fall asleep when not in use, to save a bit of power. Installing both new disks at once wasn't going to happen due to space and cabling considerations so I started with the big one. When that one is done I can remove three pata disks from the system. I also updated the system bios to the latest version which made the system clock a lot more stable, ntpd now runs without having to use tickadj. Bios updates are easy these days: this bios can update itself from a USB stick. I chose logical volume management (lvm2) again for managing the big disks so it will be easy to expand storage when needed without getting a big tree of filesystem mounts.

Tags: , ,
⇐ Newer news items for tag time  Older news items for tag time ⇒
, reachable as PGP encrypted e-mail preferred.

PGP key 5BA9 368B E6F3 34E4 local copy PGP key 5BA9 368B E6F3 34E4 via keyservers pgp key statistics for 0x5BA9368BE6F334E4 Koos van den Hout
Other webprojects: Camp Wireless, wireless Internet access at campsites, The Virtual Bookcase, book reviews