[ntp:questions] Anyone have a script that decodes all of the status words?
Dave Hart
hart at ntp.org
Wed Oct 26 09:53:39 UTC 2011
On Wed, Oct 26, 2011 at 05:55, Doug Calvert
<dfc-list at douglasfcalvert.net> wrote:
> Hello,
> Has anyone ever written a script to parse the peer/sys/clock/flash status
> words? As much as I hate to admit it I can not tell the difference between
> 9024/963a/9424 without going to the docs and even then its not the most
> intuitive/friendly experience;)
>
> Something like:
>
> transmogrify -[s|f|p|c] ####
>
> that prints out the description of each bit from the docs?
No script necessary -- ntpq decodes all of those for you:
> ntpq -crv -p -c "cv &1" -c "rv &6" davehart.net
associd=0 status=0418 leap_none, sync_uhf_radio, 1 event, no_sys_peer,
#
# prior line shows system status word and its decoded meaning
#
version="ntpd 4.2.7p214-o Sep 21 2:47:14.56 (UTC-00:00) 2011 (1)",
processor="x86", system="Windows", leap=00, stratum=1, precision=-18,
rootdelay=0.000, rootdisp=0.249, refid=GPS,
reftime=d25255e3.7706cfb5 Wed, Oct 26 2011 9:48:19.464,
clock=d25255e3.fddec5aa Wed, Oct 26 2011 9:48:19.991, peer=53501, tc=4,
mintc=3, offset=-0.010, frequency=-21.684, sys_jitter=0.004,
clk_jitter=0.005, clk_wander=0.000, ctr_frequency=41.35
remote refid st t when poll reach delay offset jitter
==============================================================================
oGPS_NMEA(2) .GPS. 0 l 1 16 377 0.000 -0.010 0.004
192.168.1.255 .BCST. 16 B - 64 0 0.000 0.000 0.004
+2001:4f8:fff7:1 216.218.254.202 2 u 168 256 377 48.440 -0.337 2.332
+pool-test.ntp.o 216.218.254.202 2 u 68 256 377 44.784 1.194 0.213
2001:16d8:ee97: 194.63.250.121 3 s 5 64 377 196.871 0.222 0.572
2001:5c0:1000:b 138.39.23.13 2 s 6d 1024 0 0.000 0.000 0.000
+bigben.cac.wash .GPS. 1 u 115 128 177 25.486 -0.358 0.551
associd=53501 status=0011 1 event, clk_no_reply,
#
# clock status word and decode
#
device="NMEA GPS Clock",
timecode="$GPGGA,094819,____.____,N,_____.____,W,2,08,1.2,142.5,M,-18.0,M,,*__",
poll=50248, noreply=1, badformat=0, baddata=0, fudgetime1=-6.729,
fudgetime2=-6.729, stratum=0, refid=GPS, flags=9
associd=53506 status=8011 conf, sel_reject, 1 event, mobilize,
#
# peer status word and decode
#
srcadr=2001:5c0:1000:b::1559, srcport=123,
dstadr=2001:470:e983:1ee:290:47ff:fe04:1b4b, dstport=123, leap=00,
stratum=2, precision=-19, rootdelay=44.052, rootdisp=17.014,
refid=138.39.23.13,
reftime=d249f303.c291b699 Thu, Oct 20 2011 1:08:19.760,
rec=d249f3d3.36821064 Thu, Oct 20 2011 1:11:47.212, reach=000,
unreach=774, hmode=1, pmode=2, hpoll=10, ppoll=10, headway=0,
flash=1406 pkt_bogus, pkt_unsync, peer_dist, peer_unreach, keyid=0,
#
# flash and decode
#
offset=0.000, delay=0.000, dispersion=15937.500, jitter=0.000,
xleave=0.285,
filtdelay= 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00,
filtoffset= 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00,
filtdisp= 16000.0 16000.0 16000.0 16000.0 16000.0 16000.0 16000.0 16000.0
Cheers,
Dave Hart
More information about the questions
mailing list