Linux从命令行检查BIOS设置

时间:2020-01-09 10:41:18  来源:igfitidea点击:

如何从Linux命令行本身查看BIOS设置。
如何避免停机查看BIOS设置。
是否可以在不重新引导服务器的情况下查看BIOS设置?
您可以使用biosdecode和dmidecode命令从CLI获取BIOS设置。

biosdecode命令解析BIOS内存并打印有关所有结构的信息。

dmidecode是用于以人类可读格式转储计算机DMI(SMBIOS)表内容的命令行工具。
下表包含系统硬件组件的说明。
它还包括其他有用的信息,例如序列号和BIOS版本。

如何在Linux上的命令行中查看BIOS设置

打开终端应用程序。
您必须以root用户身份登录才能运行命令:

$ sudo -i

或者

$ su 

执行以下命令:

# dmidecode | more

输出示例:

#  dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.
66 structures occupying 3170 bytes.
Table at 0x000E0840.
 
Handle 0x0000, DMI type 222, 14 bytes
OEM-specific Type
	Header and Data:
		DE 0E 00 00 01 99 00 03 10 01 20 02 30 03
	Strings:
		Memory Init Complete
		End of DXE Phase
		BIOS Boot Complete
 
Handle 0x0001, DMI type 14, 8 bytes
Group Associations
	Name: Intel(R) Silicon View Technology
	Items: 1
		0x0000 (OEM-specific)
 
Handle 0x0002, DMI type 7, 19 bytes
Cache Information
	Socket Designation: L1 Cache
	Configuration: Enabled, Not Socketed, Level 1
	Operational Mode: Write Back
	Location: Internal
	Installed Size: 32 kB
	Maximum Size: 32 kB
	Supported SRAM Types:
		Synchronous
	Installed SRAM Type: Synchronous
	Speed: Unknown
	Error Correction Type: Parity
	System Type: Data
	Associativity: 8-way Set-associative
 
Handle 0x0003, DMI type 4, 42 bytes
Processor Information
	Socket Designation: U3E1
	Type: Central Processor
	Family: Xeon
	Manufacturer: Intel(R) Corporation
	ID: 71 06 04 00 FF FB EB BF
	Signature: Type 0, Family 6, Model 71, Stepping 1
	Flags:
		FPU (Floating-point unit on-chip)
		VME (Virtual mode extension)
		DE (Debugging extension)
		PSE (Page size extension)
		TSC (Time stamp counter)
		MSR (Model specific registers)
		PAE (Physical address extension)
		MCE (Machine check exception)
		CX8 (CMPXCHG8 instruction supported)
		APIC (On-chip APIC hardware supported)
....
..
Handle 0x0042, DMI type 14, 20 bytes
Group Associations
	Name: Firmware Version Info
	Items: 5
		0x003D (OEM-specific)
		0x003E (OEM-specific)
		0x003F (OEM-specific)
		0x0040 (OEM-specific)
		0x0041 (OEM-specific)
 
Handle 0x0043, DMI type 1, 27 bytes
System Information
	Manufacturer: CompuLab
	Product Name: sbc-msh
	Version: 1.1
	Serial Number: XXXXXXXXX
	UUID: 4F4141C0-6999-4157-8F9E-701A0C76F018
	Wake-up Type: Other
	SKU Number: NA
	Family: Airtop
 
Handle 0xFEFF, DMI type 127, 4 bytes
End Of Table

有关更多信息,请参阅在不打开机箱的情况下从shell获取有关BIOS /服务器硬件的信息(BIOS Decoder)。
另一种选择是运行:

# biosdecode

您也可以使用命令诸如hwinfo。
它用于探测系统中存在的硬件。
它可用于生成系统概述日志,以后可用于支持。

# hwinfo
# hwinfo --short
# hwinfo --disk
# hwinfo --short --block
# hwinfo --disk --only /dev/sdb