{"id":356,"date":"2013-04-22T18:35:35","date_gmt":"2013-04-22T23:35:35","guid":{"rendered":"http:\/\/bitc.bme.emory.edu\/~lzhou\/blogs\/?p=356"},"modified":"2013-04-22T18:35:35","modified_gmt":"2013-04-22T23:35:35","slug":"force-hard-reboot-without-physically-accessing-the-computer","status":"publish","type":"post","link":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/?p=356","title":{"rendered":"Force hard reboot without physically accessing the computer"},"content":{"rendered":"<p>Sometimes a zombie process might prevent &#8220;reboot&#8221; &#8220;shutdown -r now&#8221; from working properly since such soft reboot methods will try to close the zombie processes &#8220;normally&#8221; and stall on permanent waiting.  In this case, instead of approaching the computer and press the power button, there is a way to do so remotely if you still have a remote login session alive:<br \/>\necho b &gt; \/proc\/sysrq-trigger<br \/>\nOther sysrp-trigger options:<br \/>\n1. You need to enable the feature with e.g.:<\/p>\n<p>echo 1 &gt; \/proc\/sys\/kernel\/sysrq<\/p>\n<p>If that file doesn&#8217;t exist, the kernel was built without SysRq support<br \/>\n([CONFIG_]MAGIC_SYSRQ).<\/p>\n<p>2. You need to use Alt+PrtSc+, where is one of those listed<br \/>\nin \/usr\/src\/linux\/Documentation\/sysrq.txt:<\/p>\n<p>&#8216;r&#8217; &#8211; Turns off keyboard raw mode and sets it to XLATE.<\/p>\n<p>&#8216;k&#8217; &#8211; Secure Access Key (SAK) Kills all programs on the current virtual<br \/>\nconsole. NOTE: See important comments below in SAK section.<\/p>\n<p>&#8216;b&#8217; &#8211; Will immediately reboot the system without syncing or unmounting<br \/>\nyour disks.<\/p>\n<p>&#8216;o&#8217; &#8211; Will shut your system off (if configured and supported).<\/p>\n<p>&#8216;s&#8217; &#8211; Will attempt to sync all mounted filesystems.<\/p>\n<p>&#8216;u&#8217; &#8211; Will attempt to remount all mounted filesystems read-only.<\/p>\n<p>&#8216;p&#8217; &#8211; Will dump the current registers and flags to your console.<\/p>\n<p>&#8216;t&#8217; &#8211; Will dump a list of current tasks and their information to your<br \/>\nconsole.<\/p>\n<p>&#8216;m&#8217; &#8211; Will dump current memory info to your console.<\/p>\n<p>&#8216;v&#8217; &#8211; Dumps Voyager SMP processor info to your console.<\/p>\n<p>&#8216;0&#8217;-&#8216;9&#8217; &#8211; Sets the console log level, controlling which kernel messages<br \/>\nwill be printed to your console. (&#8216;0&#8217;, for example would make<br \/>\nit so that only emergency messages like PANICs or OOPSes would<br \/>\nmake it to your console.)<\/p>\n<p>&#8216;e&#8217; &#8211; Send a SIGTERM to all processes, except for init.<\/p>\n<p>&#8216;i&#8217; &#8211; Send a SIGKILL to all processes, except for init.<\/p>\n<p>&#8216;l&#8217; &#8211; Send a SIGKILL to all processes, INCLUDING init. (Your system<br \/>\nwill be non-functional after this.)<\/p>\n<p>&#8216;h&#8217; &#8211; Will display help ( actually any other key than those listed<br \/>\nabove will display help. but &#8216;h&#8217; is easy to remember \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes a zombie process might prevent &#8220;reboot&#8221; &#8220;shutdown -r now&#8221; from working properly since such soft reboot methods will try to close the zombie processes &#8220;normally&#8221; and stall on permanent waiting. In this case, instead of approaching the computer and press the power button, there is a way to do so remotely if you still [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,3],"tags":[],"class_list":["post-356","post","type-post","status-publish","format-standard","hentry","category-computer-tips","category-mri-technical-support","post-blog"],"_links":{"self":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/356","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=356"}],"version-history":[{"count":1,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/356\/revisions"}],"predecessor-version":[{"id":358,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/356\/revisions\/358"}],"wp:attachment":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}