Linux Watchdog Reset – How to Cause a Watchdog Reset of an Embedded Linux Device

bashembeddedkernellinuxwatchdog

Is there a command like

vi > out
vi | out

That I could use to cause a watchdog reset of my embedded linux device?

Best Answer

If you have a watchdog on your system and a driver that uses /dev/watchdog, all you have to do is kill the process that is feeding it; if there is no such process, then you can touch /dev/watchdog once to turn it on, and if you don't touch it again, it will reset.

You also might be interested in resetting the device using the "magic sysrq" way. If you have a kernel with the CONFIG_MAGIC_SYSRQ feature compiled in, then you can echo 1 > /proc/sys/kernel/sysrq to enable it, then echo b > /proc/sysrq-trigger to reboot. When you do this, it reboots immediately, without unmounting or or syncing filesystems.