summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-05-17 23:59:06 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-05-21 18:43:13 +0200
commiteb9daf07b1a118b473d352c98c5822c3063e598d (patch)
treeb03d3a4dc504d5a34e8e8ee867692c0d2555542f
parenta3210275b113663cd4f2133ed81bae308f63dff2 (diff)
Update munin plugin
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--extras/munin/filebin_stats4
1 files changed, 2 insertions, 2 deletions
diff --git a/extras/munin/filebin_stats b/extras/munin/filebin_stats
index f7e3bbeac..4396c3503 100644
--- a/extras/munin/filebin_stats
+++ b/extras/munin/filebin_stats
@@ -19,7 +19,7 @@ EOM
esac
echo -n "used.value "
-mysql $mysqlopts -sr $database <<<"select coalesce(sum(filesize), 0) as 'Used storage' from (select filesize from files group by hash) a;" || echo "a"
+mysql $mysqlopts -sr $database <<<"select coalesce(sum(filesize), 0) as 'Used storage' from file_storage;" || echo "a"
echo -n "dedup.value "
-mysql $mysqlopts -sr $database <<<"select coalesce(sum((c - 1) * sub.filesize), 0) 'Space saved by deduplication' from (select hash, filesize, count(*) c from files group by hash having c > 1 order by c) sub;" || echo "a"
+mysql $mysqlopts -sr $database <<<"select coalesce(sum((c - 1) * sub.filesize), 0) 'Space saved by deduplication' from (select fs.id, filesize, count(*) c from files join file_storage fs on fs.id = files.file_storage_id group by fs.id having c > 1 order by c) sub;" || echo "a"