From owner-freebsd-rc@FreeBSD.ORG Tue Jun 14 03:47:23 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 EFDF6106564A for ; Tue, 14 Jun 2011 03:47:23 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id B08398FC0A for ; Tue, 14 Jun 2011 03:47:23 +0000 (UTC) Received: from 63.imp.bsdimp.com (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p5E3hKqK081470 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 13 Jun 2011 21:43:20 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20110614032343.GA96959@FreeBSD.org> Date: Mon, 13 Jun 2011 21:43:15 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20110614032343.GA96959@FreeBSD.org> To: John X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Mon, 13 Jun 2011 21:43:21 -0600 (MDT) Cc: freebsd-rc@freebsd.org Subject: Re: 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:47:24 -0000 man last(1). You might need to tweak the newsyslog retention time for = the files... Warner On Jun 13, 2011, at 9:23 PM, John wrote: >=20 > Hi Folks, >=20 > I'm trying to put together a simple to report at boot time how > long the system was down. >=20 > 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. >=20 > 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. >=20 > Thoughts? >=20 > Thanks, > John >=20 > _______________________________________________ > freebsd-rc@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-rc > To unsubscribe, send any mail to "freebsd-rc-unsubscribe@freebsd.org" >=20 >=20