linux 命令之 dmidecode-yjbjingcha-可控制转速CSS3旋转风车特效

Dmidecode 这款软件同意你在 Linux 系统下获取有关硬件方面的信息。Dmidecode 遵循 SMBIOS/DMI 标准。其输出的信息包含 BIOS、系统、主板、处理器、内存、缓存等等。

  • Dmidecode简单介绍
    DMI (Desktop Management Interface, DMI)就是帮助收集电脑系统信息的管理系统,DMI信息的收集必须在严格遵照SMBIOS规范的前提下进行。 SMBIOS(System Management BIOS)是主板或系统制造者以标准格式显示产品管理信息所需遵循的统一规范。 SMBIOS和DMI是由行业指导机构Desktop Management Task Force (DMTF)起草的开放性的技术标准,当中DMI设计适用于不论什么的平台和操作系统。
    DMI充当了管理工具和系统层之间接口的角色。它建立了标准的可管理系统更加方便了电脑厂商和用户对系统的了解。DMI的主要组成部分是Management Information Format (MIF)数据库。 这个数据库包含了全部有关电脑系统和配件的信息。通过DMI,用户能够获取序列号、电脑厂商、串口信息以及其他系统配件信息。
    dmidecode的输出格式一般例如以下:
    Handle 0×0002 DMI type 2, 8 bytes Base Board Information Manufacturer:Intel Product Name: C440GX+ Version: 727281-0001 Serial Number: INCY92700942
    当中的前三行都称为记录头(recoce Header), 当中包含了:
    recode id(handle): DMI表中的记录标识符。这是唯一的,比方上例中的Handle 0×0002。
    dmi type id: 记录的类型,譬如说:BIOS,Memory。上例是type 2,即”Base Board Information”
    recode size: DMI表中相应记录的大小,上例为8 bytes.(不包含文本信息。全部实际输出的内容比这个size要更大。 )记录头之后就是记录的值
    decoded values: 记录值能够是多行的,比方上例显示了主板的制造商(manufacturer)、model、version以及serial Number。
  • Dmidecode的作用
    dmidecode的作用是将DMI数据库中的信息解码。以可读的文本方式显示。 因为DMI信息能够人为改动,因此里面的信息不一定是系统准确的信息。
  • 安装Dmidecode
    Dmidecode 在主流的 Linux 发行版中都能够找到。仅仅需通过所用发行版的包管理器安装就可以。如:
apt-<span class="hljs-keyword">get</span> install dmidecode
  • dmidecode命令使用方法
    不带选项运行 dmidecode 一般会输出全部的硬件信息。 Dmidecode 有个非常实用的选项 -t,能够按指定类型输出相关信息。假如要获得处理器方面的信息。则能够运行
    dmidecode -t processor
    输出:

SMBIOS 2.6 present.

Handle 0x0004, DMI type 4, 40 bytes
Processor Information
Socket Designation: CPU 1
Type: Central Processor
Family: Xeon
Manufacturer: Intel
ID: A5 06 01 00 FF FB EB BF
Signature: Type 0, Family 6, Model 26, Stepping 5
Flags:
FPU (Floating-point unit on-chip)
VME (Virtual mode extension)
DE (Debugging extension)

Usage: dmidecode [OPTIONS]
Options are:
-d, --dev-mem <span class="hljs-keyword">FILE</span> <span class="hljs-keyword">Read</span> memory from device <span class="hljs-keyword">FILE</span> (<span class="hljs-keyword">default</span>: /dev/mem)
&#x4ECE;&#x8BBE;&#x5907;&#x6587;&#x4EF6;&#x8BFB;&#x4FE1;&#x606F;&#xFF0C;&#x8F93;&#x51FA;&#x5185;&#x5BB9;&#x4E0E;&#x4E0D;&#x52A0;&#x53C3;&#x6570;&#x6807;&#x51C6;&#x8F93;&#x51FA;&#x540C;&#x6837;
-h, --help Display this help text <span class="hljs-keyword">and</span> <span class="hljs-keyword">exit</span>
&#x663E;&#x793A;&#x5E2E;&#x52A9;&#x4FE1;&#x606F;
-q, --quiet Less verbose output
&#x663E;&#x793A;&#x66F4;&#x5C11;&#x7684;&#x7B80;&#x5316;&#x4FE1;&#x606F;
-s, --<span class="hljs-keyword">string</span> KEYWORD Only display the value <span class="hljs-keyword">of</span> the given DMI <span class="hljs-keyword">string</span>
&#x4EC5;&#x4EC5;&#x663E;&#x793A;&#x6307;&#x5B9A;DMI&#x5B57;&#x7B26;&#x4E32;&#x7684;&#x4FE1;&#x606F;
-t, --<span class="hljs-keyword">type</span> <span class="hljs-keyword">TYPE</span> Only display the entries <span class="hljs-keyword">of</span> given <span class="hljs-keyword">type</span>
&#x4EC5;&#x4EC5;&#x663E;&#x793A;&#x6307;&#x5B9A;&#x6761;&#x76EE;&#x7684;&#x4FE1;&#x606F;
-u, --dump <span class="hljs-keyword">Do</span> <span class="hljs-keyword">not</span> decode the entries
&#x663E;&#x793A;&#x672A;&#x89E3;&#x7801;&#x7684;&#x539F;&#x59CB;&#x6761;&#x76EE;&#x5185;&#x5BB9;
--dump-bin <span class="hljs-keyword">FILE</span> Dump the DMI data <span class="hljs-keyword">to</span> a binary <span class="hljs-keyword">file</span>
--from-dump <span class="hljs-keyword">FILE</span> <span class="hljs-keyword">Read</span> the DMI data from a binary <span class="hljs-keyword">file</span>
-V, --version Display the version <span class="hljs-keyword">and</span> <span class="hljs-keyword">exit</span>
&#x663E;&#x793A;&#x7248;&#x672C;&#x53F7;&#x4FE1;&#x606F;
  • dmidecode參数string及type列表
    (1)Valid string keywords are:
bios<span class="hljs-attribute">-vendor</span>
bios<span class="hljs-attribute">-version</span>
bios<span class="hljs-attribute">-release</span><span class="hljs-attribute">-date</span>
system<span class="hljs-attribute">-manufacturer</span>
system<span class="hljs-attribute">-product</span><span class="hljs-attribute">-name</span>
system<span class="hljs-attribute">-version</span>
system<span class="hljs-attribute">-serial</span><span class="hljs-attribute">-number</span>
system<span class="hljs-attribute">-uuid</span>
baseboard<span class="hljs-attribute">-manufacturer</span>
baseboard<span class="hljs-attribute">-product</span><span class="hljs-attribute">-name</span>
baseboard<span class="hljs-attribute">-version</span>
baseboard<span class="hljs-attribute">-serial</span><span class="hljs-attribute">-number</span>
baseboard<span class="hljs-attribute">-asset</span><span class="hljs-attribute">-tag</span>
chassis<span class="hljs-attribute">-manufacturer</span>
chassis<span class="hljs-attribute">-type</span>
chassis<span class="hljs-attribute">-version</span>
chassis<span class="hljs-attribute">-serial</span><span class="hljs-attribute">-number</span>
chassis<span class="hljs-attribute">-asset</span><span class="hljs-attribute">-tag</span>
processor<span class="hljs-attribute">-family</span>
processor<span class="hljs-attribute">-manufacturer</span>
processor<span class="hljs-attribute">-version</span>
processor<span class="hljs-attribute">-frequency</span>

(2)Valid type keywords are:

bios
<span class="hljs-keyword">system</span>
baseboard
chassis
processor
<span class="hljs-keyword">memory</span>
Cache
connector
slot

(3)type全部编码列表

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

演示样例:

&#x67E5;&#x770B;server&#x578B;&#x53F7;&#xFF1A;dmidecode <span class="hljs-subst">|</span> grep <span class="hljs-string">'Product Name'</span>
&#x67E5;&#x770B;&#x4E3B;&#x677F;&#x7684;&#x5E8F;&#x5217;&#x53F7;&#xFF1A;dmidecode <span class="hljs-subst">|</span>grep <span class="hljs-string">'Serial Number'</span>
&#x67E5;&#x770B;&#x7CFB;&#x7EDF;&#x5E8F;&#x5217;&#x53F7;&#xFF1A;dmidecode <span class="hljs-attribute">-s</span> system<span class="hljs-attribute">-serial</span><span class="hljs-attribute">-number</span>
&#x67E5;&#x770B;&#x5185;&#x5B58;&#x4FE1;&#x606F;&#xFF1A;dmidecode <span class="hljs-attribute">-t</span> memory
&#x67E5;&#x770B;OEM&#x4FE1;&#x606F;&#xFF1A;dmidecode <span class="hljs-attribute">-t</span> <span class="hljs-number">11</span>

Original: https://www.cnblogs.com/yjbjingcha/p/8618262.html
Author: roucheng
Title: linux 命令之 dmidecode-yjbjingcha-可控制转速CSS3旋转风车特效

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/8614/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

发表回复

登录后才能评论
免费咨询
免费咨询
扫码关注
扫码关注
联系站长

站长Johngo!

大数据和算法重度研究者!

持续产出大数据、算法、LeetCode干货,以及业界好资源!

2022012703491714

微信来撩,免费咨询:xiaozhu_tec

分享本页
返回顶部