Halting or rebooting a machine

This sounds like a simple task, doesn't it?

  • halt
  • reboot
  • shutdown -h now
  • shutdown -r now
  • Ctrl-Alt-Del
  • Press reset
  • Power off, then power on

However, sometimes:

  • halt doesn't work, and just hangs
  • reboot ditto
  • shutdown, the same
  • Ctrl-Alt-Del is not option because there is no keyboard
  • Ctrl-Alt-Del is not an option because you're not in the same place as the computer

For some of these scenarios you can find helpful adivce on the Internet:

  • Look for zombie processes, find out the parent process PID, and either send it a SIGCHILD or just KILL it

That doesn't work if the zombie process has a parent PID of 1

So, if you have remote (root) login access to a machine and it won't shutdown or reboot, these are worth a try:

echo b >/proc/sysrq-trigger
echo o >/proc/sysrq-trigger

The b option will perform a reboot, and the o option will simply shut the machine down and power it off.

If neither of those work, and you have no remote access (ILO, IPMI, RAC, etc) control of the machine, there's probably nothing for it but an inconvenient journey for someone to press a trivial button.


Go up
Return to main index.