[K12OSN] uptime bug?

Henry Hartley henryhartley at westat.com
Thu Nov 18 14:16:44 UTC 2004


>> > --- On Wed 11/17, Les Mikesell < les at futuresource.com > wrote:
>> > From: Les Mikesell [mailto: les at futuresource.com]
>> > Date: Wed, 17 Nov 2004 17:00:05 -0600
>> > 
>> > Seems to be a bug in 'uptime' - or I guess 32 bits worth of
>> > jiffies<br>rolls back to 0 at 497 days.  I was trying to
>> > figure out how one of my<br>main boxes could have rebooted
>> > without anyone noticing and it turns<br>out it didn't.
>> > 
>> -----Original Message-----
>> From: Rob Owens
>> Sent: Thursday, November 18, 2004 6:31 AM
>> 
>> I read in an article somewhere that this is normal behavior (not
>> that I think it's good behavior).  I can't remember the article,
>> but it was comparing the uptime of servers running Linux, BSD,
>> Windows, etc.  

This is also why Linux doesn't show up in Netcraft's "Longest Uptimes" list
(http://uptime.netcraft.com/up/today/top.avg.html).  In fact, they even
stopped trying with the 2.6 kernel.  Here's why:

http://uptime.netcraft.com/up/accuracy.html#cycle

Why do some Operating Systems never show uptimes above 497 days ?

The method that Netcraft uses to determine the uptime of a server is bounded
by an upper limit of 497 days for some Operating Systems (see above). It is
therefore not possible to see uptimes for these systems that go beyond this
upper limit. Although we could in theory attempt to compute the true uptime
for OS's with this upper limit by monitoring for restarts at the expected
time, we prefer not to do this as it can be inaccurate and error prone.

Why do you not report uptimes for Linux 2.6 or Linux alpha/ia64 ?

The Linux kernel switched to a higher internal timer rate at kernel version
2.5.26. Linux 2.4 used a rate of 100Hz. Linux 2.6 uses a timer at 1000Hz.
(An explanation of the HZ setting in Linux.)

The above applies to Linux on 32-bit Intel-compatible systems (which is the
most common case). Linux on other platforms uses different timer rates: the
Alpha and Intel ia-64 ports already used 1000Hz, while the ports for sparc,
m68k and other less common processors continue to use 100Hz.

The Linux TCP code only uses the low 32 bits of the timer. Due to the faster
rate of the timer, the value wraps around every 49.7 days (whereas it used
to wrap after 497 days). Because there are large numbers of Linux systems
which have a higher uptime than this, it is no longer possible to report
accurate uptimes for these systems.

-- 
Henry




More information about the K12OSN mailing list