LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Tool that shows in the logs when a system panicked, restarted unscheduled? (https://www.linuxquestions.org/questions/linux-general-1/tool-that-shows-in-the-logs-when-a-system-panicked-restarted-unscheduled-854428/)

browny_amiga 01-05-2011 02:34 PM

Tool that shows in the logs when a system panicked, restarted unscheduled?
 
Hi

I have it at lot that when a system crashes fatally and restarts (due to a power outage, kernel panic, tripping over a cord or something), there is no mention of it in the log.
It just shows that the system was started.
Is there a tool that will show this in the log? With a message like "system was not shut down properly or had a fatal crash / kernel panic" when restarting?

It is pretty easy to do, just have a lock file somewhere that is removed when the system shuts down gracefully and that is left when it is not. And mechanism that checks this when starting up.

It would also be possible to tell when the crash occured, as you can update the lock file from time to time and when the systems dies, it cannot anymore.

But before doing a tool myself, I am pretty sure that there must be a tool out there already, since I am hardly the first person that requires this functionality.

Cheers

Markus

syg00 01-05-2011 03:19 PM

"man last" ?.

browny_amiga 01-05-2011 08:27 PM

Thanks, that will do the trick!

Cheers

Markus


All times are GMT -5. The time now is 06:32 AM.