Python ntpq

Achim Gratz Stromeko at nexgo.de
Sun Nov 27 11:46:57 UTC 2016


Eric S. Raymond writes:
> Oh, bletch.  I see the problem.  I'm going to have to write a real
> parser rather than using a naive split(",") call.
>
> ...or maybe not.  Rather klugey fix pushed.  Complain if it needs
> futher work.

Current master is mysteriously broken:

pi at raspberrypi2:~/ntpsec $ ntpq/ntpq -w -c rv -p
status=0415 leap_none, sync_uhf_radio, 1 event, clock_sync,
version="ntpd 0.9.6-6d3838e Nov 26 2016 12:56:44", processor="armv7l",
system="Linux/4.4.32-v7+", leap=00, stratum=1, precision=-19, rootdelay=0.0,
rootdisp=1.0, refid=NavS, reftime=dbe5442c.fb7432a8 2016-11-27T12:38:20.982,
clock=dbe5442d.6dc8ea75 2016-11-27T12:38:21.428, peer=14813, tc=4, mintc=0,
offset=0.000306, frequency=-3.143, sys_jitter=0.000713, clk_jitter=0.001,
clk_wander=0.0
     remote                                   refid      st t when poll reach   delay   offset  jitter
======================================================================================================
Traceback (most recent call last):
  File "ntpq/ntpq", line 1590, in <module>
    interpreter.onecmd(cmd)
  File "/usr/lib/python2.7/cmd.py", line 221, in onecmd
    return func(arg)
  File "ntpq/ntpq", line 1123, in do_peers
    self.__dopeers(showall=False, mode="peers")
  File "ntpq/ntpq", line 334, in __dopeers
    variables, peer.associd))
  File "/usr/lib/python2.7/dist-packages/ntp/util.py", line 208, in summary
    if hmode == MODE_BCLIENT:
NameError: global name 'MODE_BCLIENT' is not defined


That constant should be in ntp_magic, which is imported for all I can tell.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds



More information about the devel mailing list