diff options
author | Krishnan Parthasarathi <kparthas@redhat.com> | 2014-07-17 12:06:58 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-08-19 23:53:23 -0700 |
commit | 22d5361cec8ec2a101e0896a9642a995122ffad3 (patch) | |
tree | f34c38c0d0356579d328a390a920a091a46bef0f /xlators/protocol/client/src/client.c | |
parent | c42339ef09325735138cd59d64636aa61130ad6c (diff) |
client: Add ping-timeout to statedump
The ping timeout value of a client xlator can be seen by,
># cat $META/graphs/active/vol-client-0/private |grep ping_timeout
ping_timeout = 42
where $META is /<fuse-mountpt>/.meta
Change-Id: I4f68f184fc3f30871269a23fc4a82a1378396058
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/8321
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/protocol/client/src/client.c')
-rw-r--r-- | xlators/protocol/client/src/client.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index a0096981f54..546b8b8f376 100644 --- a/xlators/protocol/client/src/client.c +++ b/xlators/protocol/client/src/client.c @@ -2724,12 +2724,13 @@ client_fd_lk_ctx_dump (xlator_t *this, fd_lk_ctx_t *lk_ctx, int nth_fd) int client_priv_dump (xlator_t *this) { - clnt_conf_t *conf = NULL; - int ret = -1; - clnt_fd_ctx_t *tmp = NULL; - int i = 0; - char key[GF_DUMP_MAX_BUF_LEN]; - char key_prefix[GF_DUMP_MAX_BUF_LEN]; + clnt_conf_t *conf = NULL; + int ret = -1; + clnt_fd_ctx_t *tmp = NULL; + int i = 0; + char key[GF_DUMP_MAX_BUF_LEN]; + char key_prefix[GF_DUMP_MAX_BUF_LEN]; + rpc_clnt_connection_t *conn = NULL; if (!this) return -1; @@ -2759,15 +2760,17 @@ client_priv_dump (xlator_t *this) gf_proc_dump_write ("connected", "%d", conf->connected); if (conf->rpc) { + conn = &conf->rpc->conn; gf_proc_dump_write("total_bytes_read", "%"PRIu64, - conf->rpc->conn.trans->total_bytes_read); - + conn->trans->total_bytes_read); + gf_proc_dump_write("ping_timeout", "%"PRIu32, + conn->ping_timeout); gf_proc_dump_write("total_bytes_written", "%"PRIu64, - conf->rpc->conn.trans->total_bytes_write); + conn->trans->total_bytes_write); gf_proc_dump_write("ping_msgs_sent", "%"PRIu64, - conf->rpc->conn.pingcnt); + conn->pingcnt); gf_proc_dump_write("msgs_sent", "%"PRIu64, - conf->rpc->conn.msgcnt); + conn->msgcnt); } pthread_mutex_unlock(&conf->lock); |