FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 08-09-2010, 07:59 PM
Boris Epstein
 
Default finding out the time of the second-to-last reboot

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.

Thanks for any and all tips.
Boris.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-09-2010, 08:04 PM
Les Mikesell
 
Default finding out the time of the second-to-last reboot

On 8/9/2010 2:59 PM, 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.
>
> Thanks for any and all tips.

'last' should give you a history of reboots and logins. Also, an
assortment of things that happen during bootup are logged to
/var/log/messages.

--
Les Mikesell
lesmikesell@gmail.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-09-2010, 08:10 PM
Keith Roberts
 
Default finding out the time of the second-to-last reboot

On Mon, 9 Aug 2010, Boris Epstein wrote:

> To: CentOS mailing list <centos@centos.org>
> From: Boris Epstein <borepstein@gmail.com>
> Subject: [CentOS] finding out the time of the second-to-last reboot
>
> 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.
>
> Thanks for any and all tips.

Try checking some of your log files, like apache, mysql, or
/var/log/dmesg. That should tell you the last time the
machine rebooted.

Kind Regards,

Keith Roberts

-----------------------------------------------------------------
Websites:
http://www.php-debuggers.net
http://www.karsites.net
http://www.raised-from-the-dead.org.uk

All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-----------------------------------------------------------------
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-09-2010, 08:52 PM
Paul Heinlein
 
Default finding out the time of the second-to-last reboot

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@madboa.com <> http://www.madboa.com/
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 11:49 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org