After the computer shuts down suddenly unexpectedly without notification, is there a way to know the reason (read messages) the next time when I boot? My computer frequently shuts down, and I don't even know if it is a software problem, a hardware problem, or a firmware problem.

  • Does it shutdown in a more or less controlled way or does it just power off? In the first case your filesystems do not need checking at boot, in the second your filesystems are automatically being checked. – jippie May 27 '12 at 13:22
  • @jippie The latter: it just powers off. – sawa May 27 '12 at 15:26
  • 1
    These issues are tough to solve. Make sure your hardware is in good condition; all fans running, no dust blocking the vents etc. I see you built the computer yourself, in that case you have sufficient knowledge to also check if all connectors are firmly in place. – jippie May 27 '12 at 15:39
  • @jippie So, do you think it is likely a hardware problem? – sawa May 27 '12 at 15:41
  • Don't know, it might. I slightly updated my comment above. – jippie May 27 '12 at 15:43

That would generally depend on your operating system, the type of computer you're using, and how abrupt the reboot was.

Many Unix-like operating systems (including the popular Linux-based ones) keep their logs in /var/log. On some others, /var/adm is the standard location. The specific files stored there depend on the OS, distribution and configuration. Look for kernel or kernel.log, then try messages{,.log} or syslog{,.log}.

Some non-Linux Unices can produce a full report of a crash whenever this happens. Check the OS docs on where the crash dump is stored, and how to read it.

If your computer has server management board, IPMI board, or somesuch, the reason for the reboot may be recorded there. Check the logs via the web interface or ipmitool. If your mainboard has a dumber watchdog, the watchdog may be responsible for the reboot but this won't be logged.

If you still can't find any information, there are two cases: either the reboot is too sudden for the logs to be written (consider mounting your /var partition sync temporarily — it's a serious performance hog), or there are no logs to be written. In the latter case, the issue is either a very low-level hardware fault or a power supply issue (e.g. the POWEROK signal from the power supply de-asserting and causing a hardware reset, or a half-dead laptop battery behaving strangely — the laptop I'm on right now has been known to do this occasionally when running on battery power).

  • The computer was built my myself. The motherboard is Intel brand. The power is taken from AC, but I use a power unit called pico psu. I modified it a little bit with soldering, so I may have damaged it, or maybe the power capacity is not enough (the unit only allows about 60W). The OS is linux mint 13. Following your suggestion, I looked for the files, and there are files named /var/log/kern.log.*, /var/log/syslog.*. I will try to look into these. Thanks. – sawa May 27 '12 at 15:33
  • PS. The reboot does not happen automatically. It just shuts down. I have to manually do it, sometimes failing. – sawa May 27 '12 at 15:39
  • 1
    @saw Have a look at mcelog.org if it is a hardware problem and you have the right hw this may help – Ulrich Dangel May 27 '12 at 17:41
  • @UlrichDangel Thanks. I just installed it. – sawa May 27 '12 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.