LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   if power off unexpected is it any where logged ? (https://www.linuxquestions.org/questions/linux-newbie-8/if-power-off-unexpected-is-it-any-where-logged-752117/)

ravibhure 09-02-2009 10:33 AM

if power off unexpected is it any where logged ?
 
Hello,
I have failed our servers and did not know how it goes down unexpected, can is there any way if power off unexpected is it any where logged on linux ?

nuwen52 09-02-2009 10:48 AM

If the power goes off unexpectedly, the server would have to power to write that into a log.

I think the best you can probably do is check when the last entries in the "/var/log" files were made. That would give you approximate time of shutdown. And, might give you a clue as to what was running when it died. If you are wondering about it being a hardware failure, knowing when it died and what was running might help you track down the problem.

If it was a simple power failure, then without a battery backup which can communicate with the server itself, there's no way I know of to know when exactly the system shut down.

ravibhure 09-02-2009 11:00 AM

Nuwen,
Thanks for advise, can is it a way to know about powerfailure or linux logging any where ?

lazlow 09-02-2009 11:02 AM

If you have a UPS that linux talks to, it will shut down the server "normally" and you can add a marker in your shutdown script. If you do not have a UPS, the OS (whichever you use) will not have time to write anything.

ravibhure 09-02-2009 11:06 AM

Yes! sure, Thanks all of you


All times are GMT -5. The time now is 03:41 PM.