]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
munin: update shareholder plugins to match current storage layout
authorBrian Warner <warner@allmydata.com>
Thu, 18 Oct 2007 19:08:58 +0000 (12:08 -0700)
committerBrian Warner <warner@allmydata.com>
Thu, 18 Oct 2007 19:08:58 +0000 (12:08 -0700)
misc/munin/tahoe-files.py
misc/munin/tahoe-sharesperfile.py

index 67598921debb763d16760c904cae56b28de308d6..7993c76c4e1ab3511183fe5e8d1c32a7a3957d20 100644 (file)
@@ -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)
 
index a2420f2f0cd8b3b154071adec8063b1da43350d9..455d5f2539147b75e600633aa26e30176296c2f6 100644 (file)
@@ -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