lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 01 Jan 2014 15:21:00 -0600
From:	Rob Landley <rob@...dley.net>
To:	Martin Schwidefsky <schwidefsky@...ibm.com>
CC:	Oleg Nesterov <oleg@...hat.com>, mtk.manpages@...il.com,
	linux-kernel@...r.kernel.org,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: Question about /proc/uptime

On 01/01/14 06:41, Martin Schwidefsky wrote:
> On Tue, 31 Dec 2013 22:17:39 -0600
> Rob Landley <rob@...dley.net> wrote:
>
>> On 12/30/13 09:26, Martin Schwidefsky wrote:
>>> On Mon, 30 Dec 2013 16:11:10 +0100
>>> Oleg Nesterov <oleg@...hat.com> wrote:
>>>> Not sure I understand... except that timekeeping_resume() does
>>>> __timekeeping_inject_sleeptime().
>>>
>>> Hmm, you are right. The sleeptime is added to the monotonic boottime.
>>> So the first value of /proc/uptime is the wall-time since boot.
>>> And the second value is combined idle time over all cpus.
>>
>> Is there an obvious way to query the non-suspend uptime from userspace?
>
> clock_gettime with CLOCK_MONOTONIC gives you the uptime minus without the
> suspend time.

Given that the clock_gettime man page says:

   CLOCK_MONOTONIC
     Clock that cannot be set and  represents  monotonic  time  since
     some unspecified starting point.

Can I rely on it _continuing_ to do so in future, and if so should the 
man page be clarified?

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ