From owner-freebsd-rc@FreeBSD.ORG Tue Jun 14 03:23:43 2011 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70E06106564A for ; Tue, 14 Jun 2011 03:23:43 +0000 (UTC) (envelope-from jwd@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 481428FC13 for ; Tue, 14 Jun 2011 03:23:43 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p5E3Nh8M006209 for ; Tue, 14 Jun 2011 03:23:43 GMT (envelope-from jwd@freefall.freebsd.org) Received: (from jwd@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p5E3Nh9a006208 for freebsd-rc@FreeBSD.org; Tue, 14 Jun 2011 03:23:43 GMT (envelope-from jwd) Date: Tue, 14 Jun 2011 03:23:43 +0000 From: John To: freebsd-rc@FreeBSD.org Message-ID: <20110614032343.GA96959@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: Downtime report rc script? X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2011 03:23:43 -0000 Hi Folks, I'm trying to put together a simple to report at boot time how long the system was down. The script itself isn't really a problem, but I'm coming up short looking for a reliable way to determine exactly when the sytem went down regardless of whether it was a clean reboot or a crash. Am I missing something simple? I've thought about writing a simple little program to touch a file once per second invoked by the downtime rc script after querying the last time the file was touched... but there must be a simpler solution. Thoughts? Thanks, John