From: antirez Date: Thu, 29 Sep 2011 11:18:09 +0000 (+0200) Subject: redis-trib: when loading node info also fetch the output of CLUSTER INFO. X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/b08c9dd28032a207a67773caf5d93616ff82a23f redis-trib: when loading node info also fetch the output of CLUSTER INFO. --- diff --git a/src/redis-trib.rb b/src/redis-trib.rb index daa5a78a..7086b4b2 100755 --- a/src/redis-trib.rb +++ b/src/redis-trib.rb @@ -96,6 +96,15 @@ class ClusterNode end } @dirty = false + @r.cluster("info").split("\n").each{|e| + k,v=e.split(":") + k = k.to_sym + if k != :cluster_state + @info[k] = v.to_i + else + @info[k] = v + end + } elsif o[:getfriends] @friends << info end