查看BIOS 提供的硬件信息工具: dmidecode
时间:2006-12-30 来源:oychw
查看BIOS 提供的硬件信息工具: dmidecode
下载地址:
http://download.savannah.gnu.org/releases/dmidecode/
http://download.chinaunix.net/download/0003000/2304.shtml
在本地保存路径:
1,10.50.44.89:/mnt/sda1/software/linux/other/dmidecode
2,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.8
dmidecode-2.8/man/dmidecode.8
dmidecode-2.8/man/ownership.8
dmidecode-2.8/man/vpddecode.8
dmidecode-2.8/AUTHORS
dmidecode-2.8/CHANGELOG
dmidecode-2.8/LICENSE
dmidecode-2.8/Makefile
dmidecode-2.8/README
dmidecode-2.8/biosdecode.c
dmidecode-2.8/config.h
dmidecode-2.8/dmidecode.c
dmidecode-2.8/dmidecode.h
dmidecode-2.8/dmiopt.c
dmidecode-2.8/dmiopt.h
dmidecode-2.8/ownership.c
dmidecode-2.8/types.h
dmidecode-2.8/util.c
dmidecode-2.8/util.h
dmidecode-2.8/version.h
dmidecode-2.8/vpddecode.c
dmidecode-2.8/vpdopt.c
dmidecode-2.8/vpdopt.h
可以看到文件如下:
# ll
total 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 install
install -m 755 -d /usr/local/sbin
install -m 755 dmidecode /usr/local/sbin
install -m 755 biosdecode /usr/local/sbin
install -m 755 ownership /usr/local/sbin
install -m 755 vpddecode /usr/local/sbin
install -m 755 -d /usr/local/share/man/man8
install -m 644 man/dmidecode.8 /usr/local/share/man/man8
install -m 644 man/biosdecode.8 /usr/local/share/man/man8
install -m 644 man/ownership.8 /usr/local/share/man/man8
install -m 644 man/vpddecode.8 /usr/local/share/man/man8
install -m 755 -d /usr/local/share/doc/dmidecode
install -m 644 README /usr/local/share/doc/dmidecode
install -m 644 CHANGELOG /usr/local/share/doc/dmidecode
install -m 644 AUTHORS /usr/local/share/doc/dmidecode
[root@sz-ms-meil-linux dmidecode-2.8]#
可以看到上面有四个可执行文件分别是:dmidecode、biosdecode、ownership、v pddecode。我们最常用的是前两个命令。用dmidecode可以显示非常详细的硬件信息(包括bios、cpu、内存等信息)。
Presentation
Dmidecode 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 find
- ownership 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.8
SYSID present.
Revision: 0
Structure Table Address: 0x000F0411
Number Of Structures: 1
SMBIOS 2.3 present.
Structure Table Length: 2245 bytes
Structure Table Address: 0x000F0450
Number Of Structures: 69
Maximum Structure Size: 234 bytes
PNP BIOS 1.0 present.
Event Notification: Not Supported
Real Mode 16-bit Code Address: F000:E2F1
Real Mode 16-bit Data Address: 0040:0000
16-bit Protected Mode Code Address: 0x000FE2F4
16-bit Protected Mode Data Address: 0x00000040
PCI Interrupt Routing 1.0 present.
Router ID: 00:1f.0
Exclusive IRQs: None
Compatible Router: 8086:24d0
Slot Entry 1: ID 00:1f, on-board
Slot Entry 2: ID 00:1d, on-board
Slot Entry 3: ID 00:02, on-board
Slot Entry 4: ID 01:00, on-board
Slot Entry 5: ID 01:0c, on-board
Slot Entry 6: ID 01:07, slot number 1
Slot Entry 7: ID 01:08, slot number 2
Slot Entry 8: ID 01:09, slot number 3
Slot Entry 9: ID 01:0a, slot number 4
ACPI 1.0 present.
OEM Identifier: DELL
RSD Table 32-bit Address: 0x000FD196
BIOS32 Service Directory present.
Revision: 0
Calling Interface Address: 0x000FFE90
实例:
查机器的序列号:
[root@sz-ms-meil-linux dmidecode-2.8]# dmidecode | grep 'Serial Number'
Serial Number:
Serial Number: ..CN1374047Q00OJ.
Serial Number:
[root@sz-ms-meil-linux dmidecode-2.8]#