Re: 2.6.1: process start times by procps

From: Petri Kaukasoina
Date: Tue Jan 27 2004 - 12:32:20 EST


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