msgbartop
MAC OS X, Linux, Windows and other IT Tips and Tricks
msgbarbottom

24 Dec 16 Force reboot a remote Linux server

Introduction:
After having tried to do a reboot of a remote Linux server via the command reboot which had no effect, I tried to find a command that would force the server to reboot immediately. I found the commands that do exactly that at:
https://major.io/2009/01/29/linux-emergency-reboot-or-shutdown-with-magic-commands/

Commands:
echo 1 > /proc/sys/kernel/sysrq
echo b > /proc/sysrq-trigger

This is pretty brutal and pretty much the same as pressing the reset button on the server (if equipped). No daemons will be shut down gracefully, no filesystem sync will occur, and you may get the wrath of a fsck (or worse, a non-booting server) upon reboot. BUT when all else fails, this is the next best thing to do.

Leave a Reply

%d bloggers like this: