Skip to content

Commit f61a3e3

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 93f8e64 commit f61a3e3

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
@@ -3899,6 +3899,8 @@ char *help_log[] = {
38993899
" record format, where the timestamp is contained in each log entry's header.",
39003900
" ",
39013901
" -T Display the message text with human readable timestamp.",
3902+
" (Be aware that the timestamp could be inaccurate! The timestamp is",
3903+
" from local_clock(), which is different from the elapsed wall time.)",
39023904
" -t Display the message text without the timestamp; only applicable to the",
39033905
" variable-length record format.",
39043906
" -d Display the dictionary of key/value pair properties that are optionally",

0 commit comments

Comments
 (0)