Linux command for hardware information under dmidecode

dmidecode get information about the hardware in the Linux system. dmidecode follow SMBIOS / DMI standard, in a machine-readable way to dump the DMI (Desktop Management Interface) information, the output information includes BIOS, System, board, processor, memory, cache and the like, this may be obtained configuration, you can also get a maximum configuration supported by the system, such as the maximum number of support such as memory.
The following test due to test on a virtual machine, so it looks like it would be more strange

1, view the number of memory slot, insert the memory slot, the size is the number

# dmidecode | grep -P -A5 "Memory\s+Device" | grep Size | grep -v Range | grep -v No
Size: 4096 MB

2, view the number of maximum memory support

# dmidecode | grep -P 'Maximum\s+Capacity'
Maximum Capacity: 65 GB

3. Check the memory slot rate, no plug is unknown.

# dmidecode | grep -A16 'Memory Device' | grep Speed
Speed: Unknown
Speed: Unknown
Speed: Unknown
Speed: Unknown

1. The simplest display all dmi information:

# dmidecode

This will put all dmi information, you might be frightened a lot of information, you can usually use the following method.

2. A more streamlined information display:

# dmidecode  -q

-q (-quite) displaying only the necessary information.

3. Display the specified types of information:
I usually want to see only certain types of information such as CPU, memory or disk but not all. This can be -t (-type TYPE) to specify the types of information:

# dmidecode  -t bios
# dmidecode 2.11
SMBIOS 2.7 present.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
	Vendor: Phoenix Technologies LTD
	Version: 6.00
	Release Date: 07/29/2019
	Address: 0xEA480
	Runtime Size: 88960 bytes
	ROM Size: 64 kB
	Characteristics:
		ISA is supported
		PCI is supported
		PC Card (PCMCIA) is supported
		PNP is supported
		APM is supported
		BIOS is upgradeable
		BIOS shadowing is allowed
		ESCD support is available
		Boot from CD is supported
		Selectable boot is supported
		EDD is supported
		Print screen service is supported (int 5h)
		8042 keyboard services are supported (int 9h)
		Serial services are supported (int 14h)
		Printer services are supported (int 17h)
		CGA/mono video services are supported (int 10h)
		ACPI is supported
		Smart battery is supported
		BIOS boot specification is supported
		Function key-initiated network boot is supported
		Targeted content distribution is supported
	BIOS Revision: 4.6
	Firmware Revision: 0.0


? dmidecode in the end support which type
of these can be seen in the man dmidecode inside:
Text parameter support:
the BIOS, System, Baseboard, The chassis, Processor, Memory, Cache, Connector, slot
numeric parameter supports many :( see Appendix)

4. Review by keyword information:
for example, only want to see the serial number, you can use:

# dmidecode -s system-serial-number
VMware-56 4d fa b6 c0 ae c7 64-56 ab b0 6f 58 b2 2f b2

-s (-string keyword) supports keyword include:

  bios-vendor
  bios-version
  bios-release-date
  system-manufacturer
  system-product-name
  system-version
  system-serial-number
  system-uuid
  baseboard-manufacturer
  baseboard-product-name
  baseboard-version
  baseboard-serial-number
  baseboard-asset-tag
  chassis-manufacturer
  chassis-type
  chassis-version
  chassis-serial-number
  chassis-asset-tag
  processor-family
  processor-manufacturer
  processor-version
  processor-frequency

5. Example
5.1 to view the current memory and the maximum memory supported
under Linux, you can use free or view meminfo to get the current physical memory:

# free
             total       used       free     shared    buffers     cached
Mem:       3908800     859280    3049520          0      95788     369472
-/+ buffers/cache:     394020    3514780
Swap:      2097144          0    2097144
# grep MemTotal /proc/meminfo 
MemTotal:        3908800 kB

This shows the current server's physical memory is 8GB.
Virtual machines can be extended in the end to how much memory?

# dmidecode -t 16
# dmidecode 2.11
SMBIOS 2.7 present.

Handle 0x01A2, DMI type 16, 23 bytes
Physical Memory Array
	Location: System Board Or Motherboard
	Use: System Memory
	Error Correction Type: None
	Maximum Capacity: 65 GB
	Error Information Handle: Not Provided
	Number Of Devices: 64

Appendix:
dmidecode supported digital parameters:
Type Information
Here Insert Picture DescriptionHere Insert Picture Description

Published 175 original articles · won praise 21 · Views 200,000 +

Guess you like

Origin blog.csdn.net/KgdYsg/article/details/104412742