Date: Fri, 8 Jun 2012 04:34:22 +0200 From: Polytropon <freebsd@edvax.de> To: Robert Bonomi <bonomi@mail.r-bonomi.com> Cc: racerx@makeworld.com, freebsd-questions@freebsd.org Subject: Re: find date of last boot Message-ID: <20120608043422.9a5d37a7.freebsd@edvax.de> In-Reply-To: <201206080202.q5822vVd060619@mail.r-bonomi.com> References: <4FD15461.6090109@makeworld.com> <201206080202.q5822vVd060619@mail.r-bonomi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 7 Jun 2012 21:02:57 -0500 (CDT), Robert Bonomi wrote: > > From owner-freebsd-questions@freebsd.org Thu Jun 7 20:26:46 2012 > > Date: Thu, 07 Jun 2012 20:24:49 -0500 > > From: Chris <racerx@makeworld.com> > > To: freebsd-questions@freebsd.org > > Subject: Re: find date of last boot > > > > On 6/7/2012 8:14 PM, Chris Hill wrote: > > Why create something that is already built in? > > As I mentioned previously, the last command lists when the system was > > rebooted. > > Probably, because last does *not* reliably do so. <grin> > > To wit: > $ date > Thu Jun 7 20:59:44 CDT 2012 > $ uptime > 8:58PM up 8 days, 22:30, 1 user, load averages: 0.07, 0.03, 0.01 > $ last reboot > wtmp begins Tue Jun 5 17:00:58 CDT 2012 > $ > > 'wtmp' has been rotated twice since the system was booted. Maybe introducing something along the /etc/rc execution? An /etc/rc.local entry like /bin/date "+%Y-%m-%d %H:%M:%S" > /var/log/thisboot.log and then just look at the file. Requires at least one reboot to take effect. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120608043422.9a5d37a7.freebsd>