lkml.org 
[lkml]   [2020]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH util-linux] dmesg: adjust timestamps according to suspended time
On Mon, Jun 01, 2020 at 10:21:34PM +0300, Konstantin Khlebnikov wrote:
> Timestamps in kernel log comes from monotonic clocksource which does not
> tick when system suspended. Suspended time easily sums into hours and days
> rendering human readable timestamps in dmesg useless.
>
> Adjusting timestamps accouring to current delta between boottime and
> monotonic clocksources produces accurate timestamps for messages printed
> since last resume. Which are supposed to be most interesting.

It's definitely better than the current broken timestamps, but the real
and final solution is to have exact information about system suspends.

It would be enough to maintain in kernel memory a simple log with
<bootime> <monotonic> <state_change>
and export this info by /proc/suspendlog, after that we can all
re-count /dev/kmsg timestamps to something useful.

Karel


--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com

\
 
 \ /
  Last update: 2020-06-04 11:31    [W:0.043 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site