8:52 AM DMESG command in Linux : to display or control kernel ring buffer |
dmesg - To display or control the kernel ring buffer Command syntax DESCRIPTION After boot up also, if a new hardware peripheral is connected dmesg displays the message about that peripheral. The message could be error message like device not connected or a success message. It is helpful in analysing and debugging any hardware related issue. The program helps users to print out their bootup messages. Instead of copying the messages by hand, the user need only: dmesg > boot.messages or boot.msg and mail the boot.messages file to whoever can debug their problem. You can set the buffer size to query the kernel ring buffer -sbufsize If you have set the kernel buffer to be larger than the default then this option can be used to view the entire buffer. Lets try to understand dmesg with some examples 1. Check bluetooth device drivers
2.To check memory status
3. To check ethernet drivers details, for example for first NIC eth0:
4. To check the status of usb connected to system
5. To check terminal type info
If you want to clear dmesg log, you can use -c option. This will clear the log till the system boots up again. But if you connect any other device after this, you can see the log of the hardware again in dmesg output.
You need to be root to clear dmesg log. Suppose you have delete the dmesg log, and still you want to see the log you can see in /var/log/boot.msg or /var/log/kern.og
|
|
Related blogs
You may also like to see:
[2015-08-18] | [Open System-Linux] |
How to open a PDF file or a Postscript file in Linux - Evince Document viewer? |
[2014-09-21] | [Open System-Linux] |
How to define command prompt strings in Linux : what are $PS1, $PS2, $PS3 and $PS4? |
[2014-03-11] | [Open System-Linux] |
STRINGS : a command in linux to read the non-text files |
[2015-09-09] | [Open System-Linux] |
Some funny and cool commands in Linux |
[2017-01-21] | [Open System-Linux] |
Useful tips and tricks while working in Linux. |
Total comments: 0 | |