summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2012-01-01 15:59:28 +0530
committerVijay Bellur <vijay@gluster.com>2012-01-27 04:20:04 -0800
commit623919a78a7faac30d1f0df5793681da2c449e32 (patch)
treeee213fa96ebf5feb938babf36c34cb7c8d5f6a24 /rpc
parenta078235dbede380ca695251e86a1502ca131d816 (diff)
cli: Extend "volume status" with statedump info
This patch enhances and extends the "volume status" command with information obtained from the statedump of the bricks of volumes. Adds new status types : clients, inode, fd, mem, callpool The new syntax of "volume status" is, #gluster volume status [all|{<volname> [<brickname>] [misc-details|clients|inode|fd|mem|callpool]}] Change-Id: I8d019718465bbc3de727653a839de7238f45da5c BUG: 765495 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/2637 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-lib/src/protocol-common.h1
-rw-r--r--rpc/xdr/src/cli1-xdr.h20
-rw-r--r--rpc/xdr/src/cli1-xdr.x20
3 files changed, 25 insertions, 16 deletions
diff --git a/rpc/rpc-lib/src/protocol-common.h b/rpc/rpc-lib/src/protocol-common.h
index b35cdf9..9719960 100644
--- a/rpc/rpc-lib/src/protocol-common.h
+++ b/rpc/rpc-lib/src/protocol-common.h
@@ -180,6 +180,7 @@ enum glusterd_brick_procnum {
GLUSTERD_BRICK_TERMINATE,
GLUSTERD_BRICK_XLATOR_INFO,
GLUSTERD_BRICK_XLATOR_HEAL,
+ GLUSTERD_BRICK_STATUS,
GLUSTERD_BRICK_OP,
GLUSTERD_BRICK_MAXVALUE,
};
diff --git a/rpc/xdr/src/cli1-xdr.h b/rpc/xdr/src/cli1-xdr.h
index d559397..ea8ab02 100644
--- a/rpc/xdr/src/cli1-xdr.h
+++ b/rpc/xdr/src/cli1-xdr.h
@@ -161,14 +161,18 @@ enum gf1_cli_top_op {
typedef enum gf1_cli_top_op gf1_cli_top_op;
enum gf_cli_status_type {
- GF_CLI_STATUS_NONE = 0x0000,
- GF_CLI_STATUS_VOL = 0x0100,
- GF_CLI_STATUS_ALL = 0x0200,
- GF_CLI_STATUS_BRICK = 0x0400,
- GF_CLI_STATUS_DETAIL = 0x0800,
- GF_CLI_STATUS_VOL_DETAIL = 0x0900,
- GF_CLI_STATUS_ALL_DETAIL = 0x0A00,
- GF_CLI_STATUS_BRICK_DETAIL = 0x0C00,
+ GF_CLI_STATUS_INVAL = -1,
+ GF_CLI_STATUS_NONE = 0x000,
+ GF_CLI_STATUS_MEM = 0x001,
+ GF_CLI_STATUS_CLIENTS = 0x002,
+ GF_CLI_STATUS_INODE = 0x004,
+ GF_CLI_STATUS_FD = 0x008,
+ GF_CLI_STATUS_CALLPOOL = 0x010,
+ GF_CLI_STATUS_DETAIL = 0x020,
+ GF_CLI_STATUS_MASK = 0x0FF,
+ GF_CLI_STATUS_VOL = 0x100,
+ GF_CLI_STATUS_ALL = 0x200,
+ GF_CLI_STATUS_BRICK = 0x400,
};
typedef enum gf_cli_status_type gf_cli_status_type;
diff --git a/rpc/xdr/src/cli1-xdr.x b/rpc/xdr/src/cli1-xdr.x
index 5697310..a2edc57 100644
--- a/rpc/xdr/src/cli1-xdr.x
+++ b/rpc/xdr/src/cli1-xdr.x
@@ -106,14 +106,18 @@ enum gf1_cli_top_op {
/* The unconventional hex numbers help us perform
bit-wise operations which reduces complexity */
enum gf_cli_status_type {
- GF_CLI_STATUS_NONE = 0x0000,
- GF_CLI_STATUS_VOL = 0x0100,
- GF_CLI_STATUS_ALL = 0x0200,
- GF_CLI_STATUS_BRICK = 0x0400,
- GF_CLI_STATUS_DETAIL = 0x0800,
- GF_CLI_STATUS_VOL_DETAIL = 0x0900,
- GF_CLI_STATUS_ALL_DETAIL = 0x0A00,
- GF_CLI_STATUS_BRICK_DETAIL = 0x0C00
+ GF_CLI_STATUS_INVAL = -1,
+ GF_CLI_STATUS_NONE = 0x000,
+ GF_CLI_STATUS_MEM = 0x001, /*000000000001*/
+ GF_CLI_STATUS_CLIENTS = 0x002, /*000000000010*/
+ GF_CLI_STATUS_INODE = 0x004, /*000000000100*/
+ GF_CLI_STATUS_FD = 0x008, /*000000001000*/
+ GF_CLI_STATUS_CALLPOOL = 0x010, /*000000010000*/
+ GF_CLI_STATUS_DETAIL = 0x020, /*000000100000*/
+ GF_CLI_STATUS_MASK = 0x0FF, /*000011111111 Used to get the op*/
+ GF_CLI_STATUS_VOL = 0x100, /*000100000000*/
+ GF_CLI_STATUS_ALL = 0x200, /*001000000000*/
+ GF_CLI_STATUS_BRICK = 0x400 /*010000000000*/
};
struct gf_cli_req {