Recently at a customer we needed to power-cycle a database system because we wanted to be sure that a cluster resource fails over to a remaining node as expected. The issue was that we did not have access to the data center where the system is running nor did we have access to the console. What to do? Actually it is quite easy to force a system to reboot without syncing the disks or unmounting the file systems (which is almost the same as to power-cycle the system).

All you need to do is this (as root, of course):

echo b > /proc/sysrq-trigger

… and your system is immediately gone 🙂

There are several other keys you can write to the trigger file. It is documented here: Linux Magic System Request Key Hacks