[Git][NTPsec/ntpsec][master] ntpmon: rearrange peer detail a bit

Gary E. Miller gitlab at mg.gitlab.com
Tue Aug 8 23:47:51 UTC 2017


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
97c4e3ef by Gary E. Miller at 2017-08-08T16:46:58-07:00
ntpmon: rearrange peer detail a bit

Now the address line usually fits...

- - - - -


1 changed file:

- ntpclients/ntpmon


Changes:

=====================================
ntpclients/ntpmon
=====================================
--- a/ntpclients/ntpmon
+++ b/ntpclients/ntpmon
@@ -125,8 +125,13 @@ def peer_detail(variables, showunits=False):
         vcopy['filtdelay'] = vcopy['filtdelay'].replace(' ', '\t')
         vcopy['filtoffset'] = vcopy['filtoffset'].replace(' ', '\t')
         vcopy['filtdisp'] = vcopy['filtdisp'].replace(' ', '\t')
+    # annotate IPv6, to stand out from :port
+    if ':' in vcopy['srcadr']:
+        vcopy['srcadr'] = '[' + vcopy['srcadr'] + ']'
+    if ':' in vcopy['dstadr']:
+        vcopy['dstadr'] = '[' + vcopy['dstadr'] + ']'
     peerfmt = """\
-srcadr=%(srcadr)s, srcport=%(srcport)d, dstadr=%(dstadr)s, dstport=%(dstport)s
+dstadr=%(dstadr)s:%(dstport)s srcadr=%(srcadr)s:%(srcport)d
 leap=%(leap)s\treftime=%(reftime)s\trootdelay=%(rootdelay)s
 stratum=%(stratum)2d\trec=%(rec)s\trootdisp=%(rootdisp)s
 precision=%(precision)3d\txmt=%(xmt)s\tdispersion=%(dispersion)s



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/97c4e3ef8ebb1cc581000edafe7bcba9d4302063

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/97c4e3ef8ebb1cc581000edafe7bcba9d4302063
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/20170808/c8e32a45/attachment.html>


More information about the vc mailing list