Friday, February 1, 2008

in case of emergency

On one of the embedded devices that I write software for, I am running the 2.6.21 kernel patched with preempt-rt patch. I won't get into discussing what my opinion of real-time Linux is right now, so save that for a later post.

But, since the device is going to be deployed in a 24-7 environment, I figured it might help to reboot the system in case of a kernel panic rather than having it sit around since the privilege of console access is not affordable.

The solution, configure /etc/sysconfig.conf :

kernel.panic = N # to reboot immediately
kernel.panic = 5 # to reboot after a 5 second delay

You will notice the change in /proc/sys/kernel/panic, which means, you can change this at runtime by doing:

echo 5 > /proc/sys/kernel/panic

No comments: