From: Bill Davidsen <davidsen@tmr.com>
To: john stultz <johnstul@us.ibm.com>
Cc: Petri Kaukasoina <kaukasoi@elektroni.ee.tut.fi>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.1: process start times by procps
Date: Sun, 01 Feb 2004 15:18:59 -0500 [thread overview]
Message-ID: <401D5F33.60400@tmr.com> (raw)
In-Reply-To: <1075342912.1592.72.camel@cog.beaverton.ibm.com>
john stultz wrote:
> On Tue, 2004-01-27 at 07:52, Petri Kaukasoina wrote:
>
>>On Sun, Jan 25, 2004 at 01:08:47PM +0200, I wrote:
>>
>>>On Fri, Jan 23, 2004 at 09:47:14PM +0200, I wrote:
>>>
>>>>For example, I started this bash process really at 21:24 (date showed 21:24
>>>>then):
>>>>
>>>>kaukasoi 22108 0.0 0.2 4452 1532 pts/4 R 21:28 0:00 /bin/bash
>>>
>>>OK, I would like to make my bug report more accurate: the problem seems to
>>>be that the value of btime in /proc/stat is not correct.
>>
>>btime in /proc/stat does not stay constant but decreases at a rate of 15
>>secs/day. (So I thought that that's why there is that four minute error in
>>ps output after uptime of a couple of weeks.) Maybe this has something to do
>>with the fact that the 'timer' line in /proc/interrupts does not seem to
>>increase at an exact rate of 1000 steps per second but about 1000.18 steps
>>per second, instead. (The relative error is the same: 0.18 divided by 1000
>>is equal to 15 seconds divided by 24 hours).
>>
>>I made an experiment shown below. I know nothing about kernel programming,
>>so this is probably not correct, but at least btime seemed to stay constant.
>>(I don't believe this fixes procps, though. If HZ if off by 180 ppm then I
>>guess ps can't possibly get its calculations involving HZ right. But at
>>least the bootup time reported by procinfo stays constant.)
>
>
>
> Uh, what does your /etc/ntp/drift file show?
>
> The basic equation is:
> btime ~= gettimeodfay() - uptime
>
> Thus if your time of day is adjusted by NTP, btime will change as well.
> Uptime is calculated calculated by jiffies/HZ, and HZ is not NTP
> adjusted, so if your system is running 180ppm too fast or slow, btime
> would be expected to change.
It would seem that there is a problem having the system know which two
times to believe. Given that I set time from a good source in rc.local,
it would be nice to have the system know that the correct and unchanging
btime is NOW-uptime. And to make that assumption it would have to be
told in some way that the btime should be calculated and treated as
unchanging. On other systems a standard may never be used, or the
standard mey be the local cable guide (most have a time).
A good thing to consider if you care, I guess right after setting to a
trusted clock I might want to save the btime somewhere.
--
bill davidsen <davidsen@tmr.com>
CTO TMR Associates, Inc
Doing interesting things with small computers since 1979
prev parent reply other threads:[~2004-02-01 20:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-23 19:47 2.6.1: process start times by procps Petri Kaukasoina
2004-01-25 11:08 ` Petri Kaukasoina
2004-01-27 15:52 ` Petri Kaukasoina
2004-01-27 17:31 ` Petri Kaukasoina
2004-01-29 2:21 ` john stultz
2004-01-29 14:38 ` Petri Kaukasoina
2004-01-29 19:48 ` john stultz
2004-01-29 20:33 ` Petri Kaukasoina
2004-01-29 22:51 ` Andrew Morton
2004-01-30 12:42 ` Petri Kaukasoina
2004-01-29 20:13 ` Petri Kaukasoina
2004-02-01 20:18 ` Bill Davidsen [this message]
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=401D5F33.60400@tmr.com \
--to=davidsen@tmr.com \
--cc=johnstul@us.ibm.com \
--cc=kaukasoi@elektroni.ee.tut.fi \
--cc=linux-kernel@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