I would start by looking at the logs. This can be done with commands like dmesg
and journalctl
. The fact that the freeze is slightly delayed is a big advantage here. This should give you at least a basic idea of what your problem is.
If it is freezing, it is most likely due to memory issues. There are a lot of memory issue troubleshooting commands built into linux. These include vmstat
, free
, and stat /proc/meminfo
. The last is just printing out the data from a 'file.' The reason that it works is because /proc contains 'live files'(that is what I call them, anyway.) They usually represent real world things or concepts which change regularly, so they are constantly streaming. In other words, the output of this (and all listed) command(s) changes each time it is called.
Some more useful commands here are process based (as the last one above.) As processes use memory, these sort of overlap with those already mentioned. These include top
, ps
, and htop
.
top
in particular reminds me of ctrl alt delete
on Windows systems. It shows all processes, and brings the memory hogs to the top. It can help to find a program that is causing issues.
Most importantly, to find out details about any of these commands, just type
man [command]
into the terminal, where [command]
represents the command.