summaryrefslogtreecommitdiffstats
path: root/xlators/debug/io-stats
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-10-01 08:01:14 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-10-01 09:33:50 -0700
commit24ec0fbc4bd145b93b80afa480d5cb4cf785717e (patch)
tree2122d11aab686dae4d439aecd0e543be33c11feb /xlators/debug/io-stats
parenta3f90eeb0ad97e4f86aef603f95b0562ab18f36d (diff)
stat enhancements
* dht to send 'setxattr' to all subvolumes in the layout * server dumps info on total bytes read/written for 'trusted.io.stat.dump' key * server dumps all the mount point IP for 'trusted.list.mount.point' key. * io-stats dumps latency information only if measured Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1701 (better statistics gathering in glusterd) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1701
Diffstat (limited to 'xlators/debug/io-stats')
-rw-r--r--xlators/debug/io-stats/src/io-stats.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c
index 4a96ca3c240..2d56ecf6a0f 100644
--- a/xlators/debug/io-stats/src/io-stats.c
+++ b/xlators/debug/io-stats/src/io-stats.c
@@ -243,14 +243,17 @@ io_stats_dump_global (xlator_t *this, struct ios_global_stats *stats,
(1 << i), stats->block_count_write[i]);
}
- for (i = 0; i < GF_FOP_MAXVALUE; i++)
- if (stats->fop_hits[i])
+ for (i = 0; i < GF_FOP_MAXVALUE; i++) {
+ if (stats->fop_hits[i] && !stats->latency[i].avg)
+ ios_log (this, logfp, "%14s : %"PRId64,
+ gf_fop_list[i], stats->fop_hits[i]);
+ else if (stats->fop_hits[i] && stats->latency[i].avg)
ios_log (this, logfp, "%14s : %"PRId64 ", latency"
"(avg: %f, min: %f, max: %f)",
gf_fop_list[i], stats->fop_hits[i],
stats->latency[i].avg, stats->latency[i].min,
stats->latency[i].max);
-
+ }
return 0;
}