|This article does not cite any references or sources. (February 2011)|
||This article's lead section may not adequately summarize key points of its contents. (March 2013)|
When the computer system is initially booted the kernel is loaded into memory. At this stage device drivers present in the kernel are set up to drive relevant hardware. 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 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: if the console is in use then these messages may be confused with or quickly overwritten by the output of user programs.
The output of dmesg can amount to many complete screens. For this reason, this output is normally reviewed using standard text-manipulation tools such as more, tail, less or grep. The output is often captured in a permanent system logfile via a logging daemon, such as syslog. On Linux systems, similar information is sometimes found in log files in /var/log.
Splash screen 
Many commercial operating systems display an animated splash screen 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, detailed information about all PCI buses and devices in the system
- lsusb, detailed information about USB ports and devices
- uname prints the name, version and other details about the current machine and the operating system
- List of Unix programs
- dmesg(8) FreeBSD manual page
- The dmesg Command by The Linux Information Project (LINFO)
- dmesg explained: kernel output examples
|This Unix-related article is a stub. You can help Wikipedia by expanding it.|