Re: Question about /proc/uptime

From: Rob Landley
Date: Tue Dec 31 2013 - 23:17:52 EST


On 12/30/13 09:26, Martin Schwidefsky wrote:
On Mon, 30 Dec 2013 16:11:10 +0100
Oleg Nesterov <oleg@xxxxxxxxxx> 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?

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