LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to tell how long last reboot took (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-tell-how-long-last-reboot-took-803042/)

anon091 04-20-2010 07:49 AM

How to tell how long last reboot took
 
Is there certain lines I could look through in a certain log file to give me a rough estimate of how long the last, or last couple, reboots of a server took?

ncsuapex 04-20-2010 08:12 AM

I'd say check out /var/log/messages and see and look for the time you think it was rebooted and go from there

PMP 04-20-2010 08:45 AM

Linux command w will show you the details

or

cat /proc/uptime

ncsuapex 04-20-2010 09:05 AM

^ I think he wants to know how long the actual reboot took.... Not how long the server has been up.

anon091 04-20-2010 09:08 AM

Correct, I want to know how long the server is down for while it reboots, on average, or at least the last time.

The problem is is that I dont know when the last time it was rebooted. Can i just grep for certain phrases, then subtract the time stamps to give me the time?

anon091 04-20-2010 09:59 AM

I just looked on the server, its been up for almost 100 days, but my messages files only go back to March, and that ones only 15k :-(

Can anyone think of another way to figure this out?

no2498 04-20-2010 12:24 PM

? does it not start deleting cache files after it fills up
may be why your log is short

hope this helps

anon091 04-20-2010 12:28 PM

yeah, it overwrites them as time goes by, not sure why they are so small though.

chrism01 04-20-2010 07:18 PM

The settings for the num of logfiles preserved is in the logrotate configs

logrotate.conf
logrotate.d

elaguilas 04-20-2010 07:32 PM

is goood
 
is good

anon091 04-21-2010 05:25 AM

it looks like i'm keeping 4 files, but i dont know why these ones are so small.


All times are GMT -5. The time now is 05:58 AM.