From bc4f737210bc0971d031cf9b3ff8fe941482eabc Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Tue, 14 Sep 2010 03:54:39 +0000 Subject: socket: add xfer data counts * keeping track of data transfered over wire helps to identify the protocol overhead, and also can help us in debugging more on server loads Signed-off-by: Amar Tumballi Signed-off-by: Vijay Bellur BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971 --- xlators/protocol/client/src/client.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'xlators/protocol/client/src') diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index c1a56722f72..03e0ec44266 100644 --- a/xlators/protocol/client/src/client.c +++ b/xlators/protocol/client/src/client.c @@ -1868,6 +1868,14 @@ client_priv_dump (xlator_t *this) gf_proc_dump_build_key(key, key_prefix, "last_received"); gf_proc_dump_write(key, "%s", ctime(&conf->last_received.tv_sec)); + gf_proc_dump_build_key(key, key_prefix, "total_bytes_read"); + gf_proc_dump_write(key, "%"PRIu64, + conf->rpc->conn.trans->total_bytes_read); + + gf_proc_dump_build_key(key, key_prefix, "total_bytes_written"); + gf_proc_dump_write(key, "%"PRIu64, + conf->rpc->conn.trans->total_bytes_write); + pthread_mutex_unlock(&conf->lock); return 0; -- cgit