{"id":44,"date":"2010-01-17T21:06:31","date_gmt":"2010-01-18T02:06:31","guid":{"rendered":"http:\/\/zitstif.no-ip.org\/?p=44"},"modified":"2010-01-18T21:22:43","modified_gmt":"2010-01-19T02:22:43","slug":"raising-elephants-is-so-utterly-boring","status":"publish","type":"post","link":"http:\/\/zitstif.no-ip.org\/?p=44","title":{"rendered":"Raising Elephants Is So Utterly Boring"},"content":{"rendered":"<p><em><strong>&#8220;R<\/strong>aising <strong>E<\/strong>lephants <strong>I<\/strong>s <strong>S<\/strong>o <strong>U<\/strong>tterly <strong>B<\/strong>oring&#8221;<\/em><\/p>\n<p>This is a simple mnemonic for remembering the sequence of keys to press when things go a mess under Linux.<\/p>\n<p><a title=\"http:\/\/en.wikipedia.org\/wiki\/Magic_SysRq_key\" href=\"http:\/\/en.wikipedia.org\/wiki\/Magic_SysRq_key\" target=\"_blank\">http:\/\/en.wikipedia.org\/wiki\/Magic_SysRq_key<\/a><\/p>\n<p>I just recently used the SysRq key on my laptop, which had frozen after I applied some updates through the update manager. Under the condition that I had not known this key combination, I would have had to resort to a hard restart which is harmful to computer hardware and especially file systems.<\/p>\n<p>When my system froze after it had completed its boot sequence, I held <span style=\"color: #0000ff;\">FN<\/span> + ALT + <span style=\"color: #0000ff;\">SysRq<\/span> <span style=\"color: #ffffff;\">and then pressed &#8220;R E I S U B&#8221;. After pressing this key sequence, my system safely restarted.<\/span><\/p>\n<p><span style=\"color: #000000;\"><span style=\"color: #ffffff;\">Here&#8217;s a simple shell script to enable the sysrq key for you. (It&#8217;s not perfect, but it will get the job done.) Keep in mind that you need to be root when doing this.<\/span><br \/>\n<\/span><\/p>\n<pre lang=\"bash\">#!\/bin\/bash \r\n\r\nif [[ ! \"$(cat \/proc\/sys\/kernel\/sysrq)\" -eq \"1\" ]];\r\n then\r\n      echo \"Would you like to enable the SysRq key? (yes|no)\";\r\n      read answer;\r\n         if [[  \"$(echo ${answer} | egrep 'Y|y')\" ]];\r\n          then\r\n              echo \"Enabling sysrq...\"\r\n              echo \"1\" > \/proc\/sys\/kernel\/sysrq;\r\n          else\r\n               echo \"Exiting!\";\r\n               exit 0;\r\n         fi\r\n else\r\n    echo \"The sysrq is enabled!\";\r\n    exit 0;\r\nfi<\/pre>\n<p><span style=\"color: #000000;\"><span style=\"color: #ffffff;\">I want to thank a friend from Florida who had informed me of this wonderful and useful key.<\/span><br \/>\n<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;Raising Elephants Is So Utterly Boring&#8221; This is a simple mnemonic for remembering the sequence of keys to press when things go a mess under Linux. http:\/\/en.wikipedia.org\/wiki\/Magic_SysRq_key I just recently used the SysRq key on my laptop, which had frozen after I applied some updates through the update manager. Under the condition that I had &hellip; <a href=\"http:\/\/zitstif.no-ip.org\/?p=44\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Raising Elephants Is So Utterly Boring<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,3],"tags":[8],"class_list":["post-44","post","type-post","status-publish","format-standard","hentry","category-code","category-posts","tag-sysrq"],"_links":{"self":[{"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/posts\/44","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=44"}],"version-history":[{"count":14,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/posts\/44\/revisions"}],"predecessor-version":[{"id":47,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/posts\/44\/revisions\/47"}],"wp:attachment":[{"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=44"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=44"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=44"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}