UnixServerAdmin

Server Administration & Management

How to automatically reboot server On kernel panic error

There is a way to auto reboot your servers on Kernel Panic. This is helpful in a situation where your servers are remote and needs time to arrange a hard reboot. echo X >/proc/sys/kernel/panic , where X is the timeout in seconds, The kernel waits X seconds and reboots.

# echo “10” > /proc/sys/kernel/panic

Above it is 10 sec. BUT usually I keep it 10sec or more to believe that the problem was transitory.

  1. kernel.panic = 1 initiates a hard system reboot whenever the system runs into a kernel panic.
  2. kernel.panic_on_oops = 1 extends that behavior to oopses (the kernel will then treat any oops just like it treats a panic)
Advertisements

January 2, 2013 - Posted by | Tips & Tricks, Unix/Linux | , ,

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: