donis
Posts: 5
Joined: Fri Nov 15, 2013 5:37 pm

Rpi as NTP server Can't query ntpq -p

Fri Nov 22, 2013 5:35 pm

Folks,
I configured a Raspberry Pi B rev2 as NTP server with PGS receiver and configured "ntp.conf" adding GPS and PPS and some LAN servers as my ntp time sources. My final "ntp.conf" file will list only the gps receiver as the source and my raspberry pi will have no connection to the internet. The PPS signals is configured on "ntp.conf" with IP: 127.127.20.0 working if there is connection to the internet

My problem: running the Rpi with internet connection I can query the ntp by running "ntpq -p" and I get the information I want and all looks okay. However, if I disconnect the internet running "ntpq -p" gives: "Name or service not known".

Question: What do I need to add or change, or what commands to use so that if I disconnect the internet I can verify whether my pi is synchronized to the GPS or not?

I checked "ps -ef | grep ntp and I see that ntp is running without the internet connection but "ntpq -p" is NOT KNOWN.

Thanks in advance

Donis

User avatar
emgi
Posts: 357
Joined: Thu Nov 07, 2013 4:08 pm
Location: NL

Re: Rpi as NTP server Can't query ntpq -p

Fri Nov 22, 2013 5:59 pm

That's while ntpq attempts to resolve the peer names via dns. Without Internet obviously that doesn't work.

So ntpq is not the proper command to use. You may try ntpdc -p instead.

/emgi

Return to “Troubleshooting”