Linux命令笔记之dmidecode用法
Dmidecode 用来查看设备硬件信息,包括设备型号、BIOS、系统、主板、处理器、内存、缓存详细信息等等。
常用参数:
# dmidecode -h
Usage: dmidecode [OPTIONS]
Options are:
-d,--dev-mem FILE Read memory fromdevice FILE (default: /dev/mem)
从设备文件中读取信息,输出文件内容与不加参数相同
-h,--help Display this help textand exit
显示帮助信息
-q,--quiet Less verbose output
简化信息输出
-s,--string KEYWORD Only display the valueof the given DMI string
只显示指定DMI字符串的信息(DMI即DesktopManagement Interface, 就是帮助 收集电脑系统信息的管理系统)
-t,--type TYPE Only display theentries of given type
只显示指定类型的条目
-u,--dump Do not decode theentries
显示不解码的条目
--dump-bin FILE Dump the DMIdata to a binary file
--from-dump FILE Read the DMIdata from a binary file
-V,--version Display the version andexit
显示版本信息
示例:
# dmidecode 将会输出所有硬件及系统信息
# dmidecode -d /dev/mem 同上
# dmidecode –q 简化输出信息
BIOS Information
Vendor:Dell Inc.
Version:6.1.0
ReleaseDate: 10/18/2011
Address:0xF0000
RuntimeSize: 64 kB
ROMSize: 4096 kB
Characteristics:
…………………..
IPMI Device Information
InterfaceType: KCS (Keyboard Control Style)
SpecificationVersion: 2.0
I2CSlave Address: 0x10
NVStorage Device: Not Present
BaseAddress: 0x0000000000000CA8 (I/O)
RegisterSpacing: 32-bit Boundaries
# dmidecode –s 将检索出来的DMI加入到s参数后面即可看到具体信息
dmidecode: option requires an argument --‘s‘
String keyword expected
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
# dmidecode -s system-product-name
PowerEdge R710
#服务器型号为DELL R710
# dmidecode –t 将检索出的条目加入t参数即可查看该条目详细信息
dmidecode: option requires an argument --‘t‘
Type number or keyword expected
Valid type keywords are:
bios
system
baseboard
chassis
processor
memory
cache
connector
slot
# dmidecode -t bios
# dmidecode 2.11
SMBIOS 2.6 present.
Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
Vendor:Dell Inc.
Version:6.1.0
ReleaseDate: 10/18/2011
Address:0xF0000
RuntimeSize: 64 kB
ROMSize: 4096 kB
Characteristics:
ISAis supported
PCIis supported
PNPis supported
BIOSis upgradeable
BIOSshadowing is allowed
Bootfrom CD is supported
Selectableboot is supported
EDDis supported
Japanesefloppy for Toshiba 1.2 MB is supported (int 13h)
5.25"/360kB floppy services are supported (int 13h)
5.25"/1.2MB floppy services are supported (int 13h)
3.5"/720kB floppy services are supported (int 13h)
8042keyboard services are supported (int 9h)
Serialservices are supported (int 14h)
CGA/monovideo services are supported (int 10h)
ACPIis supported
USBlegacy is supported
BIOSboot specification is supported
Functionkey-initiated network boot is supported
Targetedcontent distribution is supported
BIOSRevision: 6.1
Handle 0x0D00, DMI type 13, 22 bytes
BIOS Language Information
LanguageDescription Format: Long
InstallableLanguages: 1
en|US|iso8859-1
CurrentlyInstalled Language: en|US|iso8859-1
有木有很强大的赶脚,我使用该命令的背景是需要统计生产环境服务器硬件信息,因服务器托管在机房,即不想来回跑机房,又不想翻阅当初采购清单,故通过查阅资料了解了这个dmidecode强大的命令。
感谢http://www.ibm.com/developerworks/cn/linux/l-10sysadtips/
再分享一个统计硬件设备信息的脚本
http://blog.chinaunix.net/uid-26495963-id-3032523.html
本文出自 “菜鸟的开始” 博客,请务必保留此出处http://qiliushuai.blog.51cto.com/3749857/1606436
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。