aboutsummaryrefslogtreecommitdiff
path: root/scripts/analyze-rcynic-history.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/analyze-rcynic-history.py')
-rw-r--r--scripts/analyze-rcynic-history.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/analyze-rcynic-history.py b/scripts/analyze-rcynic-history.py
index 208ace79..af60752a 100644
--- a/scripts/analyze-rcynic-history.py
+++ b/scripts/analyze-rcynic-history.py
@@ -215,11 +215,16 @@ def plot_hosts(hostnames, fields):
for logscale in (False, True):
gnuplot = subprocess.Popen(("gnuplot",), stdin = subprocess.PIPE)
gnuplot.stdin.write("set terminal pdf\n")
- gnuplot.stdin.write("set output '%s-%s.pdf'\n" % (field, "log" if logscale else "linear"))
+ gnuplot.stdin.write("set output '%s/%s-%s.pdf'\n" % (outdir, field, "log" if logscale else "linear"))
plotter(gnuplot.stdin, hostnames, field, logscale = logscale)
gnuplot.stdin.close()
gnuplot.wait()
+outdir = "images"
+
+if not os.path.exists(outdir):
+ os.makedirs(outdir)
+
mb = mailbox.Maildir("/u/sra/rpki/rcynic-xml", factory = None, create = False)
if sys.platform == "darwin": # Sigh