查看BIOS 提供的硬件信息工具: dmidecode下载地址:/releases/dmidecode//download/0003000/2304.shtml在本地保存路径:1,10.50.44.89:/mnt/sda1/software/linux/other/dmidecode2,172.19.148.202:/home/software/dmidecode安装:解压:[root@sz-ms-meil-linux dmidecode]# tar -xzvf dmidecode-2.8.tar.gz dmidecode-2.8/dmidecode-2.8/man/dmidecode-2.8/man/biosdecode.8dmidecode-2.8/man/dmidecode.8dmidecode-2.8/man/ownership.8dmidecode-2.8/man/vpddecode.8dmidecode-2.8/AUTHORSdmidecode-2.8/CHANGELOGdmidecode-2.8/LICENSEdmidecode-2.8/Makefiledmidecode-2.8/READMEdmidecode-2.8/biosdecode.cdmidecode-2.8/config.hdmidecode-2.8/dmidecode.cdmidecode-2.8/dmidecode.hdmidecode-2.8/dmiopt.cdmidecode-2.8/dmiopt.hdmidecode-2.8/ownership.cdmidecode-2.8/types.hdmidecode-2.8/util.cdmidecode-2.8/util.hdmidecode-2.8/version.hdmidecode-2.8/vpddecode.cdmidecode-2.8/vpdopt.cdmidecode-2.8/vpdopt.h可以看到文件如下:# lltotal 460-rw-r--r-- 1 root root 1147 Dec 30 10:23 AUTHORS-rwxr-xr-x 1 root root 12336 Dec 30 10:23 biosdecode -rw-r--r-- 1 root root 13754 Dec 30 10:23 biosdecode.c -rw-r--r-- 1 root root 8368 Dec 30 10:23 biosdecode.o -rw-r--r-- 1 root root 30647 Dec 30 10:23 CHANGELOG -rw-r--r-- 1 root root 226 Dec 30 10:23 config.h-rwxr-xr-x 1 root root 56364 Dec 30 10:23 dmidecode -rw-r--r-- 1 root root 88653 Dec 30 10:23 dmidecode.c -rw-r--r-- 1 root root 991 Dec 30 10:23 dmidecode.h -rw-r--r-- 1 root root 65572 Dec 30 10:23 dmidecode.o -rw-r--r-- 1 root root 7738 Dec 30 10:23 dmiopt.c-rw-r--r-- 1 root root 1369 Dec 30 10:23 dmiopt.h-rw-r--r-- 1 root root 6740 Dec 30 10:23 dmiopt.o-rw-r--r-- 1 root root 18009 Dec 30 10:23 LICENSE-rw-r--r-- 1 root root 3228 Dec 30 10:23 Makefile drwxr-xr-x 2 root root 4096 Dec 30 10:23 man-rwxr-xr-x 1 root root 7734 Dec 30 10:23 ownership-rw-r--r-- 1 root root 4584 Dec 30 10:23 ownership.c -rw-r--r-- 1 root root 2684 Dec 30 10:23 ownership.o -rw-r--r-- 1 root root 6546 Dec 30 10:23 README-rw-r--r-- 1 root root 1628 Dec 30 10:23 types.h-rw-r--r-- 1 root root 3464 Dec 30 10:23 util.c-rw-r--r-- 1 root root 147 Dec 30 10:23 util.h-rw-r--r-- 1 root root 1616 Dec 30 10:23 util.o-rw-r--r-- 1 root root 22 Dec 30 10:23 version.h-rwxr-xr-x 1 root root 13822 Dec 30 10:23 vpddecode -rw-r--r-- 1 root root 12295 Dec 30 10:23 vpddecode.c -rw-r--r-- 1 root root 7972 Dec 30 10:23 vpddecode.o -rw-r--r-- 1 root root 3882 Dec 30 10:23 vpdopt.c-rw-r--r-- 1 root root 1338 Dec 30 10:23 vpdopt.h-rw-r--r-- 1 root root 3828 Dec 30 10:23 vpdopt.o对于这样有Makefile的文件,直接install:[root@sz-ms-meil-linux dmidecode-2.8]# make installinstall -m 755 -d /usr/local/sbininstall -m 755 dmidecode /usr/local/sbininstall -m 755 biosdecode /usr/local/sbininstall -m 755 ownership /usr/local/sbininstall -m 755 vpddecode /usr/local/sbininstall -m 755 -d /usr/local/share/man/man8install -m 644 man/dmidecode.8 /usr/local/share/man/man8install -m 644 man/biosdecode.8 /usr/local/share/man/man8install -m 644 man/ownership.8 /usr/local/share/man/man8install -m 644 man/vpddecode.8 /usr/local/share/man/man8install -m 755 -d /usr/local/share/doc/dmidecodeinstall -m 644 README /usr/local/share/doc/dmidecodeinstall -m 644 CHANGELOG /usr/local/share/doc/dmidecodeinstall -m 644 AUTHORS /usr/local/share/doc/dmidecode[root@sz-ms-meil-linux dmidecode-2.8]#可以看到上面有四个可执行文件分别是:dmidecode、biosdecode、ownership、v pddecode。
我们最常用的是前两个命令。
用dmidecode可以显示非常详细的硬件信息(包括bios、cpu、内存等信息)。
PresentationDmidecode reports information about your system's hardware as described in your system BIOS according to the SMBIOS/DMI standard (see a sample output). This information typically includes system manufacturer, model name, serial number, BIOS version, asset tag as well as a lot of other details of varying level of interest and reliability depending on the manufacturer. This will often include usage status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory module slots, and the list of I/O ports (e.g. serial, parallel, USB).Part of the dmidecode code can be found in the Linux kernel, where DMI data is used to enable or disable specific portions of code depending on the specific hardware. Thus, one use of dmidecode is for kernel developers to detect system "signatures" and add them to the kernel source code when needed.Beware that DMI data have proven to be too unreliable to be blindly trusted. Dmidecode does not scan your hardware, it only reports what the BIOS told it to.Three additional tools come with dmidecode:biosdecode prints all BIOS related information it can findownership retrieves the "ownership tag" that can be set on Compaq computers;vpddecode prints the "vital product data" information that can be found in almost all IBM computers (see a sample output).[root@sz-ms-meil-linux dmidecode-2.8]# biosdecode# biosdecode 2.8SYSID present.Revision: 0Structure Table Address: 0x000F0411Number Of Structures: 1SMBIOS 2.3 present.Structure Table Length: 2245 bytesStructure Table Address: 0x000F0450Number Of Structures: 69Maximum Structure Size: 234 bytesPNP BIOS 1.0 present.Event Notification: Not SupportedReal Mode 16-bit Code Address: F000:E2F1Real Mode 16-bit Data Address: 0040:000016-bit Protected Mode Code Address: 0x000FE2F416-bit Protected Mode Data Address: 0x00000040 PCI Interrupt Routing 1.0 present.Router ID: 00:1f.0Exclusive IRQs: NoneCompatible Router: 8086:24d0Slot Entry 1: ID 00:1f, on-boardSlot Entry 2: ID 00:1d, on-boardSlot Entry 3: ID 00:02, on-boardSlot Entry 4: ID 01:00, on-boardSlot Entry 5: ID 01:0c, on-boardSlot Entry 6: ID 01:07, slot number 1Slot Entry 7: ID 01:08, slot number 2Slot Entry 8: ID 01:09, slot number 3Slot Entry 9: ID 01:0a, slot number 4ACPI 1.0 present.OEM Identifier: DELLRSD Table 32-bit Address: 0x000FD196BIOS32 Service Directory present.Revision: 0Calling Interface Address: 0x000FFE90实例:查机器的序列号:[root@sz-ms-meil-linux dmidecode-2.8]# dmidecode | grep 'Serial Number' Serial Number:Serial Number: 1374047Q00OJ.Serial Number:[root@sz-ms-meil-linux dmidecode-2.8]#。