Re: unstable? nah. :-)
to, 2006-06-08 kello 12:20 -0700, Tyler MacDonald kirjoitti:
> Sebastian Harl <email@example.com> wrote:
> > > http://www.crackerjack.net/adserton3.png
> > On that picture it says the box is up for 378 days. How does that go with
> > 875 days idle time?
> Due to a bug with "w", or the kernel, or whatever, which nobody seems to
> want to fix, the system uptime wraps around to 0 days after 400-and-someodd
> days. That's why I circled the login/idle time on the screenshot. :-)
If I've understood correctly, uptime in the kernel is counted by an
unsigned integer that is 32 bits on most platforms (64 bits on the 64
bits ones, I assume). It counts "jiffies", which typically happen 100
times a second. 32^2 jiffies divided by (100 times/second * 24 * 60 * 60
seconds) is about 497 days.
875 - 378 = 497.
Fixing this would require having every increment of the jiffies counter
to check for overflow, and using two counters. This is unnecessary
overhead (a very small overhead, granted, but still), for a very small
I am a werehuman.