【微知】服务器如何获取服务器的SN序列号信息?(dmidecode -t 1)

发布于:2025-04-21 ⋅ 阅读:(82) ⋅ 点赞:(0)

背景

各种场景都需要获取服务器的SN(Serial Number),比如问题定位,文件命名,该部分信息在dmi中是标准信息,不同服务器,不同os都能用相同方式获取SN信息。本文记录快速获取SN的方式。

在“dmidecode”中,DMI是“Desktop Management Interface”的缩写,即桌面管理接口。
DMI是一种基于SMBIOS(System Management BIOS)的标准,它提供了一种在计算机系统中访问和管理硬件信息的方法。通过DMI,系统管理员和用户可以获取有关计算机硬件组件的详细信息,如处理器、内存、硬盘、主板、显卡等的规格、型号、序列号等。dmidecode工具就是利用DMI标准来获取并解码这些信息,以人类可读的格式呈现给用户,方便用户了解计算机硬件的配置情况。

命令

dmidecode -t 1

或者:
dmidecode -t system

实操:
在这里插入图片描述

dmidecode -t的数字代表的字段

0 bios
1 system

DMI TYPES
       The SMBIOS specification defines the following DMI types:

       Type   Information
       ────────────────────────────────────────────
          0   BIOS
          1   System

          2   Baseboard
          3   Chassis
          4   Processor
          5   Memory Controller
          6   Memory Module
          7   Cache
          8   Port Connector
          9   System Slots
         10   On Board Devices
         11   OEM Strings
         12   System Configuration Options
         13   BIOS Language
         14   Group Associations
         15   System Event Log
         16   Physical Memory Array
         17   Memory Device
         18   32-bit Memory Error
         19   Memory Array Mapped Address
         20   Memory Device Mapped Address
         21   Built-in Pointing Device
         22   Portable Battery
         23   System Reset
         24   Hardware Security
         25   System Power Controls
         26   Voltage Probe
         27   Cooling Device
         23   System Reset
         24   Hardware Security
         25   System Power Controls
         26   Voltage Probe
         27   Cooling Device
         28   Temperature Probe
         29   Electrical Current Probe
         30   Out-of-band Remote Access
         31   Boot Integrity Services
         32   System Boot
         33   64-bit Memory Error
         34   Management Device
         35   Management Device Component
         36   Management Device Threshold Data
         37   Memory Channel
         38   IPMI Device
         39   Power Supply
         40   Additional Information
         41   Onboard Devices Extended Information
         42   Management Controller Host Interface

网站公告

今日签到

点亮在社区的每一天
去签到