Help with using gps time with chrony

Hello, I’m currently following this guide Building a GPS Time Server with the Raspberry Pi 3 . It’s a great guide, just it uses ntpd. My question is how would I use the ntpq -q command with chrony? What is the equivalent?

Also, is the adafruit external active antenna waterproof? It should but better safe than sorry

The chronyc tracking command displays parameters about the system’s clock performance.
chronyc sources -v displays information about the current time sources that chronyd is accessing. The -v option enables a verbose output. In this case, extra caption lines are shown as a reminder of the meanings of the columns.

chronyc sources is the command equivalent to ntpq -p

I recommend reading the documentation at chrony – chronyc(1)

chronyc sourcestats -v => source statistiscs over longer period of time
chronyc clients => who is using my ntp-server?
chronyc makestep => set system time correct to NTP time
chronyc ntpdata => give a lot of info about all your sources incl remote - sort of multi-tracking
chronyc serverstats => stats of packets, send, received and dropped.

Those are about the most usefull including tracking and sources as listed above.

This works great. Thanks. Do you know how I can set a refid (like Facebook or google)?

In chrony.conf:

refclock SHM 0 refid GPS poll 4 precision 1e-3 offset 0.1256 delay 0.2
refclock SHM 1 refid PPS poll 2 precision 1e-9 lock GPS prefer

But beware, not all refid’s are accepted as valid.

But when I query your server, which refid will I get? Maybe I’m asking for the wrong thing here - I used a tool about a year ago that told me the refid of a ntp server I query. For googles ntp server I got GOOG. I’m wondering how I can setup that for my server to be for ex. TEBO.

When you query my server you get PPS as refid.
As that is the most accurate time-source I have and as such does it show it’s refid.

Have a look here:

GOOG is generally not accepted as valid refid.
Also beware that Google is not advising to use their NTP as timesource for distribution in e.g. NTP-pool servers.
Google NTP should be used as endpoint-client only.

1 Like

This point is worth stressing. Google implements leap smearing on its time servers. As such, they should never be used as an upstream source for any server that is participating in the NTP pool project, because the NTP pool does not use leap smearing.

This isn’t just “Google advises you not to”; it’s a hard “do not ever do this.”

1 Like