On Tue, Nov 16, 2021 at 10:46 AM <crash-utility-request@xxxxxxxxxx> wrote:
Date: Tue, 16 Nov 2021 02:42:23 +0000
From: HAGIO KAZUHITO(?????) <k-hagio-ab@xxxxxxx>
To: lijiang <lijiang@xxxxxxxxxx>
Cc: "Discussion list for crash utility usage, maintenance and
development" <crash-utility@xxxxxxxxxx>
Subject: [PATCH] log: add warning to help text to
inform the inaccuracy of -T option
Message-ID:
<TYYPR01MB6777010CB098495B9FE1E521DD999@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="iso-2022-jp"
The timestamps of the "log -T" option are inaccurate because they are
from local_clock(), which returns the raw counter in the local CPU and
it's different from the elapsed wall time. (See [1] for details)
The dmesg command, which the "log -T" option imitates, has a similar
behavior in nature and a warning in its help text. Let's add a warning
also to the crash's help text to inform the inaccuracy for now.
[1] https://listman.redhat.com/archives/crash-utility/2021-September/msg00044.html
Reported-by: Martin Moore <martin.moore@xxxxxxx>
Signed-off-by: Kazuhito Hagio <k-hagio-ab@xxxxxxx>
---
Thanks. Applied:
help.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/help.c b/help.c
index c19b69b8b20c..04a7effd0534 100644
--- a/help.c
+++ b/help.c
@@ -3893,6 +3893,8 @@ char *help_log[] = {
" record format, where the timestamp is contained in each log entry's header.",
" ",
" -T Display the message text with human readable timestamp.",
+" (Be aware that the timestamp could be inaccurate! The timestamp is",
+" from local_clock(), which is different from the elapsed wall time.)",
" -t Display the message text without the timestamp; only applicable to the",
" variable-length record format.",
" -d Display the dictionary of key/value pair properties that are optionally",
--
2.27.0
-- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/crash-utility