From d87bd36040128c6553e8ee06a363eeb60d16e72c Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Thu, 21 Jun 2012 04:58:04 +0530 Subject: cli: improvements in the output of rebalance status Change-Id: I14149dc0eef9236fb089cc1404166efee46ddd1b BUG: 834263 Signed-off-by: Raghavendra Bhat Reviewed-on: http://review.gluster.com/3608 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Vijay Bellur --- cli/src/cli-rpc-ops.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'cli') diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index 952117413..0b64758fa 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -1105,12 +1105,6 @@ gf_cli3_1_defrag_volume_cbk (struct rpc_req *req, struct iovec *iov, goto done; } - ret = dict_get_int32 (dict, "count", &counter); - if (ret) { - gf_log (THIS->name, GF_LOG_ERROR, "count not set"); - goto out; - } - if (cmd == GF_DEFRAG_CMD_STOP) { if (rsp.op_ret == -1) { if (strcmp (rsp.op_errstr, "")) @@ -1139,12 +1133,18 @@ gf_cli3_1_defrag_volume_cbk (struct rpc_req *req, struct iovec *iov, goto done; } } + + ret = dict_get_int32 (dict, "count", &counter); + if (ret) { + gf_log (THIS->name, GF_LOG_ERROR, "count not set"); + goto out; + } + cli_out ("%40s %16s %13s %13s %13s %14s %s", "Node", "Rebalanced-files", "size", "scanned", "failures", "status", "run time in secs"); cli_out ("%40s %16s %13s %13s %13s %14s %14s", "---------", "-----------", "-----------", "-----------", "-----------", "------------", "-----------"); - do { snprintf (key, 256, "node-uuid-%d", i); ret = dict_get_str (dict, key, &node_uuid); @@ -1211,7 +1211,7 @@ gf_cli3_1_defrag_volume_cbk (struct rpc_req *req, struct iovec *iov, status = "failed"; break; } - cli_out ("%40s %16"PRId64 "%13"PRId64 "%13"PRId64 "%13"PRId64 + cli_out ("%40s %16"PRIu64 "%13"PRIu64 "%13"PRIu64 "%13"PRIu64 " %14s %14.2f", node_uuid, files, size, lookup, failures, status, elapsed); i++; @@ -1595,7 +1595,7 @@ gf_cli3_remove_brick_status_cbk (struct rpc_req *req, struct iovec *iov, status = "failed"; break; } - cli_out ("%40s %16"PRId64 "%13"PRId64 "%13"PRId64 "%13"PRId64 + cli_out ("%40s %16"PRIu64 "%13"PRIu64 "%13"PRIu64 "%13"PRIu64 " %14s %14.2f", node_uuid, files, size, lookup, failures, status, elapsed); i++; -- cgit