From owner-freebsd-stable@FreeBSD.ORG Mon Jun 28 14:03:40 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BD05D16A4CE for ; Mon, 28 Jun 2004 14:03:40 +0000 (GMT) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 021CC43D39 for ; Mon, 28 Jun 2004 14:03:40 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (ybkven@localhost [127.0.0.1]) by lurza.secnetix.de (8.12.11/8.12.11) with ESMTP id i5SE3SdM089872 for ; Mon, 28 Jun 2004 16:03:30 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.12.11/8.12.11/Submit) id i5SE3SwS089871; Mon, 28 Jun 2004 16:03:28 +0200 (CEST) (envelope-from olli) Date: Mon, 28 Jun 2004 16:03:28 +0200 (CEST) Message-Id: <200406281403.i5SE3SwS089871@lurza.secnetix.de> From: Oliver Fromme To: freebsd-stable@FreeBSD.ORG In-Reply-To: X-Newsgroups: list.freebsd-stable User-Agent: tin/1.5.4-20000523 ("1959") (UNIX) (FreeBSD/4.10-RELEASE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: Maximum uptime 497 days? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-stable@FreeBSD.ORG List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2004 14:03:40 -0000 Rob 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