Re: 2.6.1: process start times by procps

From: Petri Kaukasoina
Date: Sun Jan 25 2004 - 06:09:58 EST


On Fri, Jan 23, 2004 at 09:47:14PM +0200, I wrote:
> I'm very sorry if this is already reported. In 2.6.1 (and earlier) ps does
> not report the process start times correctly.
...
> 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. procps uses that to
calculate the start time of a process.

date +%s ; cat /proc/uptime ; grep btime /proc/stat
1075028140
1393207.63 1379643.46
btime 1073634689

Time now (1075028140) minus uptime (1393207.63) is 1073634932 (the correct
bootup time). btime differs from that by 243 seconds, so that's the error of
four minutes in ps output. Just to check, a line from syslog:

Jan 9 09:55:41 elektroni kernel: Linux version 2.6.1 (kaukasoi@elektroni) (gcc version 2.95.3 20010315 (release)) #1 Fri Jan 9 09:54:37 EET 2004

and from that

date +%s --date='Jan 9 09:55:41'
1073634941

ok, syslogd seems to have started 9 seconds after bootup.

This is athlon tb 1400 and I run ntpd.
-
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/