[plug] Forcing a kernel panic

Anthony J. Breeds-Taurima tony at cantech.net.au
Tue Jun 4 12:28:42 WST 2002


On Tue, 4 Jun 2002, Jonathon Bates wrote:

> > Is there a way to force a linux kernel panic?  It's desired here as a way 
> > of testing some failover stuff, without turning the power off or pulling 
> > cables etc.
> 
> 
> Heere you go
> http://ou800doc.caldera.com/SM_trouble/saT.emerg_force_panic.html


or something like:
-- ~/panic.c
#include <linux/module.h>

int init_module(void);

int init_module (void) {
	panic(" panic has been called");
	return 0;
}
--
gcc -c -D__MODULE__ -I/usr/src/linux/include panic.c

sudo insmod ./panic.o

Yours Tony

Jan 22-26 2003      Linux.Conf.AU       http://conf.linux.org.au/
         The Australian Linux Technical Conference!



More information about the plug mailing list