From dc24c67dfbbd11a3221034557548061e7d2c602f Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Wed, 13 Jan 2021 12:26:43 +0100 Subject: [PATCH] blkparse: Print time when trace was started For correlating blktrace data with other information, it is useful to know when the trace has been captured. Since the absolute timestamp is contained in the blktrace file, just output it. Signed-off-by: Jan Kara Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210113112643.12893-1-jack@suse.cz Signed-off-by: Jens Axboe --- blkparse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blkparse.c b/blkparse.c index 33dd023..1d7ae95 100644 --- a/blkparse.c +++ b/blkparse.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "blktrace.h" #include "rbtree.h" @@ -2888,6 +2889,7 @@ static void show_stats(void) if (per_device_and_cpu_stats) show_device_and_cpu_stats(); + fprintf(ofp, "Trace started at %s\n", ctime(&abs_start_time.tv_sec)); fflush(ofp); } -- 2.25.1