Dmesg
Encyclopedia
dmesg is a command on most Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 and Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 based operating systems that prints the message buffer of the kernel.

Booting

When the computer system is initially booted
Booting
In computing, booting is a process that begins when a user turns on a computer system and prepares the computer to perform its normal operations. On modern computers, this typically involves loading and starting an operating system. The boot sequence is the initial set of operations that the...

 the kernel is loaded into memory. At this stage each device driver
Device driver
In computing, a device driver or software driver is a computer program allowing higher-level computer programs to interact with a hardware device....

 present in the kernel probes the system for the existence of relevant hardware. If the hardware is located, a diagnostic message is produced documenting precisely what was found. Other elements within the kernel may also produce similar output reporting both the presence of that particular module, and the values of any parameters adopted. It may be possible to specify boot parameters which control the level of detail in the messages. This process typically happens at a speed where individual messages scroll off the top of the screen before they can be read. Some keyboard keys may pause the screen output. The dmesg command allows these messages to be reviewed in a controlled manner after the system has started.

After booting

Even after the system has fully booted, the kernel may occasionally produce further diagnostic messages. Common examples of when this might happen are when I/O devices encounter errors, or USB
Universal Serial Bus
USB is an industry standard developed in the mid-1990s that defines the cables, connectors and protocols used in a bus for connection, communication and power supply between computers and electronic devices....

 devices are hot-plugged. dmesg provides a mechanism to review these messages at a later time. When first produced they will be directed to the system console
System console
The system console, root console or simply console is the text entry and display device for system administration messages, particularly those from the BIOS or boot loader, the kernel, from the init system and from the system logger...

: if the console is in use then these messages may be confused with or quickly overwritten by the output of user programs.

Output

The output of dmesg can amount to several complete screens. For this reason, this output is normally reviewed using standard text-manipulation tools such as more, tail
Tail (Unix)
tail is a program on Unix and Unix-like systems used to display the last few lines of a text file or piped data.-Syntax:The command-syntax is: tail [options]...

, less or grep
Grep
grep is a command-line text-search utility originally written for Unix. The name comes from the ed command g/re/p...

. The output is often captured in a permanent system logfile via a logging daemon, such as syslog
Syslog
Syslog is a standard for computer data logging. It allows separation of the software that generates messages from the system that stores them and the software that reports and analyzes them...

. On Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 systems, similar information is sometimes found in log files in /var/log.

Splash screen

Many commercial operating systems display an animated splash screen
Splash screen
A splash screen is an image that appears while a game or program is loading. It may also be used to describe an introduction page on a website. Splash screens sometimes do not cover the entire screen, but only a rectangle near the center...

 during this stage of the boot process, so the user does not see these messages. However, there is frequently a mechanism, such as the Esc key, to disable the splash screen and view the messages. This is an important diagnostic capability if the system fails to boot. There is also usually a method of reviewing these messages subsequent to start up in a manner equivalent to dmesg.

See also

  • lspci
    Lspci
    lspci is a command on Unix-like operating systems that prints detailed information about all PCI buses and devices in the system. It is based on a common portable library libpci which offers access to the PCI configuration space on a variety of operating systems.Example output on a Linux system:#...

    , detailed information about all PCI buses and devices in the system
  • lsusb, detailed information about USB ports and devices
  • uname
    Uname
    uname is a software program in Unix and Unix-like computer operating systems that prints the name, version and other details about the current machine and the operating system running on it...

     prints the name, version and other details about the current machine and the operating system
  • List of Unix programs

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK