Dmesg
lastmod 2024-10-17created 2022-07-204 edits
The dmesg command shows system boot messages. It also acts as a buffer that records messages printed by the kernel up to a certain level, and if an error occurs during kernel boot, it helps narrow down and find at which stage the error occurred.
Flags
-
-H - Human Readable Output. That is, output that humans can read.
-
-w,--follow - Wait for new messages. Keeps checking for new messages without exiting the program.
Finding out why a process was killed
When running a program on Linux, sometimes no error message appears and only the word killed is printed. In that case, entering the following command shows why the process was forcibly terminated. Most of the time it will be an out of memory problem.
Usages
See also
- insmod - add a module
- lsmod - check modules
- rmmod - remove a module
- Advanced Configuration and Power Interface (ACPI)