From fc73ae5f81ef5926e3dc2311db116250d0f2a321 Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Fri, 2 Jun 2017 15:42:39 +0530 Subject: 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 Reviewed-on: https://review.gluster.org/17452 NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Smoke: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Shyamsundar Ranganathan --- xlators/debug/io-stats/src/io-stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators') 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, -- cgit