When a Linux system encounters a fault, the Administrator must first locate the error. Now there are many tools in Linux that can help users find the error and learn to use them to identify the problem. These tools include dmesg, lspci, lsmod, syslog/messages, and proc file systems, and these tools are fundamental. In other words, they will not change because of the different versions of Linux distributions. I hope you can use it skillfully.
Dmesg is usually useful, so we first introduce this tool. Dmesg is a command to read the kernel buffer. It contains kernel messages. It reports kernel detection with hardware or applicationsProgramThe current error provides a fast and easy way to capture the latest error from the kernel.
The dmesg outputs information about the kernel version to run, including the compiler used to create the kernel and when to compile the kernel. Therefore, if you compileSource codeA gcc fault occurs, which is the first place to begin the check.
In addition to dmesg, you can also find hardware errors, such as syslog. Dmesg reports all information to the Syslog daemon. syslog records/var/log/messages according to Sun Xu by default, we can use lspci,/proc, and dmesg/syslog To locate the faulty hardware. Lspci provides a hardware layout on the machine. Of course, we can also use dmesg to list the PCI bus information "demsg | grep PCI ". This article is just a start for everyone. Further research will surely play a role.