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]
Message-ID: <20131230162617.1b013251@mschwide>
Date:	Mon, 30 Dec 2013 16:26:17 +0100
From:	Martin Schwidefsky <schwidefsky@...ibm.com>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Rob Landley <rob@...dley.net>, linux-kernel@...r.kernel.org,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: Question about /proc/uptime

On Mon, 30 Dec 2013 16:11:10 +0100
Oleg Nesterov <oleg@...hat.com> wrote:

> On 12/30, Martin Schwidefsky wrote:
> <
> > On Fri, 27 Dec 2013 15:45:04 +0100
> > Oleg Nesterov <oleg@...hat.com> wrote:
> >
> > > Add Frederic, I am not sure I understand this correctly.
> > >
> > > On 12/25, Rob Landley wrote:
> > > >
> > > > There are two values here, the first is seconds since boot time (which
> > > > is just elapsed time; at one point it was ajusted for suspend and that
> > > > was revered as confusing).
> > >
> > > Hmm, uptime_proc_show() still uses get_monotonic_boottime(), this should
> > > include suspend time?
> >
> > The first value of /proc/uptime is the amount of time the system has been
> > running, the sum of the suspend time is not included.
> 
> Hmm. It uses get_monotonic_boottime() and this helper adds
> timekeeper->total_sleep_time to the returned value? Even the comment says
> 
> 	* This is similar to CLOCK_MONTONIC/ktime_get_ts, but also
> 	* includes the time spent in suspend.
> 
> > timekeeping_resume()
> > is supposed to take care of that.
> 
> 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.

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

--
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