Chinaunix首页 | 论坛 | 博客
  • 博客访问: 310423
  • 博文数量: 126
  • 博客积分: 7051
  • 博客等级: 少将
  • 技术积分: 1425
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-20 13:21
文章分类

全部博文(126)

文章存档

2008年(126)

我的朋友

分类: LINUX

2008-05-01 13:39:01

   

dmidecode

近来需要读取硬件信息,尤其是主板信息,但在Linux如何获取呢,搜了一下,

这个帖子蛮好的,介绍了dmidecode   的使用,下面转上面一段英文好了:

dmidecode   is a tool for dumping a computer''''s DMI (some say SMBIOS) table contents in a human-readable format. This table contains a description of the system''''s hardware components, as well as other   useful   pieces   of   information such as serial numbers and BIOS revision. Thanks to this table, you can retrieve this information without having to   probe for the actual hardware.   While this is a good point in terms of report speed and safeness, this   also   makes the presented information possibly unreliable.


我试了试,dmidecode的确挺不错的,基本上把能读的硬件信息都读出来了,

另外

/usr/sbin/dmidecode | grep "Serial Number"

可以读出计算机的标示号,当然这只对正规品牌的机器有效,如DELL、HP之类,取出的值和机器上贴的值是对应的,而类似清华同方之流的兼容机,基本上读不出任何有意义的数据

阅读(728) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~