Re: finding out the time of the second-to-last reboot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Mon, 9 Aug 2010, Boris Epstein wrote:

> Hello all,

> I've got a CentOS box that became non-responsive today for some 
> obscure reason and had to be rebooted. Is there a way to find out 
> when it last had to be rebooted before today? uptime gives you no 
> history past the very last reboot, so obviously I need to find some 
> other way to get an answer to my question.

The last utility will do it:

   # simple, but needs eye-parsing
   last reboot

   # exact, but fragile if wtmp isn't old enough
   last reboot | head -n2 | tail -n1

but only if /var/log/wtmp is old enough. If your system rotates wtmp, 
then you'll have to spelunk /var/log/messages*.

-- 
Paul Heinlein <> heinlein@xxxxxxxxxx <> http://www.madboa.com/
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux