From owner-freebsd-questions@FreeBSD.ORG Thu Jun 7 23:47:41 2012 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 D2869106566C for ; Thu, 7 Jun 2012 23:47:41 +0000 (UTC) (envelope-from bc979@lafn.org) Received: from zoom.lafn.org (zoom.lafn.org [108.92.93.123]) by mx1.freebsd.org (Postfix) with ESMTP id A645A8FC0C for ; Thu, 7 Jun 2012 23:47:41 +0000 (UTC) Received: from [192.168.1.7] (64-37-17-97.static.ezlink.com [64.37.17.97] (may be forged)) (authenticated bits=0) by zoom.lafn.org (8.14.3/8.14.2) with ESMTP id q57NlTcP000958; Thu, 7 Jun 2012 16:47:30 -0700 (PDT) (envelope-from bc979@lafn.org) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Doug Hardie In-Reply-To: <20120608013325.d3eee7bb.freebsd@edvax.de> Date: Thu, 7 Jun 2012 16:47:30 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <03962865-7560-43F4-B8E6-7F8652A1B488@lafn.org> References: <4FD1360D.1060208@a1poweruser.com> <20120608013325.d3eee7bb.freebsd@edvax.de> To: Polytropon X-Mailer: Apple Mail (2.1278) X-Virus-Scanned: clamav-milter 0.97 at zoom.lafn.org X-Virus-Status: Clean Cc: Fbsd8 , FreeBSD Questions Subject: Re: find date of last boot 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: Thu, 07 Jun 2012 23:47:41 -0000 On 7 June 2012, at 16:33, Polytropon wrote: > On Thu, 07 Jun 2012 19:15:25 -0400, Fbsd8 wrote: >> dmesg command does not show date of last boot. >>=20 >> Are there some other commands to find date of last boot? >=20 > Check the lines in /var/log/messages. Unless you're not > experiencing a newsyslog message (new log file started), > the "kernel: Copyright (c) 1992-2011 The FreeBSD Project." > string (first line of typical dmesg, check for your particular > OS version!) indicates when the system was booted. But > note that the date format is not the common sortable > kind of `date "+%d.%m.%Y"`. >=20 > Another idea (as already mentioned) is to subtract `uptime` > from current `date`. :- Check the timestamp on /var/run/dmesg.boot That is only written to when = the system boots.=