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 ",".
-k Display kernel messages (equivalent to "-f kern")
-u Display user space messages (equivalent to "-f user")
-x Display level and facility
-d Display the time elapsed since the last message.
-e Display the message display time and the elapsed time between messages (indicated by "-d") in an easy-to-read format
-T Display the message at the time it was output (note that this will be inaccurate if suspend/resume is used)
-t Do not display time
-H Display in an easy-to-read style
-r isplay messages without processing them.
-L Display with color
-w Wait for the kernel to output a new message (press [Ctrl] + [C] to exit).
-F [file] Display the specified file instead of the buffer
-S Display using syslog
-C Clear the buffer (only available for root user)
-c Output and clear the ring buffer (only available for root user)
-D Disable output to console (only available to root user)
-E Enable 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をコピーしました