summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-rpc-ops.c
diff options
context:
space:
mode:
authorDawit Alemu <dalemu@redhat.com>2013-11-14 12:52:14 -0500
committerAnand Avati <avati@redhat.com>2013-12-03 18:09:29 -0800
commit133c370ec5e2688b6734acb087fe3769cb900a74 (patch)
tree14e72f63bcfc8612c3f07166465e95614457b6db /cli/src/cli-rpc-ops.c
parente4b9a74f46bca3894d686ce87042168c4304f07b (diff)
cli: Add an option to fetch just incremental or cumulative I/0
information 'volume profile info' fetches both cumulative and incremental I/O statistics. There isn't a way to fetch just cumulative or incremental statistics. This change introduces two optional arguments, namely "incremental" and "cumulative", that can be tacked on to 'volume profile info'. In other words, the new command format is volume profile <VOLNAME> {start | info [incremental | cumulative] | stop} [nfs] 'volume profile info incremental' - fetches incremental stats 'volume profile info cumulative' - fetches cumulative stats 'volume profile info' - fetches incremental and cumulative stats Change-Id: I5ddb45d990542ea611d23d251efebfec46f472d0 BUG: 1030580 Signed-off-by: Dawit Alemu <dalemu@redhat.com> Reviewed-on: http://review.gluster.org/6264 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'cli/src/cli-rpc-ops.c')
-rw-r--r--cli/src/cli-rpc-ops.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index 3d2f90c04..2cb0ba3d4 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -4976,6 +4976,8 @@ gf_cli_profile_volume_cbk (struct rpc_req *req, struct iovec *iov,
(rsp.op_ret) ? "unsuccessful": "successful");
break;
case GF_CLI_STATS_INFO:
+ case GF_CLI_STATS_INFO_INCREMENTAL:
+ case GF_CLI_STATS_INFO_CUMULATIVE:
break;
default:
cli_out ("volume profile on %s has been %s ",
@@ -4990,7 +4992,7 @@ gf_cli_profile_volume_cbk (struct rpc_req *req, struct iovec *iov,
goto out;
}
- if (op != GF_CLI_STATS_INFO) {
+ if (op < GF_CLI_STATS_INFO || GF_CLI_STATS_INFO_CUMULATIVE < op) {
ret = 0;
goto out;
}