Re: /proc or ps tools bug? 2.6.3, time is off
From: David Ford
Date: Wed Feb 25 2004 - 16:47:34 EST
powerix root # grep cpu /proc/stat; cat /proc/uptime
cpu 403880 466666 580559 15017904 475868 10864 3030
cpu0 403880 466666 580559 15017904 475868 10864 3030
186882.63 154999.74
(gdb) p 403880 +466666 +580559 +15017904 +475868 +10864 +3030
$1 = 16958771
(gdb) p 16958771/186882.63
$2 = 90.745571164104447
Hmm, not quite 100.0
david
Petri Kaukasoina wrote:
Hi,
I reported the same problem some time ago. Could you type
grep cpu /proc/stat; cat /proc/uptime
for example, I get
cpu 140708 1489 43735 21209021 292168 4879 4192
cpu0 140708 1489 43735 21209021 292168 4879 4192
216925.15 215037.34
Then add jiffies and divide by uptime:
(140708+1489+43735+21209021+292168+4879+4192)/216925.15 = 100.01695
which is not 100 here as it should be. (On kernel 2.2.* I have it exactly
100). ps uses Hertz=100 but it should be 170 ppm larger which makes an error
of about 15 seconds a day. (Running without ntpd doesn't fix it.)
-
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/