dmidecode在哪里获取SMBIOS表? [英] Where does dmidecode get the SMBIOS table?

查看:149
本文介绍了dmidecode在哪里获取SMBIOS表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我总是有这个问题,在阅读手册页并在线搜索后没有得到答案.对此有所了解的人请发表评论.

I always have this question and didn't get an answer after reading man-page and searching online. Anyone who has knowledge about this please comment.

我知道dmidecode定位并解析SMBIOS表或DMI表.但是它是从哪里得到的呢?在Linux中是文件格式吗?

I understand that SMBIOS table or DMI table is what dmidecode locates and parses. But where does it get it from? Is it in the format of a file in Linux?

推荐答案

它似乎来自/dev/mem

Looks like it comes from /dev/mem

root@aw42e ~]# strace -F -e open dmidecode -t 17
   <snip>
    open("/sys/firmware/efi/systab", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/proc/efi/systab", O_RDONLY)      = -1 ENOENT (No such file or directory)
    open("/dev/mem", O_RDONLY)              = 3
    SMBIOS 2.5 present.

    open("/dev/mem", O_RDONLY)              = 3
    Handle 0x0016, DMI type 17, 27 bytes
    Memory Device
<snip>

/dev/mem 被描述为

mem是字符设备文件,是以下设备的主存储器的映像:电脑.例如,它可以用于检查(甚至修补)系统.mem中的字节地址被解释为物理内存地址.

mem is a character device file that is an image of the main memory of the computer. It may be used, for example, to examine (and even patch) the system. Byte addresses in mem are interpreted as physical memory addresses.

要回答,它包含在/dev/mem

So to answer, it is contained in /dev/mem

我正在搜索更多信息,但是我假设内核在启动时将DMI表插入内存中-来自 man dmidecode

I'm searching for more info, but I assume that the kernel inserts the DMI table into memory at boot time - from man dmidecode

在运行它时,dmidecode将尝试找到DMI表.如果它成功后,它将解析该表,并显示类似这样的记录列表:

As you run it, dmidecode will try to locate the DMI table. If it succeeds, it will then parse this table and display a list of records like this one:

这篇关于dmidecode在哪里获取SMBIOS表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆