Skip to content

Commit 6bc1040

Browse files
k-hagiolian-bo
authored andcommitted
log: add warning to help text to inform the inaccuracy of -T option
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. 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. Link: https://listman.redhat.com/archives/crash-utility/2021-September/msg00044.html Reported-by: Martin Moore <[email protected]> Signed-off-by: Kazuhito Hagio <[email protected]>
1 parent b0dd73d commit 6bc1040

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

help.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3893,6 +3893,8 @@ char *help_log[] = {
38933893
" record format, where the timestamp is contained in each log entry's header.",
38943894
" ",
38953895
" -T Display the message text with human readable timestamp.",
3896+
" (Be aware that the timestamp could be inaccurate! The timestamp is",
3897+
" from local_clock(), which is different from the elapsed wall time.)",
38963898
" -t Display the message text without the timestamp; only applicable to the",
38973899
" variable-length record format.",
38983900
" -d Display the dictionary of key/value pair properties that are optionally",

0 commit comments

Comments
 (0)