From owner-freebsd-questions@FreeBSD.ORG Wed May 27 14:12:36 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB0371065694 for ; Wed, 27 May 2009 14:12:36 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id 497168FC28 for ; Wed, 27 May 2009 14:12:35 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r55.edvax.de (port-92-195-65-8.dynamic.qsc.de [92.195.65.8]) by mx02.qsc.de (Postfix) with ESMTP id 61E4316C1830; Wed, 27 May 2009 16:10:41 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id n4REAYqH034918; Wed, 27 May 2009 16:10:34 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Wed, 27 May 2009 16:10:34 +0200 From: Polytropon To: Andrew Gould Message-Id: <20090527161034.47790ae2.freebsd@edvax.de> In-Reply-To: References: <4A1CB002.9070904@ibctech.ca> <20090527052335.7a71bfc6.freebsd@edvax.de> <4ad871310905262234s35857487xbf631bea45a018e@mail.gmail.com> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Wed, 27 May 2009 20:12:01 +0000 Cc: Glen Barber , Polytropon , Steve Bertrand , utisoft@gmail.com, "freebsd-questions@freebsd.org Questions -" Subject: Re: Another uptime story X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2009 14:12:37 -0000 On Wed, 27 May 2009 09:02:08 -0500, Andrew Gould wrote: > You could write a script that sends uptime output and a start/stop flag to a > database when the system starts and stops. This wouldn't account for > improper shutdowns, although you could tell when a "stop" date/time was > missing. I've used a similar (but more easily designed) approach to have a file /var/log/activity.log. This, of course, doesn't apply for servers that run day by day, but for systems that are powered off when not in use. Simple thing, just a formatted date and uptime into a text file, run by rc.local and rc.shutdown.local. My "best time" with FreeBSD 7 system: 2008-12-14 00:27:42 - 2008-12-20 03:41:44 - 6 days, 3:14, 0 users And FreeBSD 5: 2007-02-23 04:54:07 - 2007-03-06 02:14:46 - 10 days, 21:21, 1 user That's not the majority of entries, most of them are just a few hours. Keep in mind that it is NOT a server - these lines would look terrible if it would. :-) > If you also documented the installation date/time of various components, > you could also track their lives separately. At least their live IN USE. In many cases, it's no problem to use a hard disk or a optical disc drive longer than the period it is utilized in the server - it doesn't break when you switch to a newer system. Erm sorry, I forgot the truth: It will of course break before this point in time; in fact, it will break when you need it most. :-) -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...