[Git][NTPsec/ntpsec][master] ntpdig: add "delay" to the JSON output

Hal Murray (@hal.murray) gitlab at mg.gitlab.com
Tue Jan 3 20:57:12 UTC 2023



Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
43a17ec7 by folkert van heusden at 2023-01-03T14:41:14-06:00
ntpdig: add "delay" to the JSON output

- - - - -


1 changed file:

- ntpclients/ntpdig.py


Changes:

=====================================
ntpclients/ntpdig.py
=====================================
@@ -216,12 +216,12 @@ def report(packet, json):
 
     if json:
         say('{"time":"%sT%s%s","offset":%f,"precision":%f,"host":"%s",'
-            '"ip":"%s","stratum":%s,"leap":"%s","adjusted":%s}\n'
+            '"ip":"%s","stratum":%s,"leap":"%s","adjusted":%s,"delay":%f}\n'
             % (date, tod, tz,
                packet.adjust(), packet.synchd(),
                packet.hostname, packet.resolved or packet.hostname,
                packet.stratum, packet.leap(),
-               "true" if adjusted else "false"))
+               "true" if adjusted else "false", packet.delta()))
     else:
         say("%s %s (%s) %+f +/- %f %s"
             % (date, tod, tz,



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/43a17ec726483c68dfe68ada35bf565248eab531

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/43a17ec726483c68dfe68ada35bf565248eab531
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20230103/c141beb3/attachment.htm>


More information about the vc mailing list