Re: /proc or ps tools bug? 2.6.3, time is off

From: Petri Kaukasoina (kaukasoi_at_elektroni.ee.tut.fi)
Date: 02/25/04

  • Next message: Len Brown: "[BKPATCH] ACPI for 2.6"
    Date:	Wed, 25 Feb 2004 11:14:25 +0200
    To: linux-kernel mailing list <linux-kernel@vger.kernel.org>
    
    

    On Tue, Feb 24, 2004 at 08:58:39PM -0500, David Ford wrote:
    > Kernel 2.6.3, procps 3.2.0
    >
    > Note the change in the timestamp as reported by 'ps' v.s. the time
    > reported by 'date'.
    >

    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@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Len Brown: "[BKPATCH] ACPI for 2.6"

    Relevant Pages

    • Re: [PATCH] Re: boot time, process start time, and NOW time
      ... I may be starting to lean in Tim's direction of pulling the ... >clock_monotonic based uptime and going back to the jiffies based uptime. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] Re: boot time, process start time, and NOW time
      ... > As I recall the problem was that jiffies since boot was being converted to get ... > The alternate answer is, of course, to directly convert the elapsed jiffies. ... clock_monotonic based uptime and going back to the jiffies based uptime. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: boot time, process start time, and NOW time
      ... while the latter is computed from "jiffies" and thus uncorrected. ... "uptime" is needed for that. ... No, that's not needed anymore. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Uptime counter
      ... > jiffies to 64 bit. ... And I promise to release 2.0.41 before you've had 497 days of uptime ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
      (Linux-Kernel)
    • Re: Spinlock performance on Athlon MP (2.4)
      ... It's not the same extra power connector ... Here is my uptime: ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)