Linux 从命令行检查 BIOS 设置
我想从 Linux 命令行本身查看 BIOS 设置。我想避免停机。是否可以在不重新启动服务器的情况下查看 BIOS 设置?
您可以使用 biosdecode 和 dmidecode 命令从 CLI 获取 BIOS 设置。biosdecode 命令解析 BIOS 内存并打印有关所有结构的信息。dmidecode 是一个命令行工具,用于以人性化格式转储计算机的 DMI(SMBIOS)表内容。该表包含系统硬件组件的描述。它还包括其他有用信息,例如序列号和 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 解码器)
# biosdecode
”。另一个选项是运行:
您还可以使用 hwinfo 等命令。它用于探测系统中存在的硬件。它可用于生成系统概览日志,稍后可用于支持。
示例输出:
# hwinfo
# hwinfo --short
# hwinfo --disk
# hwinfo --short --block
# hwinfo --disk --only /dev/sdb