Getting Linux kernel debug information after a kernel crash

Actually, the /var/log/dmesg file contains the current boot print message log. The /var/log/kern.log file contains your previous boot kernel print message log in Ubuntu. In other Linux flavours it will contain in the /var/log/messages file in Fedora, etc..


Kernel log messages can be viewed in /var/log/dmesg files even after restart of the system.

There will be so many files with dmesg.X, and those files are previous kernel logs. dmesg is the latest file.

See difference between dmesg and /var/log/kern.log


You could try to interact with your hung system by entering magic SysRq key sequences via your keyboard or a serial console.