How to reboot a locked up local or remote Linux box
On the odd occasion your Linux box will lock up and won't appear to be working, at this point you go darn I'd love to do a controlled shutdown. The machine may look like its locked up but the good old Linux kernel may still be available to run some commands and shut the machine down cleanly. In the remote server situation this sure beats organizing someone to go and shut the machine down for you.
To shut the machine down you need to run some magic system commands on the machine or remotely via telnet, a full set of commands can be found at Magic SysReq key wiki.
As an example to run these commands remotely you could do the following :-
Show Plain Text- // Telnet to the machine
- telnet <your-machine-ip> 4094
- // Enter root password and at sysrq> prompt enter
- s<return>
- // To sync drives, then enter
- b<return>
- // To reboot, there will be no prompt returned from this command, so simply ^] then quit to exit from the Telnet
A colleague came across this functionality in the Linux kernel, just brilliant! Simply a must have for those remotely administering Linux servers.