util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Cc: util-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH util-linux] dmesg: adjust timestamps according to suspended time
Date: Thu, 4 Jun 2020 11:30:43 +0200	[thread overview]
Message-ID: <20200604093043.55a4zzo2hewhcwru@ws.net.home> (raw)
In-Reply-To: <159103929487.199093.15757669576783156290.stgit@buzz>

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


  reply	other threads:[~2020-06-04  9:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-01 19:21 [PATCH util-linux] dmesg: adjust timestamps according to suspended time Konstantin Khlebnikov
2020-06-04  9:30 ` Karel Zak [this message]
2020-06-04  9:43   ` Konstantin Khlebnikov
2020-06-04 10:21     ` Karel Zak
2020-06-04  9:35 ` Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200604093043.55a4zzo2hewhcwru@ws.net.home \
    --to=kzak@redhat.com \
    --cc=khlebnikov@yandex-team.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).