]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
munin/tahoe_overhead: don't emit non-sensicial numbers
authorBrian Warner <warner@lothar.com>
Thu, 7 Aug 2008 21:40:08 +0000 (14:40 -0700)
committerBrian Warner <warner@lothar.com>
Thu, 7 Aug 2008 21:40:08 +0000 (14:40 -0700)
misc/munin/tahoe_overhead

index 0c0567c13450d722222b489a3a8166d876bdcc50..ba2e1ddf5ebccb7a3aea5bf4498cddef1fec28d9 100644 (file)
@@ -52,10 +52,14 @@ expansion = float(N) / k
 
 ideal = expansion * deepsize["all"]
 overhead = (total - ideal) / ideal
-print "overhead.value %f" % (100.0 * overhead)
+if overhead > 0:
+    # until all the storage-servers come online, this number will be nonsense
+    print "overhead.value %f" % (100.0 * overhead)
 
-effective_expansion = total / deepsize["all"]
-print "effective_expansion.value %f" % effective_expansion
+    # same for this one
+    effective_expansion = total / deepsize["all"]
+    print "effective_expansion.value %f" % effective_expansion
 
+# this value remains valid, though
 inactive_savings = (deepsize["all"] - deepsize["active"]) / deepsize["active"]
 print "inactive.value %f" % (100.0 * inactive_savings)