From 33a02e19f1470708b1e3c9d24110baf5024a83b1 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Thu, 18 Oct 2007 12:08:58 -0700 Subject: [PATCH] munin: update shareholder plugins to match current storage layout --- misc/munin/tahoe-files.py | 4 ++-- misc/munin/tahoe-sharesperfile.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/munin/tahoe-files.py b/misc/munin/tahoe-files.py index 67598921..7993c76c 100644 --- a/misc/munin/tahoe-files.py +++ b/misc/munin/tahoe-files.py @@ -44,8 +44,8 @@ if len(sys.argv) > 1: sys.exit(0) for nodename, basedir in nodedirs: - files = len(os.listdir(os.path.join(basedir, "storage"))) - if os.path.exists(os.path.join(basedir, "storage", "incoming")): + files = len(os.listdir(os.path.join(basedir, "storage", "shares"))) + if os.path.exists(os.path.join(basedir, "storage", "shares", "incoming")): files -= 1 # the 'incoming' directory doesn't count print "%s.value %d" % (nodename, files) diff --git a/misc/munin/tahoe-sharesperfile.py b/misc/munin/tahoe-sharesperfile.py index a2420f2f..455d5f25 100644 --- a/misc/munin/tahoe-sharesperfile.py +++ b/misc/munin/tahoe-sharesperfile.py @@ -46,11 +46,11 @@ if len(sys.argv) > 1: for nodename, basedir in nodedirs: files = 0 shares = 0 - for f in os.listdir(os.path.join(basedir, "storage")): + for f in os.listdir(os.path.join(basedir, "storage", "shares")): if f == "incoming": continue files += 1 - filedir = os.path.join(basedir, "storage", f) + filedir = os.path.join(basedir, "storage", "shares", f) shares += len(os.listdir(filedir)) if files: shares_per_file = 1.0 * shares / files -- 2.45.2