TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: TAUNO VOIPIO
from: MARTIN GREGORIE
date: 2019-08-01 18:20:00
subject: Re: Can`t access share wi

On Thu, 01 Aug 2019 18:59:44 +0300, Tauno Voipio wrote:

> You asked how to poll the state of NTP, and ntpq is a tool from the
> original developer of NTP,
>
I meant something like "systemctl status ntpd" rather than ntpq,

But there's something odd, in the Fedora install anyway: I'm seeing this:

$ ntpq
ntpq> as
ind assid status  conf reach auth condition  last_event cnt
===========================================================
  1 62962  8013   yes    no  none    reject unreachable  1
  2 62963  8011   yes    no  none    reject    mobilize  1
  3 62964  8011   yes    no  none    reject    mobilize  1
  4 62965  961a   yes   yes  none  sys.peer    sys_peer  1
  5 62966  9414   yes   yes  none candidate   reachable  1
ntpq> q

$ ntpq
ntpq> host localhost
current host set to localhost
ntpq> as
ind assid status  conf reach auth condition  last_event cnt
===========================================================
  1 62962  8013   yes    no  none    reject unreachable  1
  2 62963  8011   yes    no  none    reject    mobilize  1
  3 62964  8011   yes    no  none    reject    mobilize  1
  4 62965  961a   yes   yes  none  sys.peer    sys_peer  1
  5 62966  9414   yes   yes  none candidate   reachable  1
ntpq> q

$ ntpq
ntpq> host zappa
current host set to zappa.gregorie.lan
ntpq> as
zappa.gregorie.lan: timed out, nothing received
***Request timed out
ntpq> q

... where zappa.gregorie.lan physically the same hardware & software as
localhost

Here's the behaviour I'm seeing:

1) setting 'host' to an undefined host name
   (gets "Name or service not known" error)

2) setting it to a valid host name which is not running
   ntpd (gets "read: Connection refused" if you try to query it)

3) setting it to a valid host name with ntpd running (gets
   "***Request timed out" if you try to query it

4) setting it to 'localhost' (queries work OK).

It doesn't seem to matter whether case 3 is the same system as in case 4,
so there's evidently something amiss on the 'host' command, at least with
version ntpq 4.2.8p13@1.3847-o Thu Mar  7 14:37:11 UTC 2019 (1)


--
Martin    | martin at
Gregorie  | gregorie dot org

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.