diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2017-06-02 15:42:39 +0530 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2017-07-06 14:16:26 +0000 |
commit | fc73ae5f81ef5926e3dc2311db116250d0f2a321 (patch) | |
tree | c0ee419d55d11b3f213e8b3a182df689972d22b9 /xlators | |
parent | e9a482f94e748ea12e73ddd2e275bad9aa314b4c (diff) |
debug/io-stats: Append stats for each interval in the same file
... instead of overwriting stats from the previous interval.
This is so that consumers of this feature do not have to be worried
about monitoring when each 'ios-dump-interval' has passed and back up
the resultant stats file well before the next interval has expired.
Change-Id: Ide897237bf4d38e5d759f09911f7d9c817019edf
BUG: 1458197
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: https://review.gluster.org/17452
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/debug/io-stats/src/io-stats.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c index 881cf632bbb..1a0d05ce413 100644 --- a/xlators/debug/io-stats/src/io-stats.c +++ b/xlators/debug/io-stats/src/io-stats.c @@ -3160,7 +3160,7 @@ _ios_dump_thread (xlator_t *this) { * just hold it open and rewind/truncate on each iteration. * Leaving it alone for now. */ - stats_logfp = fopen (stats_filename, "w+"); + stats_logfp = fopen (stats_filename, "a+"); if (stats_logfp) { (void) ios_dump_args_init (&args, conf->dump_format, |