Re: Testing watchdog timer card...?

wingel@t1.ctrl-c.liu.se
16 Oct 1998 10:20:06 -0000


jimd wrote:
>
> Is there a way I can force a kernel to hang
> so as to test the functionality of a watchdog timer
> card?
>
> If so, how?

The easiest way is to write a module with the following code:

#include <linux/module.h>
#include <linux/version.h>

#include <asm/io.h>

int init_module(void)
{
cli();
for(;;)
;
return 0;
}

void cleanup_module(void)
{
}

When you insmod this module the kernel will hang hard. Be prepared to
sync your disks :-)

/Christer (who has been using this trick to implement hard_reset_now
on a box with a watchdog; the easiest way to force a
real hardware reset)

-- 
If it's tourist season, why can't we shoot them?

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/