当前位置 主页 > 服务器问题 > Linux/apache问题 >

    Linux查看服务器硬件信息的方法步骤

    栏目:Linux/apache问题 时间:2019-12-17 09:17

    Hi,大家好;今天是双12,大家剁手了没。今天给大家带来的是《Linux查看服务器上的硬件信息》本篇文章的示例全部是在服务器(Inspur SA5112M4)上实现的,有些命令在虚拟机上达不到效果

    查看服务器型号、序列号

    root@zhangdaifu# dmidecode -s system-serial-number
    root@zhangdaifu# dmidecode -t system | grep -i 'serial number'
       Serial Number: 818123456
    root@zhangdaifu# dmidecode -t system | grep -i 'System information' -A9 | egrep -i 'manufacturer|product|sial'
      Manufacturer: Inspur
      Product Name: SA5112M4
    

    查看主板型号

    root@zhangdaifu# dmidecode | grep -i -A16 'System information$'
    System Information
      Manufacturer: Inspur
      Product Name: SA5112M4
      Version: 01
      Serial Number: 818123456
      UUID: 7A61462A-D45E-11E8-8FB4-013865DCAE00
      Wake-up Type: Power Switch
      SKU Number: Default string
      Family: Default string
    
    Handle 0x0002, DMI type 2, 15 bytes
    Base Board Information
      Manufacturer: Inspur
      Product Name: YZMB-00370-102
      Version: SA5112M4
      Serial Number: MBJ824S20187B70
      Asset Tag: 818123456
    
    

    查看BIOS信息

    root@zhangdaifu# dmidecode 3.0
    Getting SMBIOS data from sysfs.
    SMBIOS 3.0 present.
    
    Handle 0x0000, DMI type 0, 24 bytes
    BIOS Information
      Vendor: American Megatrends Inc.
      Version: 4.1.16
      Release Date: 06/21/2018
      Address: 0xF0000
      Runtime Size: 64 kB
      ROM Size: 8192 kB
      Characteristics:
       PCI is supported
       BIOS is upgradeable
       BIOS shadowing is allowed
       Boot from CD is supported
       Selectable boot is supported
       BIOS ROM is socketed
       EDD is supported
       5.25"/1.2 MB floppy services are supported (int 13h)
       3.5"/720 kB floppy services are supported (int 13h)
       3.5"/2.88 MB floppy services are supported (int 13h)
       Print screen service is supported (int 5h)
       Serial services are supported (int 14h)
       Printer services are supported (int 17h)
       ACPI is supported
       USB legacy is supported
       BIOS boot specification is supported
       Targeted content distribution is supported
       UEFI is supported
      BIOS Revision: 5.6
    
    Handle 0x006F, DMI type 13, 22 bytes
    BIOS Language Information
      Language Description Format: Long
      Installable Languages: 1
       en|US|iso8859-1
      Currently Installed Language: en|US|iso8859-1
    
    

    查看pci信息,即主板所有硬件槽信息

    root@zhangdaifu# lspci | head -10
    00:00.0 Host bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D DMI2 (rev 01)
    00:01.0 PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI Express Root Port 1 (rev 01)
    00:01.1 PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI Express Root Port 1 (rev 01)
    00:02.0 PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI Express Root Port 2 (rev 01)
    00:02.2 PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI Express Root Port 2 (rev 01)
    00:03.0 PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI Express Root Port 3 (rev 01)
    00:03.2 PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI Express Root Port 3 (rev 01)
    00:04.0 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Crystal Beach DMA Channel 0 (rev 01)
    00:04.1 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Crystal Beach DMA Channel 1 (rev 01)
    00:04.2 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Crystal Beach DMA Channel 2 (rev 01)