From: Jan Kara Date: Wed, 13 Jan 2021 11:26:43 +0000 (+0100) Subject: blkparse: Print time when trace was started X-Git-Tag: blktrace-1.3.0~1 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=dc24c67dfbbd11a3221034557548061e7d2c602f;p=blktrace.git 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 --- 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); }