From owner-freebsd-questions@FreeBSD.ORG Wed May 27 14:02:15 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 349E410656AD for ; Wed, 27 May 2009 14:02:15 +0000 (UTC) (envelope-from andrewlylegould@gmail.com) Received: from mail-fx0-f159.google.com (mail-fx0-f159.google.com [209.85.220.159]) by mx1.freebsd.org (Postfix) with ESMTP id A75A18FC15 for ; Wed, 27 May 2009 14:02:09 +0000 (UTC) (envelope-from andrewlylegould@gmail.com) Received: by fxm3 with SMTP id 3so3723fxm.43 for ; Wed, 27 May 2009 07:02:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=hLwwVTWrIofh1+WeprsF7kDICFcip4lzP0+gLckv7OY=; b=f7o/DljS2sl7yY+augXYUXJXzxfMB43jxFRTNUGA5jA5oPFSNFfwKqNeVvJ0ZqE2yC Uel1IiGjKNnEO3YSXePMgGQhEnBGfztorhJAJhoOwnPnnvKVZVssvabeBezjp4cR77oX aTmUEfDCHlxvNDEWXdcCDidhkkPzTw0hoEqJU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=sjhpc1Aad83Es3y669s7MrCQmAIo9kNZxpkbvW1fxN32czt9sE9re72Ut36c9z/rMA 4UCo/MB8ZHRWXzQWQc/PsXdwJb35ASO8CAqyHw4ngFgx0TWuVf7BsJOkry0uHFQNecwv j4lpYEBdBzA1mM+p+7MsecPey/JnW7xHZXJ2M= MIME-Version: 1.0 Received: by 10.103.174.18 with SMTP id b18mr5091736mup.132.1243432928456; Wed, 27 May 2009 07:02:08 -0700 (PDT) In-Reply-To: References: <4A1CB002.9070904@ibctech.ca> <20090527052335.7a71bfc6.freebsd@edvax.de> <4ad871310905262234s35857487xbf631bea45a018e@mail.gmail.com> Date: Wed, 27 May 2009 09:02:08 -0500 Message-ID: From: Andrew Gould To: utisoft@gmail.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Polytropon , Glen Barber , Steve Bertrand , "freebsd-questions@freebsd.org Questions -" Subject: Re: Another uptime story X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2009 14:02:15 -0000 On Wed, May 27, 2009 at 8:45 AM, Chris Rees wrote: > 2009/5/27 Glen Barber : > > On Tue, May 26, 2009 at 11:23 PM, Polytropon wrote: > >> Maybe there's a way of patching the uptime utility that it adds > >> the previous uptime of the system (since last shutdown) to the > >> actual uptime. I know this denies everything uptime stands for, > >> let's call it accumulated uptime. :-) > >> > > > > I like that idea, actually.. Not for faking cumulative uptime. It'd > > be kinda nice knowing how long a particular machine has been 'alive' > > without looking through service tag records. > > > > -- > > Glen Barber > > How about: > > [chris@amnesiac]~% ls -l /etc/ssh/ssh_host_key.pub > -rw-r--r-- 1 root wheel 324 Apr 15 2008 /etc/ssh/ssh_host_key.pub > [chris@amnesiac]~% > > I think I'd cry if I were to lose 553 days of uptime.... > > Chris > 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. If you also documented the installation date/time of various components, you could also track their lives separately. Andrew