Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1193906ybg; Thu, 4 Jun 2020 03:36:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylauQqoZRnaC/pM1kAAoXlLnRomwuh/ZpsFFNbna4pMJqlKK65EHynsOp+ZwqrzW5ZEDWa X-Received: by 2002:a17:906:28da:: with SMTP id p26mr3109121ejd.551.1591266993627; Thu, 04 Jun 2020 03:36:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591266993; cv=none; d=google.com; s=arc-20160816; b=ry2xF86ZoRnpHLhY0PNRIbuxKkI1qpWZ2qe7xxL3hsr1alj/5XZKlg/f/OuVGlfYqn P/Hy18ukliC2F3H6iXlE8HzMgddWIihaDhZlC9ix39gvIrhWiutkdnCKEHAqD8xdEQeB 58d0XcDMxF/NeYz2sown0KAG2uIK7doJXxNrZ8Q+xLzML2wsA+2JtE1ALk8XPPllPwY5 /9DMUbwKgL/2T9oCi3xeZ/L2V7NQpyz6eFK3iXH7SumpcNUDKs7ql2Mh8ck0mkxRadwb OxTm1g5mlcOTTgKNFZ+hBCxJZ9bPL1yn1A54FWn9clQrSbxjLRAzQwBpg4yrmVsfyGR+ NwkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=tEOyrDNzn9GsFRagpvF8PaQVVmk8F1cvA3IrUtwyZ2c=; b=h2OHO3VTKLXvCTtwYs/zFW7A5Ve0I581rNmaCL02CMBwgNk0ccp1byx6r2tn+83gUF v/BA2hMhvHLUh5/ko6tXkAgxGd8P04oUibrZG9EiUCB8Qc7X5AR/xToVEwQl0UYTo3RE Fk5rqSX8mU9083KnJRnm0Egv4NXWDfcHj2CmvZpb+Vpk25YRixupsRVNY2yZtxKCpQ2b KV9LSp6rJDdC7XlJon5R6cNk5hvv3WumInuW9R469Pv5Jnz/vDyBmPg5uAXOZHrO7YNy 3pEFX8q1Drzrx195cQ1j6G8lWq7Hc15jv20DgGWl4/ww5q/TyMoUO/CKFeRXbgEN+2Rn 8ihw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YMbyrQrP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h15si1400935ejc.125.2020.06.04.03.36.10; Thu, 04 Jun 2020 03:36:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YMbyrQrP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726994AbgFDJay (ORCPT + 99 others); Thu, 4 Jun 2020 05:30:54 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:38395 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726444AbgFDJax (ORCPT ); Thu, 4 Jun 2020 05:30:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591263052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tEOyrDNzn9GsFRagpvF8PaQVVmk8F1cvA3IrUtwyZ2c=; b=YMbyrQrPFbwWv1VwCO2wtUSM+RrC1Yy94UprudtjFAw7xmCA/SsNJQ4/9zppbOtN/blHvJ 5/QmMSGhkxi9HBLjW8HvFgCXBDAI6tdeoczp1rbUbZ1KmTX5LftCpU/uBvV9kWfXDaIRuf REqGmFteRCkb4+KMQxL3wlWmmkADbZU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-108-j5rBytRaMcqTxTzbc4_e1g-1; Thu, 04 Jun 2020 05:30:48 -0400 X-MC-Unique: j5rBytRaMcqTxTzbc4_e1g-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 32FF8107ACCD; Thu, 4 Jun 2020 09:30:47 +0000 (UTC) Received: from ws.net.home (unknown [10.40.194.133]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 488B45C297; Thu, 4 Jun 2020 09:30:45 +0000 (UTC) Date: Thu, 4 Jun 2020 11:30:43 +0200 From: Karel Zak To: Konstantin Khlebnikov Cc: util-linux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH util-linux] dmesg: adjust timestamps according to suspended time Message-ID: <20200604093043.55a4zzo2hewhcwru@ws.net.home> References: <159103929487.199093.15757669576783156290.stgit@buzz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <159103929487.199093.15757669576783156290.stgit@buzz> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 and export this info by /proc/suspendlog, after that we can all re-count /dev/kmsg timestamps to something useful. Karel -- Karel Zak http://karelzak.blogspot.com