diff options
author | Jan Kara <jack@suse.cz> | 2021-01-13 12:26:43 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-04-19 11:55:04 -0600 |
commit | dc24c67dfbbd11a3221034557548061e7d2c602f (patch) | |
tree | 6d674163736b7b54bc612d92974e2b6ec184e727 | |
parent | 2ec0bb0b725305025dcc3e3f195894040e2dab90 (diff) | |
download | blktrace-dc24c67dfbbd11a3221034557548061e7d2c602f.tar.gz |
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 <jack@suse.cz>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Link: https://lore.kernel.org/r/20210113112643.12893-1-jack@suse.cz
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | blkparse.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -32,6 +32,7 @@ #include <signal.h> #include <locale.h> #include <libgen.h> +#include <time.h> #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); } |