分类: BSD
2006-09-19 10:48:56
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.
Dmidecode was first written by Alan Cox and is now being further developed and
maintained by Jean Delvare. It is released under the General Public License
(GPL). For more details, you should have a look at the AUTHORS and LICENSE
files that come with the source code.
Three additional tools come with dmidecode:
* biosdecode prints all BIOS related information it can
find (see a sample output);
* 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).
以上来源于
举例:
1,读出机器的S/N
DELL的机器:
[root@sz-ms-meil-linux ~]# /usr/sbin/dmidecode | grep "Serial Number"
Serial Number:
Serial Number: ..CN1374047Q00OJ.
Serial Number:
兼容机和国产机基本上读不出任何有意义的数据。
[root@Meil sda1]# dmidecode | grep "Serial Number"
Serial Number:
Serial Number:
Serial Number:
安装方法:
]#mv
dmidecode-2.4.tar.gz /usr/local/
]#tar -xzvf dmidecode-2.4.tar.gz
]# make install
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 644 man/dmidecode.8 /usr/local/man/man8
install -m 644 man/biosdecode.8/usr/local/man/man8
install -m 644 man/ownership.8 /usr/local/man/man8
install -m 644 man/vpddecode.8 /usr/local/man/man8
在Red Hat Enterprise Linux AS release 4 (Nahant)中, 已经集成到包里面
[root@sz-ms-meil-linux ~]# rpm -qf `which dmidecode`
kernel-utils-2.4-