From owner-freebsd-questions@FreeBSD.ORG Fri Jun 8 06:19:37 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 95E5C106566B for ; Fri, 8 Jun 2012 06:19:37 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id 0DDC18FC23 for ; Fri, 8 Jun 2012 06:19:36 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.187.76.163]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.5/8.14.5) with ESMTP id q586JVeO041504 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 8 Jun 2012 07:19:32 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: OpenDKIM Filter v2.5.2 smtp.infracaninophile.co.uk q586JVeO041504 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1339136373; bh=CUmBmqljYgqjYdbR/Tu9wjZAWsLn+hpSsB9gyAw25YE=; h=Date:From:To:CC:Subject:References:In-Reply-To:Content-Type: Message-ID:Mime-Version; b=R2fzkbYp3oRd4KPkNLjOXmIEzhxwqWFX+X3bADRoRmBQ6q/HeRidf3K/HBGaywkp6 Yw36A7k8DmcfehrfRjncLDQSON/nxll4/Se4GPyFkY9QWEYFtKArH0aqxTbpFRd5Gh yS260Ar7hiEK13tTRoJy134YpHzxCCAJGK1qnfVc= Message-ID: <4FD19973.5040802@infracaninophile.co.uk> Date: Fri, 08 Jun 2012 07:19:31 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20120601 Thunderbird/13.0 MIME-Version: 1.0 To: "Randal L. Schwartz" References: <4FD1360D.1060208@a1poweruser.com> <4FD15461.6090109@makeworld.com> <86obou7fly.fsf@red.stonehenge.com> <5E0240CD-6B6C-4221-A656-0006254132F9@mac.com> <86ipf276g7.fsf@red.stonehenge.com> In-Reply-To: <86ipf276g7.fsf@red.stonehenge.com> X-Enigmail-Version: 1.4.2 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig78624A2F9D51F8EE869FA27F" X-Virus-Scanned: clamav-milter 0.97.4 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_ADSP_ALL,DKIM_SIGNED,T_DKIM_INVALID autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk Cc: FreeBSD - 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: Fri, 08 Jun 2012 06:19:37 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig78624A2F9D51F8EE869FA27F Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 08/06/2012 05:50, Randal L. Schwartz wrote: > Sure, but the question was likely involving a stock system, so yes, you= r > mileage may vary, but let's consider a solution that works for a defaul= t > system. "last reboot" isn't it. It's not that. 'last reboot' seems to be broken at the moment, at least on stable/9: lucid-nonsense:~:% uname -a FreeBSD lucid-nonsense.infracaninophile.co.uk 9.0-STABLE FreeBSD 9.0-STABLE #15 r236465: Sat Jun 2 23:14:59 BST 2012 root@lucid-nonsense.infracaninophile.co.uk:/usr/obj/usr/src/sys/LUCID-NON= SENSE amd64 I rebooted a few days ago: lucid-nonsense:~:% uptime 7:14AM up 3 days, 8:18, 1 user, load averages: 0.03, 0.01, 0.01 And the utx.log file was last rotated over a week ago: lucid-nonsense:~:% ls -la /var/log/utx* -rw-r--r-- 1 root wheel 394 Jun 7 17:51 /var/log/utx.lastlogin -rw-r--r-- 1 root wheel 16841 Jun 8 07:06 /var/log/utx.log -rw-r--r-- 1 root wheel 24878 May 31 22:41 /var/log/utx.log.0 -rw-r--r-- 1 root wheel 13741 Apr 30 08:50 /var/log/utx.log.1 -rw-r--r-- 1 root wheel 27886 Mar 31 22:52 /var/log/utx.log.2 but last(1) isn't coming up with the goods: lucid-nonsense:~:% last reboot wtmp begins Fri Jun 1 06:14:46 BST 2012 (nor does it work if I tell last to use the older utx.log files) Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW --------------enig78624A2F9D51F8EE869FA27F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/RmXMACgkQ8Mjk52CukIwDPwCfZxxd3owiUBZqFHsMukxAU/Dq 3r4An1XfHUh7rvZfNMVk0VXl9ttr8tq9 =dA2e -----END PGP SIGNATURE----- --------------enig78624A2F9D51F8EE869FA27F--