|
The dmesg command is used to write the kernel messages in Linux and other A kernel is the core of an operating system. It is the first part of the operating system The numerous messages generated by the kernel that appear on the display dmesg obtains its data by reading the kernel ring buffer. A buffer is a portion of a A ring buffer is a buffer of fixed size for which any new data added to it overwrites the oldest data in it. dmesg can be very useful when troubleshooting or just trying to obtain information about the
Invoking dmesg without any of its options (which are rarely used) causes it to write all the This usually produces far too many lines to fit into the display screen all at once, However, the output can be redirected to the less command through the use of a pipe thereby allowing the startup messages to be viewed one screenful at a time:
less allows the output to be moved forward one screenful at a time by pressing the (The more command could have been used here instead of the less command; however, When a user encounters a problem with the system, it can be convenient to write the For example, the output could be redirected to a file named boot_messages using the (designated by a rightward facing angle bracket) as follows:
The -i option can be used to tell grep to ignore the case (i.e., lower case or upper case) of the
And the following tells dmesg to show all serial ports (which are represented by the string tty):
The dmesg and grep combination can also be used to show how much
The following command checks to confirm that the HDD(s) is running in
The output of dmesg is maintained in the log file /var/log/dmesg, and it can thus also be
|
Comments
(There are currently no comments for this post.)