mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Petri Kaukasoina <kaukasoi@elektroni.ee.tut.fi>
To: linux-kernel@vger.kernel.org
Subject: Re: 2.6.1: process start times by procps
Date: Tue, 27 Jan 2004 19:31:02 +0200	[thread overview]
Message-ID: <20040127173102.GA15052@elektroni.ee.tut.fi> (raw)
In-Reply-To: <20040127155254.GA1656@elektroni.ee.tut.fi>

On Tue, Jan 27, 2004 at 05:52:54PM +0200, Petri Kaukasoina wrote:
> 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.)

Yes, btime stays now constant. But to make ps work right, I replaced all uses of
variable Hertz in ps source (procps 2.0.18) with constant 100.0172.

After uptime 4 h 42 min, the error is already 3 seconds in the default ps,
and ./ps which is the "fixed" one, displays the right start time.

Tue Jan 27 19:17:57 EET 2004
kaukasoi 13388  0.0  0.1  2652  740 pts/5    R    19:17   0:00 ps uxw
kaukasoi 13392  0.0  0.1  2636  724 pts/5    R    19:17   0:00 ./ps uxw
Tue Jan 27 19:17:57 EET 2004
kaukasoi 13398  0.0  0.1  2652  740 pts/5    R    19:18   0:00 ps uxw
kaukasoi 13402  0.0  0.1  2636  724 pts/5    R    19:17   0:00 ./ps uxw
Tue Jan 27 19:17:57 EET 2004
...
Tue Jan 27 19:17:59 EET 2004
kaukasoi 13979  0.0  0.1  2652  740 pts/5    R    19:18   0:00 ps uxw
kaukasoi 13983  0.0  0.1  2636  724 pts/5    R    19:18   0:00 ./ps uxw
Tue Jan 27 19:18:00 EET 2004

So the problem is the inaccuracy of HZ.

  reply	other threads:[~2004-01-27 17:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-23 19:47 Petri Kaukasoina
2004-01-25 11:08 ` Petri Kaukasoina
2004-01-27 15:52   ` Petri Kaukasoina
2004-01-27 17:31     ` Petri Kaukasoina [this message]
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

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=20040127173102.GA15052@elektroni.ee.tut.fi \
    --to=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

all inboxes | Powered by JetHome®