From: Brian Warner <warner@allmydata.com>
Date: Thu, 18 Oct 2007 19:08:58 +0000 (-0700)
Subject: munin: update shareholder plugins to match current storage layout
X-Git-Tag: allmydata-tahoe-0.7.0~365
X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/uri/readonly?a=commitdiff_plain;h=33a02e19f1470708b1e3c9d24110baf5024a83b1;p=tahoe-lafs%2Ftahoe-lafs.git

munin: update shareholder plugins to match current storage layout
---

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