Re: Remotely rebooting a machine with state 'D' processes, how?

Linus Torvalds (torvalds@transmeta.com)
Fri, 10 Aug 2001 14:59:37 -0700


In article <20010810231906.A21435@bonzo.nirvana> you write:
>How can I reboot a stuck machine remotely, when there are uninterruptable
>processes arround? shutdown -r, reboot [-n] [-f], telinit 6 do not give the
>intended results. Localy I can use Alt-SysRq-S/U/B, but what if I still have a
>remote ssh connection and don't want to have to get to the machines location?
>
>Of course the real problem are the processes themselves, but being able to
>revive a machine is also nice ;)

You have to use the reboot() system call directly as root, with the
proper arguments to make it avoid doing even any sync. See

man 2 reboot

for details.

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/