Yesterday, I ran a bash script for about 10 hours. When I went to use the computer, it locked up.

  • I have an Eee PC with Debian.
  • The screen was still visible, but the mouse or keyboard had not effect.
  • I tried CtrlAltDelete, CtrlAltBackspace, CtrlAltF1, but to no effect.
  • The hard drive light showed no activity.

How can I determine what went wrong? What logs can I check?

4 Answers 4


You can find all messages in /var/log/syslog and in other /var/log/ files. Old messages are in /var/log/syslog.1, /var/log/syslog.2.gz etc. if logrotate is installed.

However, if the kernel really locks up, the probability is low that you will find any related message.

It could be, that only the X server locks up. In this case, you can usually still access the PC over network via ssh (if you have installed it). There is also the Magic SysRq key to unRaw the keyboard such that the shortcuts you tried could work, too.


you can read /var/log/dmesg for any software problems like [ kernel ] , if it was a service error you may read the service's log like apache for example /var/log/apache/error.log

I guess some hardware errors can't have log


I can't give you with exact commands that can help you get data. But general approach to find the culprit is to some how capture output of commands at regular interval. This will help as you will have data from commands executed before system crashed.

You can capture output of these commands by scheduling them using crontab (HowTo: Add Jobs To cron Under Linux or UNIX?).

Alternatively, there is a service SeaLion - Linux server monitoring and debugging tool where you can schedule commands and check your system's status online.


I stumbled across this post while Googling the log issue but for others' reference concerning the failure of the OP's machine to respond to the reboot, X server kill, and tty commands entered from the keyboard I would add this:

While hardware power options (e.g., the reset and power buttons, or simply unplugging the machine) are always available, I have found that in these cases, a machine often responds to SysRq commands, including Alt+SysRq+b (i.e., reboot).

SysRq must be enabled, however. In Ubuntu 20.04, this means either doing:

echo 1 > /proc/sys/kernel/sysrq

for the current session or, for persistent configuration, having the following appear in /etc/sysctl.conf:


This procedure may differ for other distributions.

I would hasten to add a recommendation to review other available SysRq commands before invoking Alt+SysRq+b because it will immediately reboot a system before putting it into a stable state, which may create other difficulties including file corruption. These other commands and command sequences are well documented elsewhere.

  • The question is about how to diagnose the problem, not how to recover from it. Commented Apr 26, 2022 at 5:24
  • I know. Please read my first paragraph.
    – ebsf
    Commented Apr 27, 2022 at 4:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .