lkml.org 
[lkml]   [2017]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC patch 6/7] printk: Store mono/boot/real time timestamps
On Wed 2017-11-15 19:15:37, Thomas Gleixner wrote:
> To allow reliable timestamp correlation, replace the clock MONOTONIC based
> timestamp in the printk ringbuffer entries with a collection of MONOTONIC,
> BOOTTIME and REALTIME timestamps.
>
> This does not change the textual output, as this is a separate issue. For
> tools which access a vmcore the new timestamp fields are separately
> exported by name so the tools do not have to gain knowledge about struct
> system_timestamps. The existing 'ts_nsec' timestamp, which is used by
> existing tools is mapped to the clock MONOTONIC entry of the timestamp
> collection.

OK, we do this to do not break existing users. But what are
the acceptable ways to make this information available?

IMHO, the right solution is that every reader would need to
explicitely ask for the extended format:

+ /dev/kmsg: ask for extended output via ioctl()

+ syslog: ask for extra timestamps by LOG_*_TIMESTAMP options
of the openlog() syscall. It would be similar
to LOG_PID.

+ console: extend to console= parameter format, e.g.
console=name[,options][/t]

, where /t would cause showing all the timestamps
in the following format

[xxxxx.xxxxxx][b=xxxxx.xxxxxx][r=xxxxx.xxxxxxx] <message>

Would this be acceptable, please?
Do you have other/better ideas, please?

Best Regards,
Petr

\
 
 \ /
  Last update: 2017-11-23 14:37    [W:0.084 / U:6.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site