A script to check bitcask keydir sizes

Aphyr aphyr at aphyr.com
Wed Mar 16 15:04:48 EDT 2011

I'm trying to track some basic metrics so we can plan for cluster 
capacity, monitor transfers, etc. Figured this might be of interest to 
other riak admins. Apologies if my erlang is nonidiomatic, I'm still 
learning. :)

#!/usr/bin/env escript
%%! -name riakstatuscheck -setcookie riak

main([]) -> main(["riak at"]);
main([Node]) ->
   io:format("~w\n", [
       fun({_VNode, Count}, Sum) -> Sum + Count end,
       rpc:call(list_to_atom(Node), riak_kv_bitcask_backend, key_counts, [])

$ ./riakstatus riak at

More information about the riak-users mailing list