Linux DMESG command parameters and usage details (Linux display boot information command)

Source: Internet
Author: User
Tags nfsd ssdt dmesg

function Description: Displays the boot information.

syntax:dMESG [-cn][-s < buffer size;]

Additional Note:the kernel will store the boot information in ring buffer. If you are too late to view the information, you can use DMESG to view it. The boot information is also stored in the/var/log directory, in the file named DMESG.

Parameters
-C Clears the contents of the ring buffer after displaying the information.
-s< buffer size > pre-set to 8196, just equal to the size of the ring buffer.
-N Sets the level of logging information.

Extended read one: DMESG command main purpose

Main applications:

DMESG is used to display the kernel ring buffer (kernel-ring buffer) content, and the kernel stores various messages here. At system boot time, the kernel fills in this buffer with information 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 common to use the pipe to view the output of DMESG through less or grep , which makes it easier to find unknown origin information. For example, if you find that your hard disk is performing poorly, you can use DMESG to check that they are running in DMA mode:

$DMESG | grep DMA
...
IDe0:bm-dma at 0xf000-0xf007, BIOS setTings:hda:DMA, HDB:DMA
IDE1:BM-DMA at 0xf008-0xf00f, BIOS Settings:hdc:DMA, Hdd:D ma
...

The above lines indicate what mode each IDE device is running in. If there is a problem with the Ethernet connection, you can search for the ETH in the DMESG log:

$DMESG | grep ETH
Forcedeth.c:reverse Engineered NForce
Ethernet driver. Version 0.49.
ETH0:FORCEDETH.C: subsystem:0147b:1c00
Bound to 0000:00:04.0
Eth0:no IPV6 Routers present

If everything is OK, then DMESG displays the hardware configuration information for each NIC. If a system service fails to be properly configured, the DMESG log quickly fills up with error messages, which is a good starting point for diagnosing failures.

It can also be used to detect the loading of system kernel modules, such as to detect ACPI loading, using DMESG | grep acpI

DMESG | egrep -i "(APM|ACPI)"

Kernel command line:vga=274 quiet Console=ttys3,9600acpi=no-idleoot=/dev/hda3

Acpi:core Subsystem version [20010208]

Acpi:subsystem EnableD

Acpi:system firmWare SUPPORTS:C2

Acpi:plvl2lat=99 plvl3lat=1001

ACPI:C2 enter=1417 C2 exit=354

ACPI:C3 enter=-1 C3 Exit=-1

Acpi:not using ACPI Idle

Acpi:system firmware supports:s0 S1 S4 S5

Extended read two: DMESG command use Example

Use example one to send a message to the boot man DMESG wrote the program helps users to print out their bootup messages. Instead of copying the messages by hand, the user need only:
DMESG > Boot.messages
and Mail The Boot.messagesfileToW.H.O.Ever can debug their problem.

[Email protected] ~]# DMESG >boot.messages

[[email protected] ~]# ls -l boot.messages
-rw-r--r--1 root root 15838 12-09 begin_of_the_skype_highlighting 15838 12-09 free End_of_the_sk ype_highlighting:55 boot.messages

[Email protected] ~]# mail-s "Boot Log of Linux Server" [email protected] <boot.messages
[Email protected] ~]#

Example two browsing DMESG output information

[[email protected] ~]# uname -A
Linux new55 2.6.18-194.el5 #1 SMP Tue Mar 21:52:43 EDT all i686 i686 i386 gnu/linux

[Email protected] ~]# DMESG | Less
Linux version 2.6.18-194.el5 ([email protected]) (GCC version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Tue Mar 16 21:52:4 3 EDT 2010
bios-provided Physical RAM Map:
BIOS-E820:0000000000010000-000000000009FC00 (usable)
bios-e820:000000000009fc00-00000000000a0000 (Reserved)
bios-e820:00000000000e0000-0000000000100000 (Reserved)
bios-e820:0000000000100000-000000001f7d0000 (usable)
BIOS-E820:000000001F7D0000-000000001F7EFC00 (Reserved)
bios-e820:000000001f7efc00-000000001f7fb000 (ACPI NVS)
bios-e820:000000001f7fb000-000000001f800000 (Reserved)
bios-e820:00000000e0000000-00000000f0000000 (Reserved)
bios-e820:00000000fec00000-00000000fec02000 (Reserved)
bios-e820:00000000fed20000-00000000fed9b000 (Reserved)
bios-e820:00000000feda0000-00000000fedc0000 (Reserved)
bios-e820:00000000ffb00000-00000000ffc00000 (Reserved)
bios-e820:00000000fff00000-0000000100000000 (Reserved)
0MB Highmem available.
503MB Lowmem available.
Memory for crash kernel (0x0 to 0x0) Notwithin permissible range
disabling KduMp
Using x86 segment limits to approximate NX protection
On Node 0 totalpages:128976
DMA zone:4096 pages, LIFO batch:0
Normal zone:124880 pages, LIFO batch:31
DMI 2.3 present.
Using APIC Driver Default
ACPI:RSDP (v000 HP) @ 0x000fe270
ACPI:RSDT (v001 hp 30c4 0x31100620 hp 0x00000001) @ 0x1f7efc84
Acpi:fadt (v002 hp 30c4 0x00000002 hp 0x00000001) @ 0x1f7efc00
Acpi:madt (v001 hp 30c4 0x00000001 hp 0x00000001) @ 0x1f7efcb8
Acpi:mcfg (v001 hp 30c4 0x00000001 hp 0x00000001) @ 0X1F7EFD14
ACPI:SSDT (v001 HP hpqppc 0x00001001 MSFT 0x0100000e) @ 0x1f7f6698
ACPI:DSDT (v001 HP DAU00 0x00010000 MSFT 0x0100000e) @ 0x00000000
Acpi:pm-timer IO port:0x1008
Acpi:local APIC Address 0xfec01000
Acpi:lapic (acpi_id[0x01] lapic_id[0x00] enabled)
Processor #0 6:13 APIC version 20
Acpi:lapic_nmi (acpi_id[0x01] high edge lint[0x1])
Acpi:ioapic (id[0x01] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 1, version, address 0xfec00000, GSI 0-23
:

Example three view DMESG tail information

[Email protected] ~]# DMESG | Tail
Bluetooth:l2cap ver 2.8
Bluetooth:l2cap Socket Layer Initialized
Bluetooth:rfcomm Socket Layer Initialized
Bluetooth:rfcomm TTY layer Initialized
Bluetooth:rfcomm ver 1.8
BLUETOOTH:HIDP (Human Interface Emulation) ver 1.1
Eth0:no IPV6 Routers present
Installing KNFSD (Copyright (C) 1996 [email protected]).
Nfsd:using/var/lib/nfs/v4recovery as the NFSV4 statE Recovery directory
Nfsd:starting 90-second grace period
[Email protected] ~]#

Example four kernel logs when installing the SS7 card driver

[Email protected] ss7dpkLNx]#CDss7hd_driver/
[[email protected] ss7hd_driver]# ls
Bbdddlnx_iss.h bbd_hbi.h bbd_ioc.c bbd_isr.c bbd_pci.c bsd_license.txt gpl_v2-only_license.txt install_ss7hd.sh Ma Kefile26
Bbd_def.h bbd_hs.c bbd_ioc.h bbd_lnx.c bbd_pro.h build_ss7hd.sh i21555.h Makefile24
[Email protected] ss7hd_driver]#./build_ss7hd.sh
make:entering directory '/usr/src/kernels/2.6.9-22.el-i686 '
CC [M]/root/Setup/ss7dpklnx/ss7hd_driver/bbd_hs.o
CC [M]/root/setup/ss7dpklnx/ss7hd_driver/bbd_ioc.o
CC [M]/root/setup/ss7dpklnx/ss7hd_driver/bbd_isr.o
CC [M]/root/setup/ss7dpklnx/ss7hd_driver/bbd_pci.o
CC [M]/root/setup/ss7dpklnx/ss7hd_driver/bbd_lnx.o
LD [M]/root/setup/ss7dpklnx/ss7hd_driver/ss7hddvr26.o
Building modules, Stage 2.
Modpost
cc/root/setup/ss7dpklnx/ss7hd_driver/ss7hddvr26.mod.o
LD [M]/root/setup/ss7dpklnx/ss7hd_driver/ss7hddvr26.ko
make:leaving directory '/usr/src/kernels/2.6.9-22.el-i686 ' http://www.linuxso.com/command/dmesg.html

[Email protected] ss7hd_driver]#./install_ss7hd.sh
[Email protected] ss7hd_driver]#Lsmod| grep SS7
Ss7hddvr26 25808 0
[Email protected] ss7hd_driver]# DMESG | Tail
ACPI:PCI interrupt 0000:02:0d.0[?)-GSI 9 (level, low), IRQ 9
Bbd[0] 64bit
SS7HD[0]-Suspend


Dialogic SS7HD Device Driver V100.00 (Source V1.21)
Copyright (C) Dialogic Corporation 2003-2010. All Rights Reserved
Using major device number 251.
ACPI:PCI interrupt 0000:02:0d.0[?)-GSI 9 (level, low), IRQ 9
Bbd[0] 64bit
[Email protected] ss7hd_driver]#/install_ss7hd.sh Remove
[Email protected] ss7hd_driver]# Lsmod | grep SS7
[Email protected] ss7hd_driver]# DMESG | Tail
Bbd[0] 64bit
SS7HD[0]-Suspend


Dialogic SS7HD Device Driver V100.00 (Source V1.21)
Copyright (C) Dialogic Corporation 2003-2010. All Rights Reserved
Using major device number 251.
ACPI:PCI interrupt 0000:02:0d.0[?)-GSI 9 (level, low), IRQ 9
Bbd[0] 64bit
SS7HD[0]-Suspend
[Email protected] ss7hd_driver]#

Example five printing and clearing the kernel ring buffer

[Email protected] ~]# dmesg-c
Linux version 2.6.18-194.el5 ([email protected]) (GCC version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Tue Mar 16 21:52:4 3 EDT 2010
bios-provided Physical RAM Map:
BIOS-E820:0000000000010000-000000000009FC00 (usable)
bios-e820:000000000009fc00-00000000000a0000 (Reserved)
bios-e820:00000000000e0000-0000000000100000 (Reserved)
bios-e820:0000000000100000-000000001f7d0000 (usable)
BIOS-E820:000000001F7D0000-000000001F7EFC00 (Reserved)
bios-e820:000000001f7efc00-000000001f7fb000 (ACPI NVS)
bios-e820:000000001f7fb000-000000001f800000 (Reserved)
bios-e820:00000000e0000000-00000000f0000000 (Reserved)
bios-e820:00000000fec00000-00000000fec02000 (Reserved)
bios-e820:00000000fed20000-00000000fed9b000 (Reserved)
bios-e820:00000000feda0000-00000000fedc0000 (Reserved)
bios-e820:00000000ffb00000-00000000ffc00000 (Reserved)
bios-e820:00000000fff00000-0000000100000000 (Reserved)
0MB Highmem available.
503MB Lowmem available.
Memory for crash kernel (0x0 to 0x0) Notwithin permissible range
disabling KDump
Using x86 segment limits to approximate NX protection
On Node 0 totalpages:128976
DMA zone:4096 pages, LIFO batch:0
Normal zone:124880 pages, LIFO batch:31
DMI 2.3 present.

Omit output

BLUETOOTH:HIDP (Human Interface Emulation) ver 1.1
Eth0:no IPV6 Routers present
Installing KNFSD (Copyright (C) 1996 [email protected]).
Nfsd:using/var/lib/nfs/v4recovery as the NFSV4 State recovery Directory
Nfsd:starting 90-second grace period
[Email protected] ~]# DMESG

[Email protected] ~]# LESS/VAR/LOG/DMESG
Linux version 2.6.18-194.el5 ([email protected]) (GCC version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Tue Mar 16 21:52:4 3 EDT 2010
bios-provided Physical RAM Map:
BIOS-E820:0000000000010000-000000000009FC00 (usable)
bios-e820:000000000009fc00-00000000000a0000 (Reserved)
bios-e820:00000000000e0000-0000000000100000 (Reserved)
bios-e820:0000000000100000-000000001f7d0000 (usable)
BIOS-E820:000000001F7D0000-000000001F7EFC00 (Reserved)
bios-e820:000000001f7efc00-000000001f7fb000 (ACPI NVS)
bios-e820:000000001f7fb000-000000001f800000 (Reserved)
bios-e820:00000000e0000000-00000000f0000000 (Reserved)
bios-e820:00000000fec00000-00000000fec02000 (Reserved)
bios-e820:00000000fed20000-00000000fed9b000 (Reserved)
bios-e820:00000000feda0000-00000000fedc0000 (Reserved)
bios-e820:00000000ffb00000-00000000ffc00000 (Reserved)
bios-e820:00000000fff00000-0000000100000000 (Reserved)
0MB Highmem available.
503MB Lowmem available.
Memory for crash kernel (0x0 to 0x0) Notwithin permissible range
disabling Kdump
Using x86 segment limits to approximate NX protection
On Node 0 totalpages:128976
DMA zone:4096 pages, LIFO batch:0
Normal zone:124880 pages, LIFO batch:31
DMI 2.3 present.
Using APIC Driver Default
ACPI:RSDP (v000 HP) @ 0x000fe270
ACPI:RSDT (v001 hp 30c4 0x31100620 hp 0x00000001) @ 0x1f7efc84
Acpi:fadt (v002 hp 30c4 0x00000002 hp 0x00000001) @ 0x1f7efc00
Acpi:madt (v001 hp 30c4 0x00000001 hp 0x00000001) @ 0x1f7efcb8
Acpi:mcfg (v001 hp 30c4 0x00000001 hp 0x00000001) @ 0X1F7EFD14
ACPI:SSDT (v001 HP hpqppc 0x00001001 MSFT 0x0100000e) @ 0x1f7f6698
ACPI:DSDT (v001 HP DAU00 0x00010000 MSFT 0x0100000e) @ 0x00000000
Acpi:pm-timer IO port:0x1008
Acpi:local APIC Address 0xfec01000
Acpi:lapic (acpi_id[0x01] lapic_id[0x00] enabled)
Processor #0 6:13 APIC version 20
Acpi:lapic_nmi (acpi_id[0x01] high edge lint[0x1])
Acpi:ioapic (id[0x01] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 1, version, address 0xfec00000, GSI 0-23
[Email protected] ~]#

Http://www.linuxso.com/command/dmesg.html

Linux DMESG command parameters and usage details (Linux display boot information command)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.