Last active
August 29, 2015 14:07
-
-
Save fclairamb/4802ea5c939d87e203d8 to your computer and use it in GitHub Desktop.
Cassandra: Number of sstable files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# To put in /etc/cron.daily | |
date=$(date +%Y-%m-%d) | |
cd /var/lib/cassandra/data | |
for dir in $(find -mindepth 2 -maxdepth 2 -type d) | |
do | |
count=$(ls $dir/*-Data.db 2>/dev/null | wc -l) | |
echo ${date}: ${count} >>$dir/sstables_count | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment