Skip to content

Commit

Permalink
debug/io-stats: Append stats for each interval in the same file
Browse files Browse the repository at this point in the history
... 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>
  • Loading branch information
KritikaDhananjay authored and ShyamsundarR committed Jul 6, 2017
1 parent e9a482f commit fc73ae5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xlators/debug/io-stats/src/io-stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit fc73ae5

Please sign in to comment.