dmesg command

LINUX-Frequently used commands

dmesg command Display system messages at startup
Syntax
cat   [Option] 
The dmesg command displays the system messages at boot time.
The “message buffer”, where the kernel stores messages, has a fixed size, and if the buffer size is exceeded, the messages are overwritten from the top.
The dmesg command displays the message buffer, so it cannot display all the message contents.
Frequently used options
-l [list]Specify the display level. The display level can be selected from “emerg (high)”, “alert”, “crit”, “err”, “warn”, “notice”, “info”, and “debug (low)”. To specify multiple levels, separate them with “,”.
-f [list]Specify the display target. Select the target from “kern (kernel messages)”, “user”, “mail”, “daemon”, “auth”, “syslog”, “lpr (printer)”, and “news”. To specify multiple targets, separate them with “,”.
-kDisplay kernel messages (equivalent to “-f kern”)
-uDisplay user space messages (equivalent to “-f user”)
-xDisplay level and facility
-dDisplay the time elapsed since the last message.
-eDisplay the message display time and the elapsed time between messages (indicated by “-d”) in an easy-to-read format
-TDisplay the message at the time it was output (note that this will be inaccurate if suspend/resume is used)
-tDo not display time
-HDisplay in an easy-to-read style
-risplay messages without processing them.
-LDisplay with color
-wWait for the kernel to output a new message (press [Ctrl] + [C] to exit).
-F [file]Display the specified file instead of the buffer
-SDisplay using syslog
-CClear the buffer (only available for root user)
-cOutput and clear the ring buffer (only available for root user)
-DDisable output to console (only available to root user)
-EEnable output to console (only available to root user)
-n [level]Specify the level to be displayed in the console (only available to root user)
Example: Run the dmesg command without any options.
$ dmesg
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.2.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debi an 4.6.3-14) ) #1 SMP Debian 3.2.51-1
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.2.0-4-amd64 root=UUID= ro quiet console=tty0 console=ttyS0
[ 0.000000] Disabled fast string operations
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: 0000000000000000 – 000000000009dc00 (usable)
[ 0.000000] BIOS-e820: 000000000009dc00 – 00000000000a0000 (reserved)
[ 0.000000] BIOS-e820: 00000000000f0000 – 0000000000100000 (reserved)
[ 0.000000] BIOS-e820: 0000000000100000 – 000000003fffd000 (usable)
タイトルとURLをコピーしました