本文为大家介绍linux dm命令(linux dm-0),下面和小编一起看看详细内容吧。
众所周知,linux系统中dmidecode命令的主要作用是获取硬件信息,包括内存、cpu、主板、系统等。如果没有dmidecode命令,就只能去机房查看服务器的型号了。 dmidecode命令可以帮助我们实现跨区域查询。下面小编将详细介绍dmidecode命令在linux系统中的使用方法。
一、dmidecode简介
dmi(desktop management interface,dmi)是一个帮助收集计算机系统信息的管理系统。 dmi信息的收集必须在严格遵守smbios规范的前提下进行。 smbios(system management bios)是主板或系统制造商必须遵循的统一规范,以标准格式显示产品管理信息。 smbios和dmi是由行业指导组织desktop management task force(dmtf)起草的开放技术标准,dmi设计适用于任何平台和操作系统。
dmi 充当管理工具和系统层之间的接口。它建立了一个标准的可管理系统,更便于计算机制造商和用户了解系统。 dmi 的主要组件是管理信息格式(mif) 数据库。该数据库包括有关计算机系统和附件的所有信息。通过dmi,用户可以获得序列号、电脑厂商、串口信息等系统配件信息。
dmidecode的输出格式一般如下:
handle 0 0002 dmi type 2, 8 bytes 基板信息manufacturer:intel product name: c440gx+ version: 727281-0001 serial number: incy92700942
dmidecode命令
前三行称为记录头(recoce header),其中包括:
recode id(handle):dmi表中的记录标识,唯一,如上例中的handle 0 0002。
dmi type id:记录的类型,例如:bios,memory,上面的例子是type 2,即base board information
recode size:dmi表中对应记录的大小,上例为8字节。 (不包括文本信息,所有实际输出的内容都大于这个大小。)记录头之后是记录的值
decoded values:记录值可以是多行。例如,上面的例子显示了主板的制造商(manufacturer)、型号、版本和序列号。
2.dmidecode的作用
dmidecode的作用是对dmi数据库中的信息进行解码,并以可读的文本显示出来。由于dmi信息可以手动修改,所以里面的信息不一定是系统的准确信息。
3.安装dmidecode
dmidecode在主流的linux发行版中都可以找到,通过所用发行版的包管理器安装即可,例如:
apt-get 安装dmidecode
或者使用官方包安装:
dmidecode源码包下载地址:http://download.savannah.gnu.org/releases/dmidecode/
[页]
4.dmidecode命令用法详解
执行不带选项的dmidecode 通常会输出所有硬件信息。 dmidecode有一个非常有用的选项-t,可以根据指定的类型输出相关信息。如果你想获得有关处理器的信息,你可以执行
dmidecode -t 处理器
输出:
# dmidecode 2.10
存在smbios 2.6。
句柄0x0004,dmi 类型4,40 字节
处理器信息
插槽名称:cpu 1
类型:中央处理器
家庭:至强
制造商:英特尔
编号:a5 06 01 00 ff fb eb bf
签名:type 0, family 6, model 26, stepping 5
标志:
fpu(片上浮点单元)
vme(虚拟模式扩展)
de(调试扩展)
------
用法:dmidecode [选项]
选项是:
-d, --dev-mem file 从设备文件读取内存(默认:/dev/mem)
从设备文件中读取信息,输出与不带参数的标准输出相同
-h, --help 显示此帮助文本并退出
显示帮助信息
-q, --quiet 乐
ss verbose output
显示更少的简化信息
-s, --string keyword only display the value of the given dmi string
只显示指定dmi字符串的信息
-t, --type type only display the entries of given type
只显示指定条目的信息
-u, --dump do not decode the entries
显示未解码的原始条目内容
--dump-bin file dump the dmi data to a binary file
--from-dump file read the dmi data from a binary file
-v, --version display the version and exit
显示版本信息
五、dmidecode参数string及type列表
(1)valid string keywords are:
bios-vendor
bios-version
bios-release-date
system-manufacturer
system-product-name
system-version
system-serial-number
system-uuid
baseboard-manufacturer
baseboard-product-name
baseboard-version
baseboard-serial-number
baseboard-asset-tag
chassis-manufacturer
chassis-type
chassis-version
chassis-serial-number
chassis-asset-tag
processor-family
processor-manufacturer
processor-version
processor-frequency
(2)valid type keywords are:
bios
system
baseboard
chassis
processor
memory
cache
connector
slot
[page]
(3)type全部编码列表
0 bios
1 system
2 base board
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
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 device
六、命令用法示例
查看服务器型号:dmidecode | grep product name
查看主板的序列号:dmidecode |grep serial number
查看系统序列号:dmidecode -s system-serial-number
查看内存信息:dmidecode -t memory
查看oem信息:dmidecode -t 11
关于 dmidecode 的更多用法,你可以通过指定 -h 选项查询。
以上就是linux系统dmidecode命令的用法介绍,更多精彩内容继续关注系统部落官网。
linux kernel(linux系统内核) v5.14.14 最新版 linux kernel是一款最新版linux系统内核,支持32位大文件系统,物理内存最大支持可以达到64gb,同时还增强了对usb及3d加速卡的支持,能够更好进行程序的开发,能够直接提高开发的效率,拥有很强的稳定性和移植性,需要的快来下载吧。
腾讯视频播放器(qqlive) v11.69.9236.0 免费版 腾讯视频播放器(qqlive)是腾讯视频旗下的客户端产品,腾讯视频播放器支持丰富内容在线点播及电视台直播,该软件提供列表管理、视频音量放大、色彩画质调整、自动关机等更强大的功能服务。感兴趣的小伙伴快来下载吧。
迅读pdf大师 v3.1.5.9 官方版 迅读pdf大师是一款功能强大的pdf阅读软件,您可以使用此软件轻松编辑文本、图表、添加图片、去除水印、创建表格,此软件还提供pdf转换功能,能够导出word、excel、ppt等office文件格式。
小智todo v3.2.1.12 最新版 小智todo是一款集日程清单、日历、计划表、自定义提醒、自定义重复、待办多端同步、皮肤主题等多种实用功能于一体的桌面待办软件。支持日周月3种日历视图,你可以通过各个视图对每天、每周、每月的日程进行管理,让你更直观便捷地复盘过去、专注当下、规划未来。
win11安卓子系统 v2304.40000.5.0 官方版 微软近日邀请 windows insider 项目成员,测试 windows subsystem for android version 2304(2304.40000.5.0)新版本。本次版本更新主要添加了使用防病毒软件进行程序包验证的功能、重新分配内存以获得更好性能的功能、android applink 支持、新的 linux 内核等。
夸克网盘 v2.5.31 官方版 夸克网盘是夸克推出的一款云服务产品(支持离线下载),此软件支持多种格式压缩包秒开,高效查看各种格式的文件,便捷管理,超大存储空间,轻松存储各种类型文件,智能分类管理,极速下载,让文件存储更轻松。
好了,linux dm命令(linux dm-0)的介绍到这里就结束了,想知道更多相关资料可以收藏我们的网站。