[Git][NTPsec/ntpsec][master] 3 commits: Continue if unable to contact a server

Matt Selsky gitlab at mg.gitlab.com
Wed Mar 7 08:13:38 UTC 2018


Matt Selsky pushed to branch master at NTPsec / ntpsec


Commits:
53ba4158 by Sanjeev Gupta at 2018-03-07T08:12:15Z
Continue if unable to contact a server

The ntpsweep utility will probably not do what you think
it does, as most NTP servers will refuse to be probed.

Instead of failing hard if unable to contact a server, we now
continue to the next server in the list.  This works only when
you are specifying a breadth of servers, if probing up the tree
recursively ( -p ), there is no next server.

- - - - -
1b2f9102 by Sanjeev Gupta at 2018-03-07T08:12:15Z
Document -h option

Existed in code, added to the __doc__ header

- - - - -
37eb793b by Sanjeev Gupta at 2018-03-07T08:12:59Z
Improve man page documentation for ntpsweep

... although this utility is now probably useless

- - - - -


2 changed files:

- docs/includes/ntpsweep-body.txt
- ntpclients/ntpsweep.py


Changes:

=====================================
docs/includes/ntpsweep-body.txt
=====================================
--- a/docs/includes/ntpsweep-body.txt
+++ b/docs/includes/ntpsweep-body.txt
@@ -27,7 +27,8 @@ configured timeservers on a LAN.
   of times.
 +
 Use this option to specify the host on which this script operates. May
-appear multiple times.
+appear multiple times.  Multiple hosts may be specified, delimited
+by commas.
 
 +-p+, +--peers+::
   Recursively list all peers a host synchronizes to.


=====================================
ntpclients/ntpsweep.py
=====================================
--- a/ntpclients/ntpsweep.py
+++ b/ntpclients/ntpsweep.py
@@ -4,8 +4,9 @@
 ntpsweep - print various information about given NTP servers
 USAGE: ntpsweep [-<flag> [<val>] | --<name>[{=| }<val>]]... [hostfile]
 
-    -l, --host-list=str        Host to execute actions on
-                                   - may appear multiple times
+    -h, --host=str             Host to execute actions on
+    -l, --host-list=str        Comma-delimited list of Hosts to 
+                                   execute actions on
     -p, --peers                Recursively list all peers a host syncs to
     -m, --maxlevel=num         Traverse peers up to this level
                                    (4 is a reasonable number)
@@ -196,7 +197,7 @@ Host                             st offset(s) version     system       processor
             scan_host(host, 0)
         except ntp.packet.ControlException as e:
             sys.stderr.write(e.message + "\n")
-            sys.exit(1)
+            continue
     sys.exit(0)
 
 # end



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/d665cf339368e8161234244e23d00cd326a8669e...37eb793b70170e9ad80cd37bd0b6a0d76df2a9ff

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/d665cf339368e8161234244e23d00cd326a8669e...37eb793b70170e9ad80cd37bd0b6a0d76df2a9ff
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/20180307/5cb832e4/attachment.html>


More information about the vc mailing list