Is it possible to get linux to run a script when the kernel panics?
I want to setup a script that texts me when my server has crashed, so is it possible to do that? If so how could i?
|
No.
A kernel panic is a crash of the kernel. The OS is no longer running. A shell script cannot run without a shell. The shell is not running when the OS is not running. |
As rtmistler said, a kernel panic occurs when the kernel cannot continue to run, and the entire system stops cold.
Unlike an "Oops!", which is a recoverable kernel error, a kernel panic is instant system death. An external monitoring agent, such as Nagios, can be used to detect when a machine has become unresponsive and possibly to take action. Virtual-machine monitors can also detect when a virtual machine has died. |
And the very, very sad part I'm realizing just now is that there specifically a Sticky thread discussing kernel panics
Created by sundialsvcs, which I helped to post over in the Linux - Newbie forum. |
Quote:
|
Quote:
just saying... edit: i realize in retrospect that sundialsvcs' mention of nagios is not immediately visible to anyone, so my veiled criticism might've been a little harsh. my apologies. |
You know that a Direct Message is the preferred way to annoy other LQ members without causing any disruption?
|
Quote:
|
All times are GMT -5. The time now is 08:13 AM. |