Python ntpq

Achim Gratz Stromeko at nexgo.de
Mon Nov 28 18:43:31 UTC 2016


Eric S. Raymond writes:
> Achim Gratz <Stromeko at nexgo.de>:
>> Although I still think the limiting should be done in ntpq (or any other
>> program using utils) rather than there so that one can override the
>> termwidth from the top-level caller without second-guessing by util.
>
> Agreed, but let's get it working and stable before refactoring.

Well here's the nail in that coffin:


ntp/rpi2> ssh raspberrypi2 ntpq -p
/bin/stty: standard input: Inappropriate ioctl for device
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 NMEA(0)         .uBx8.           0 l    9   16  377    0.000   -2.942   4.747
oNMEA(1)         .NavS.           0 l    8   16  377    0.000   -0.000   0.000
 ptbtime1.ptb.de .PTB.            1 u   50   64  377   27.493    0.705   0.128
 ptbtime2.ptb.de .PTB.            1 u   32   64  377   27.224    0.619   0.129
 ptbtime3.ptb.de .PTB.            1 u   49   64  377   25.872    0.071   0.077


It gets worse when I want to output rv and cv status.  With my patch, I
can just set the width and don't need to query a non-existent tty.


ntp/rpi2> ssh raspberrypi2 ntpq -W 95 -p
     remote                          refid      st t when poll reach   delay   offset  jitter
=============================================================================================
 NMEA(0)                        .uBx8.           0 l    4   16  377    0.000    2.654   3.133
oNMEA(1)                        .NavS.           0 l    3   16  377    0.000    0.001   0.001
 ptbtime1.ptb.de                .PTB.            1 u   11   64  377   27.493    0.705   0.220
 ptbtime2.ptb.de                .PTB.            1 u   59   64  377   27.224    0.619   0.129
 ptbtime3.ptb.de                .PTB.            1 u   11   64  377   25.872    0.071   0.081


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