Maximum uptime 497 days?
Oliver Fromme
olli at lurza.secnetix.de
Mon Jun 28 07:03:40 PDT 2004
Rob <stopspam at users.sourceforge.net> wrote:
> By accident I happen to come across this remarkable limit of
> uptime registration for FreeBSD systems. After 497 days, the
> timer jumps to zero again.
>
> 497 days is less than a 1.5 years !
I'd be very embarrassed to have machines with that a high
uptime -- It means that they haven't been updated for that
a long time and are probably full of security holes. ;-)
> Has this been fixed in newer versions of FreeBSD (stable and/or
> current) ? Or is there a hardware limitation (CPU?) that does
> not allow this?
I'm pretty certain I have seen FreeBSD machines with more
that 497 days of uptime. The boot time is stored as a
struct timeval in sysctl kern.boottime, which is enough for
several decades.
Which program did you use to display the uptime? It's pro-
bably a bug in that program, not in freeBSD.
I guess that that program calculates the uptime with 1/100s
precision and stores it in a 32bit int. That would explain
the 497 days limit: 2^32 / 24 / 60 / 60 / 100 == 497.1.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.
"If you think C++ is not overly complicated, just what is a protected
abstract virtual base pure virtual private destructor, and when was the
last time you needed one?"
-- Tom Cargil, C++ Journal
More information about the freebsd-stable
mailing list