Dmesg Displays Kernel Messages

The dmesg utility displays the kernel-ring buffer, where the kernel stores messages. When the system boots, the kernel fills this buffer with messages related to hardware and module initialization. Messages in the kernel-ring buffer are often useful for diagnosing system problems.

When you run dmesg, it displays a lot of information. It is frequently easier to pipe the output of dmesg through Iess or grep to find what you are looking for. For example, if you find that your hard disks are performing poorly, you can use dmesg to check whether they are running in DMA mode:

[ 23.259422] ata1: SATA max UDMA/133 cmd 0x9F0 ctl 0xBF2 bmdma 0xE000 irq 5 [ 23.259478] ata2: SATA max UDMA/133 cmd 0x970 ctl 0xB72 bmdma 0xE008 irq 5

The preceding lines tell you which mode each SATA device is operating in. If you are having problems with the Ethernet connection, search the dmesg log for eth:

$ dmesg | grep eth forcedeth.c: Reverse Engineered nForce ethernet driver. Version 0.54. eth0: forcedeth.c: subsystem: 0147b:1c00 bound to 0000:00:04.0 eth0: no IPv6 routers present

If everything is working properly, dmesg displays the hardware configuration information for each network interface.

Another common source of problems is the Direct Rendering Infrastructure (DRI), which allows graphics drivers direct access to the kernel. The corresponding kernel component is the Direct Rendering Module (DRM—not to be confused with Digital Rights Management).

[drm] AGP 0.99 Aperture @ 0xd8000000 64MB

[drm] Initialized radeon 1.7.0 20020828 on minor 0

[drm] Loading R200 Microcode

This output tells you that an ATi Radeon graphics card is configured correctly: Any configuration problems must be in the /etc/X11/xorg.conf file. The nVidia binary drivers do not use DRI. The dmesg log is a good place to start when diagnosing faults. If you have configured a system service incorrectly, this log quickly fills up with errors.

Was this article helpful?

0 0

Post a comment