Coder Social home page Coder Social logo

dmidecode's Introduction

** INTRODUCTION **

Dmidecode reports information about your system's hardware as described in
your system BIOS according to the SMBIOS/DMI standard. 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).

DMI data can be used to enable or disable specific portions of kernel 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.


** INSTALLATION **

The home web page for dmidecode is hosted on Savannah:
  http://www.nongnu.org/dmidecode/
You will find the latest version (including CVS) there, as well as fresh news
and other interesting material, such as a list of related projects and
articles.

This program was first written for Linux, and has since been reported to work
on FreeBSD, NetBSD, OpenBSD, BeOS and Solaris as well.

There's no configure script, so simply run "make" to build dmidecode, and
"make install" to install it. You also can use "make uninstall" to remove
all the files you installed. By default, files are installed in /usr/local
but you can change this behavior by editing the Makefile file and setting
prefix to wherever you want. You may change the C compiler and the
compilation flags as well.

Optionally, you can run "make strip" prior to "make install" if you want
smaller binaries. However, be aware that this will prevent any further
attempt to debug the programs.

Two parameters can be set in the Makefile file to make dmidecode work on
non-i386 systems. They should be used if your system uses the big endian
byte ordering (Motorola) or doesn't support unaligned memory accesses,
respectively. For example, compiling for a SPARC processor would require
both (but I am not aware of SPARC-based systems implementing SMBIOS).
Compiling for an IA64 processor requires the memory alignment workaround,
and it is enabled automatically.


** DOCUMENTATION **

Each tool has a manual page, found in the "man" subdirectory. Manual pages
are installed by "make install". See these manual pages for command line
interface details and tool specific information.

For an history of the changes made to dmidecode, see the NEWS file.

If you need help, your best chances are to visit the web page (see the
INSTALLATION section above) or to get in touch with the developers directly.
Have a look at the AUTHORS file and contact one of the maintainers.

If you want to help with the development of dmidecode, please consider
joining the dmidecode-devel discussion list:
  http://lists.nongnu.org/mailman/listinfo/dmidecode-devel


** COMMON PROBLEMS **

IA-64

Non-Linux systems are not yet supported.

MMAP

Note that mmap() is now used by default wherever possible, since this seems
to solve a number of problems. This default behavior can be changed in
config.h. Just to make sure this is clear, mmap() is not used for performance
reasons but to increase the number of systems on which dmidecode can be
successfully run.

CYGWIN

Dmidecode used to work under Cygwin. However the /dev/mem interface was
removed at some point in time so it no longer works.


** MISCELLANEOUS TOOLS **

Three other tools come along with dmidecode: biosdecode, ownership and
vpddecode. These tools are only useful on systems with a BIOS, so they
are not built on IA-64 by default.

BIOSDECODE

This one prints all BIOS related information it can find in /dev/mem.
It used to be part of dmidecode itself, but as dmidecode was growing,
we felt that the non-DMI part had to be moved to a separate tool.

OWNERSHIP

This tool was written on a request by Luc Van de Velde for use with Novell
tools in his company. It retrieves the "ownership tag" that can be set on
most Compaq computers. Since it uses the same mechanisms dmidecode and
biosdecode use, and could be of some use for other people as well, we
decided to make it part of the project.

VPDDECODE

This tool prints the contents of the "vital product data" structure as
found in most IBM and Lenovo computers. It used to have a lookup table
for the machine name, but it was unreliable and hard to maintain so it
was ultimately dropped. It has a command line interface.

dmidecode's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dmidecode's Issues

Memory Array Mapped Address Ending Address math is awkward

pr_attr("Ending Address", "0x%08X%03X",
    DWORD(data + 0x08) >> 2,
    ((DWORD(data + 0x08) & 0x3) << 10) + 0x3FF);

The above math results in an awkward looking value on an Azure VM:

Handle 0x0052, DMI type 19, 15 bytes
Memory Array Mapped Address
        Starting Address: 0x00000000000
        Ending Address: 0x000400003FF
        Range Size: 1 GB
        Physical Array Handle: 0x0051
        Partition Width: 1

Handle 0x0053, DMI type 19, 15 bytes
Memory Array Mapped Address
        Starting Address: 0x00100000000
        Ending Address: 0x001400003FF
        Range Size: 1 GB
        Physical Array Handle: 0x0051
        Partition Width: 1

Clearly the VM is off by a byte. No memory range is going to be from 0x0 to 0x00100000 kB. The range would be 0x0 to 0x000FFFFF.

The above math attempts to convert an ending address in kB to an ending address in bytes. After a multiply by 1024 the 0x3FF is an attempt to fill the bits to the right. In a normal case we would have:
0x000FFFFF kB becomes 3FFFFC00 bytes. Add 0x3FF and you get 0x3FFFFFFF.

A solution that would avoid the odd look (granted, yes this would never have happened if the VM calculated correctly) and more to the intent would be to detect if the last bit is a 1 (an odd number) and IIF, then add the 0x3FF.

dmidecode doesn't update latest value

Hi team,

I'm running dmidecode in HP gen10 (ubuntu 16) to read system info i.e. PSU
dmidecode shows correct info in the first time when we have 2 PSU.
After unplugging 1PSU, dmidecode still shows old value without any update.
Reboot system, and dmidecode show correct info with 1PSU plugging and 1PSU unplugging.

Could you please let us know if this is the expectation?

Thanks

Type 42 Redfish Host Interface, Device Types 04 and 05h not supported

SMBIOS Type 42 (Management Controller Host Interface) refers to the Redfish Host Interface specification (DSP0270) to define the Interface Specific Data for Interface Type 40h. DSP0270 v 1.3.0 added new Device Type values:

- 04h - USB Network Interface v2
- 05h - PCI/PCIe Network Interface v2

Dmidecode currently supports only Device Types 02h and 03h. Support for new Device Types 04h and 05h is needed for newer server designs.

release with DDR5 support

I see DDR5 support is in master, but not in latest 3.3 release.
When will next release happen with DDR5 support?

Root user cannot decode SMBIOS tables from local file

If I run dmidecode command as root user to decode SMBIOS tables from raw data I dump before, it failed.

./dmidecode --from-dump ~/dmidecode.bin
# dmidecode 3.5
Reading SMBIOS/DMI data from file /root/dmidecode.bin.
Can't read memory from /root/dmidecode.bin

It seemed root user could use /dev/mem only, while non-root user could decode SMBIOS tables from local file.
This restriction seems not necessary, especially for some systems we only have root user.

Issue with dmidecode to Retrieve CPU Details etc.

Overview

I'm experiencing an issue with the dmidecode command on a system with an 11th Gen Intel(R) Core(TM) i7-1165G7 CPU. The dmidecode command does not show complete details about the CPU and other hardware components.

System Configuration

  • CPU: 11th Gen Intel(R) Core(TM) i7-1165G7
  • OS: Debian GNU/Linux 12 (bookworm)
  • Kernel: Linux 6.1.0-18-amd64
  • dmidecode version: 3.4

dmidecode Output

The output from the dmidecode command shows limited and outdated information.

root@faiserver:~# dmidecode 
# dmidecode 3.4
Getting SMBIOS data from sysfs.
SMBIOS 2.5 present.
10 structures occupying 450 bytes.
Table at 0x000E1000.

Handle 0x0000, DMI type 0, 20 bytes
BIOS Information
    Vendor: innotek GmbH
    Version: VirtualBox
    Release Date: 12/01/2006
    Address: 0xE0000
    Runtime Size: 128 kB
    ROM Size: 128 kB
    Characteristics:
        ISA is supported
        PCI is supported
        Boot from CD is supported
        Selectable boot is supported
        8042 keyboard services are supported (int 9h)
        CGA/mono video services are supported (int 10h)
        ACPI is supported

Handle 0x0001, DMI type 1, 27 bytes
System Information
    Manufacturer: innotek GmbH
    Product Name: VirtualBox
    Version: 1.2
    Serial Number: 0
    UUID: e83f6988-828d-5142-a0e2-2bca4c199fc3
    Wake-up Type: Power Switch
    SKU Number: Not Specified
    Family: Virtual Machine

Handle 0x0008, DMI type 2, 15 bytes
Base Board Information
    Manufacturer: Oracle Corporation
    Product Name: VirtualBox
    Version: 1.2
    Serial Number: 0
    Asset Tag: Not Specified
    Features:
        Board is a hosting board
    Location In Chassis: Not Specified
    Chassis Handle: 0x0003
    Type: Motherboard
    Contained Object Handles: 0

Handle 0x0003, DMI type 3, 13 bytes
Chassis Information
    Manufacturer: Oracle Corporation
    Type: Other
    Lock: Not Present
    Version: Not Specified
    Serial Number: Not Specified
    Asset Tag: Not Specified
    Boot-up State: Safe
    Power Supply State: Safe
    Thermal State: Safe
    Security Status: None

Handle 0x0007, DMI type 126, 42 bytes
Inactive

Handle 0x0005, DMI type 126, 15 bytes
Inactive

Handle 0x0006, DMI type 126, 28 bytes
Inactive

Handle 0x0002, DMI type 11, 7 bytes
OEM Strings
    String 1: vboxVer_6.1.50
    String 2: vboxRev_161033

Handle 0x0004, DMI type 128, 8 bytes
OEM-specific Type
    Header and Data:
        80 08 04 00 FF C5 2A 00

Handle 0xFEFF, DMI type 127, 4 bytes
End Of Table

root@faiserver:~#

DMI Table Directory

The DMI table directory shows that the tables are present.

root@faiserver:~# ls -l /sys/firmware/dmi/tables/
total 0
-r-------- 1 root root 450 Jun 21 03:27 DMI
-r-------- 1 root root  31 Jun 21 03:27 smbios_entry_point

BIOS/UEFI Version

The BIOS version is here :

root@faiserver:~# sudo dmidecode -t bios
# dmidecode 3.4
Getting SMBIOS data from sysfs.
SMBIOS 2.5 present.

Handle 0x0000, DMI type 0, 20 bytes
BIOS Information
    Vendor: innotek GmbH
    Version: VirtualBox
    Release Date: 12/01/2006
    Address: 0xE0000
    Runtime Size: 128 kB
    ROM Size: 128 kB
    Characteristics:
        ISA is supported
        PCI is supported
        Boot from CD is supported
        Selectable boot is supported
        8042 keyboard services are supported (int 9h)
        CGA/mono video services are supported (int 10h)
        ACPI is supported

root@faiserver:~#

dmidecode version

root@faiserver:~# dmidecode --v
3.4
root@faiserver:~# 

CPU Details with lshw Command

The lshw command correctly identifies the CPU model, indicating that the hardware itself is properly recognized by the operating system.

root@faiserver:~# lshw | grep Intel
          product: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
          vendor: Intel Corp.
          vendor: Intel Corporation
             vendor: Intel Corporation
             vendor: Intel Corporation
             vendor: Intel Corporation
             vendor: Intel Corporation
             vendor: Intel Corporation
             vendor: Intel Corporation
root@faiserver:~#

OS Details

root@faiserver:~# cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@faiserver:~# uname -a
Linux faiserver 6.1.0-18-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64 GNU/Linux
root@faiserver:~#
``

Why is an extra "0" displayed at the end of the BIOS Address value?

Hi,

In dmidecode.c line 4288, I see something like "0x%04X0", which means that the BIOS address display always has an extra "0" at the end of the data at 0x06. The value of 0xFFFF will be displayed as 0xFFFF0, is this work as design? If so, why is this by design?

I see commit messages in the code, is this only for legacy BIOS?

/*
* On IA-64 and UEFI-based systems, the BIOS base
* address will read 0 because there is no BIOS. Skip
* the base address and the runtime size in this case.
*/

And I see an example in the SMBIOS specification where the value of this field could be set to 0E800h

Segment location of BIOS starting address (for example, 0E800h).

But this field is just WORD and can't be set 0E800h, I really have a hard time understanding this design.

Thanks

Processor handle not unique

Hi, I encounter a strange issue, according to man page, each handle should be unique, but when I use dmidecode -t 4 or dmidecode --no-sysfs -t 4 to get processor info, two records have same handle

$dmidecode  -t 4
# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.

Handle 0x0004, DMI type 4, 42 bytes
Processor Information
        Socket Designation: CPU #000
        Type: Central Processor
        Family: Unknown
        Manufacturer: GenuineIntel
        ID: F2 06 03 00 FF FB 8B 0F
        Version: Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz
        Voltage: 3.3 V
        External Clock: Unknown
        Max Speed: 30000 MHz
        Current Speed: 2400 MHz
        Status: Populated, Enabled
        Upgrade: ZIF Socket
        L1 Cache Handle: 0x001A
        L2 Cache Handle: 0x0020
        L3 Cache Handle: Not Provided
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Part Number: Not Specified
        Core Count: 1
        Core Enabled: 1
        Characteristics:
                64-bit capable
                Execute Protection

Handle 0x0004, DMI type 4, 42 bytes
Processor Information
        Socket Designation: CPU #001
        Type: Central Processor
        Family: Unknown
        Manufacturer: GenuineIntel
        ID: F2 06 00 00 FF FB 8B 0F
        Version: Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz
        Voltage: 3.3 V
        External Clock: Unknown
        Max Speed: 30000 MHz
        Current Speed: 2400 MHz
        Status: Populated, Enabled
        Upgrade: ZIF Socket
        L1 Cache Handle: 0x001A
        L2 Cache Handle: 0x0020
        L3 Cache Handle: Not Provided
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Part Number: Not Specified
        Core Count: 1
        Core Enabled: 1
        Characteristics:
                64-bit capable
                Execute Protection

Handle 0x0005, DMI type 4, 42 bytes
Processor Information
        Socket Designation: CPU #002
        Type: Central Processor
        Family: Unknown
        Manufacturer: GenuineIntel
        ID: F2 06 00 00 FF FB 8B 0F
        Version: Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz
        Voltage: 3.3 V
        External Clock: Unknown
        Max Speed: 30000 MHz
        Current Speed: 2400 MHz
        Status: Populated, Enabled
        Upgrade: ZIF Socket
        L1 Cache Handle: 0x001B
        L2 Cache Handle: 0x0021
        L3 Cache Handle: Not Provided
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Part Number: Not Specified
        Core Count: 1
        Core Enabled: 1
        Characteristics:
                64-bit capable
                Execute Protection

Handle 0x0006, DMI type 4, 42 bytes
Processor Information
        Socket Designation: CPU #003
        Type: Central Processor
        Family: Unknown
        Manufacturer: GenuineIntel
        ID: F2 06 00 00 FF FB 8B 0F
        Version: Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz
        Voltage: 3.3 V
        External Clock: Unknown
        Max Speed: 30000 MHz
        Current Speed: 2400 MHz
        Status: Populated, Enabled
        Upgrade: ZIF Socket
        L1 Cache Handle: 0x001C
        L2 Cache Handle: 0x0022
        L3 Cache Handle: Not Provided
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Part Number: Not Specified
        Core Count: 1
        Core Enabled: 1
        Characteristics:
                64-bit capable
                Execute Protection

Handle 0x0007, DMI type 4, 42 bytes
Processor Information
        Socket Designation: CPU #004
        Type: Central Processor
        Family: Unknown
        Manufacturer: GenuineIntel
        ID: F2 06 00 00 FF FB 8B 0F
        Version: Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz
        Voltage: 3.3 V
        External Clock: Unknown
        Max Speed: 30000 MHz
        Current Speed: 2400 MHz
        Status: Populated, Enabled
        Upgrade: ZIF Socket
        L1 Cache Handle: 0x001D
        L2 Cache Handle: 0x0023
        L3 Cache Handle: Not Provided
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Part Number: Not Specified
        Core Count: 1
        Core Enabled: 1
        Characteristics:
                64-bit capable
                Execute Protection

Handle 0x0008, DMI type 4, 42 bytes
Processor Information
        Socket Designation: CPU #005
        Type: Central Processor
        Family: Unknown
        Manufacturer: GenuineIntel
        ID: F2 06 00 00 FF FB 8B 0F
        Version: Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz
        Voltage: 3.3 V
        External Clock: Unknown
        Max Speed: 30000 MHz
        Current Speed: 2400 MHz
        Status: Populated, Enabled
        Upgrade: ZIF Socket
        L1 Cache Handle: 0x001E
        L2 Cache Handle: 0x0024
        L3 Cache Handle: Not Provided
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Part Number: Not Specified
        Core Count: 1
        Core Enabled: 1
        Characteristics:
                64-bit capable
                Execute Protection

by the way, I am in a vmware virtual machine, and cpus are passthrough to vm, any suggestion is appreciated

Latest version dmidecode (3.3) still causes a crash using RHEL8.3 ! (dmidecode -u)

After complete uninstall of the rpm's of RHEL8.3 dmidecode an compiling the latest version of dmidecode 3.3 there is still a coredump (which should have been resolved with the latest patch ? (19th)

[ ? ] --- when using the rpm (downgraded version - 3.2-5) proposed by the girls/guys from AlmaLinux i can use do dmidecode -u without any problem !
(https://bugs.almalinux.org/view.php?id=45)
-> It looks like an upstream distro issue: https://bugzilla.redhat.com/show_bug.cgi?id=1885823
---%<----
We'll have to wait for update.

Fortunately, the previous version of dmidecode doesn't have this issue.
But we don't have it in AlmaLinux as we're new distribution so if you need to mitigate the issue right now you should install the previous version of dmidecode from other distro.

Here is example with CloudLinux 8.2 package I've tested:

Downgrade to previous version

dnf downgrade https://repo.cloudlinux.com/cloudlinux/8.2/BaseOS/x86_64/os/Packages/dmidecode-3.2-5.el8.x86_64.rpm
---%<----

  • with latest tgz download from github: (core dump)

dmidecode-dmidecode-3-3]# /usr/local/sbin/dmidecode -u

dmidecode 3.3

Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.
159 structures occupying 9812 bytes.
Table at 0x0DF8601F.

Handle 0x0000, DMI type 0, 26 bytes
Header and Data:
00 1A 00 00 01 02 00 00 03 1F 90 0A 00 00 00 00
00 00 00 0C FF FF FF FF 00 00
Strings:
56 4D 77 61 72 65 2C 20 49 6E 63 2E 00
VMware, Inc.
56 4D 57 37 31 2E 30 30 56 2E 31 36 37 30 37 37
56 4D 57 37 31 2E 30 30 56 2E 31 36 37 30 37 3737 36 2E 42 36 34 2E 32 30 30 38 30 37 30 32 33
56 4D 57 37 31 2E 30 30 56 2E 31 36 37 30 37 3737 36 2E 42 36 34 2E 32 30 30 38 30 37 30 32 3330 00
VMW71.00V.16707776.B64.2008070230
08/07/2020

Segmentation fault (core dumped)

ARM

I need compilation for Linux with arm processor architecture.
How can I do it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.