diff options
author | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2011-07-20 12:35:14 +0530 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-07-20 06:15:23 -0700 |
commit | c6053cac7794dfd9bf693e91cd76c2a45d7859eb (patch) | |
tree | 3d5a383221a908c5ce2db53caf0c05fdb6d2e1dc /cli/src | |
parent | a7e38564ec859afc15274a0d9a16d6e04ed3f6e2 (diff) |
debug/io-stats: print the time at which maximum fds were open in gluster top
Change-Id: I257bc29945d5acf8fb316f396fb011a2ab652d7a
BUG: 3076
Reviewed-on: http://review.gluster.com/54
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shishir Gowda <shishirng@gluster.com>
Diffstat (limited to 'cli/src')
-rw-r--r-- | cli/src/cli-rpc-ops.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index 26e78dca1..50a2631a2 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -3298,6 +3298,7 @@ gf_cli3_1_top_volume_cbk (struct rpc_req *req, struct iovec *iov, long int time_usec = 0; struct tm *tm = NULL; char timestr[256] = {0, }; + char *openfd_str = NULL; if (-1 == req->rpc_status) { goto out; @@ -3372,8 +3373,13 @@ gf_cli3_1_top_volume_cbk (struct rpc_req *req, struct iovec *iov, ret = dict_get_uint64 (dict, key, &max_nr_open); if (ret) goto out; + snprintf (key, sizeof (key), "%d-max-openfd-time", i); + ret = dict_get_str (dict, key, &openfd_str); + if (ret) + goto out; cli_out ("Current open fds: %"PRIu64", Max open" - " fds: %"PRIu64, nr_open, max_nr_open); + " fds: %"PRIu64", Max openfd time: %s", nr_open, + max_nr_open, openfd_str); case GF_CLI_TOP_READ: case GF_CLI_TOP_WRITE: case GF_CLI_TOP_OPENDIR: |