From: Jan Kara <jack@suse.cz>
To: Jens Axboe <axboe@kernel.dk>
Cc: <linux-block@vger.kernel.org>, Jan Kara <jack@suse.cz>
Subject: [PATCH] blkparse: Print time when trace was started
Date: Wed, 13 Jan 2021 12:26:43 +0100 [thread overview]
Message-ID: <20210113112643.12893-1-jack@suse.cz> (raw)
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>
---
blkparse.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/blkparse.c b/blkparse.c
index 911309e26a15..dc518632ebf5 100644
--- a/blkparse.c
+++ b/blkparse.c
@@ -31,6 +31,7 @@
#include <signal.h>
#include <locale.h>
#include <libgen.h>
+#include <time.h>
#include "blktrace.h"
#include "rbtree.h"
@@ -2797,6 +2798,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.26.2
next reply other threads:[~2021-01-13 11:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-13 11:26 Jan Kara [this message]
2021-01-14 0:41 ` [PATCH] blkparse: Print time when trace was started Chaitanya Kulkarni
2021-04-19 8:06 ` Jan Kara
2021-04-19 17:55 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210113112643.12893-1-jack@suse.cz \
--to=jack@suse.cz \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.