{"id":2622,"date":"2022-08-30T15:26:24","date_gmt":"2022-08-30T15:26:24","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/02\/04\/which-log-will-tell-me-why-my-computer-shut-down-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:26:24","modified_gmt":"2022-08-30T15:26:24","slug":"which-log-will-tell-me-why-my-computer-shut-down-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/which-log-will-tell-me-why-my-computer-shut-down-collection-of-common-programming-errors\/","title":{"rendered":"Which log will tell me why my computer shut down?-Collection of common programming errors"},"content":{"rendered":"<p>I was at school SSHing to my homebox. All of a sudden, my connection was closed. Attempting to reconnect failed. When I returned home, I discovered that my computer was off.<\/p>\n<p>Nobody was at my house and I am sure that I did not have a power outage.<\/p>\n<p>How can I figure out how or why my computer shut off? Is there some log in <code>\/var\/log<\/code> that could point me in the right direction? Should there be a core dump somewhere that I should find? If so, how do I use core dumps?<\/p>\n<ol>\n<li>\n<p>The relevant files in \/var\/log are messages, dmesg<\/p>\n<p>issue, command &#8216;last&#8217; to see the exact reboot time. You will see a line starting with &#8216;reboot&#8217; (or may be shutdown) for all reboot\/crash.<br \/>\ncat \/var\/log\/messages from a terminal and check for messages at the time stamp of reboot or just before it. &#8216;dmesg&#8217; can give the last boot time messages.<\/p>\n<p>Hope this helps.<\/p>\n<\/li>\n<li>\n<p>It is unusual for a kernel error to shutdown the power, it would either hang with a kernel panic or reboot. It was most likely an hardware issue.<\/p>\n<p>If there was a kernel panic search for &#8220;kernel panic&#8221; on the logs dir:<\/p>\n<pre><code>grep -r \"kernel panic\" \/var\/log\n<\/code><\/pre>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2014-02-04 09:41:18. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I was at school SSHing to my homebox. All of a sudden, my connection was closed. Attempting to reconnect failed. When I returned home, I discovered that my computer was off. Nobody was at my house and I am sure that I did not have a power outage. How can I figure out how or [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2622","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2622"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2622\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}