[Git][NTPsec/ntpsec][master] Make ntpviz nice (-N) always on.

Gary E. Miller gitlab at mg.gitlab.com
Tue Aug 23 18:57:06 UTC 2016


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


Commits:
7b60ba12 by Gary E. Miller at 2016-08-23T11:56:07-07:00
Make ntpviz nice (-N) always on.

Tests show no resaon not to have it always on.

- - - - -


2 changed files:

- docs/includes/ntpviz-body.txt
- ntpstats/ntpviz


Changes:

=====================================
docs/includes/ntpviz-body.txt
=====================================
--- a/docs/includes/ntpviz-body.txt
+++ b/docs/includes/ntpviz-body.txt
@@ -44,10 +44,6 @@ The -D N set the debug level to N and outputs with more verbosity.  0
 is the default, quiet except for all ERRORs and some WARNINGs.  9 is
 painfully verbose.
 
-The -N option will force ntpviz to run "nice"ly.  This is appropriate
-when you run ntpviz as a cron job.  If the Python library psutils is
-installed then ntpviz will also be run at ionice(IDLE).
-
 The plot options choose what graph is generated; invoke only one.  By
 default, the GNUPLOT for the graph is reported; with -g you get the
 rendered PNG.


=====================================
ntpstats/ntpviz
=====================================
--- a/ntpstats/ntpviz
+++ b/ntpstats/ntpviz
@@ -11,7 +11,7 @@ Usage: ntpviz [-d statsdir] [-g] [-n name] [-p days]
               [--peer-jitters=hosts | --all-peer-jitters]
               [--local-cpu-temp]
               [-o outdir]
-              [-D N] [-N]
+              [-D N]
 
 See the manual page for details.
 
@@ -371,7 +371,6 @@ if __name__ == '__main__':
     show_peer_rtt = None
     outdir = "ntpgraphs"
     debug_level = 0
-    nice = 0
     for (switch, val) in options:
         if switch == "-d":
             statsdirs = val.split(",")
@@ -392,9 +391,6 @@ if __name__ == '__main__':
             outdir = val
         elif switch == "-D":
             debug_level = int(val)      # Debug level, 0 to 9, 9 most verbose
-        elif switch == "-N":
-            # implemented as integer, in case the option needs to be extended
-            nice = 19             # run ntpviz "nice"ly
         elif switch == "--local-offset":
             show_local_offset = True
         elif switch == "--local-error":
@@ -426,6 +422,7 @@ if __name__ == '__main__':
             pr = cProfile.Profile()
             pr.enable()
 
+    nice = 19       # always run nicely
     if 0 != nice:
         try:
             import psutil



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/7b60ba12a239a56cfdb178a63b422087c7a1a2b4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160823/8925912e/attachment.html>


More information about the vc mailing list