opendmi
Synopsis
opendmi [global options] command [command options] [--] [command args]
opendmi -v|--version
opendmi -h|--help
Description
The opendmi utility reads the DMI/SMBIOS data of the platform it runs on, or
of a dump file, and gives it back as decoded structures rather than as text to
parse. Every field is addressed by a stable code, carries a type and a unit,
and reads the same way in the terminal, in JSON, XML and YAML, and through the
C API of libopendmi.
What the utility does is chosen by a command, which follows the global options and takes options of its own. Global options apply to every command, and decide where the data comes from and what is decoded; command options decide what is done with it. Values of options are given either as a separate argument (-i path, --file path) or attached to the option (-i*path, *--file=path).
Reading the data of a platform usually requires privileges, because the table is taken from physical memory or from an interface the kernel restricts. Dump files are read with the privileges of the file itself. The commands which read no data, explain, modules, types and lint listing its rules, need no privileges at all.
Commands
- dump
-
Dump the entire SMBIOS table to a binary file, see
opendmi-dump. - entry
-
Show the data of the SMBIOS entry point, see
opendmi-entry. - list
-
List the structures with their handles and types, see
opendmi-list. - show
-
Show the data of the structures, see
opendmi-show. - explain
-
Explain a structure type, see
opendmi-explain. - lint
-
Check the data against the rules of the specification, see
opendmi-lint. - export
-
Export the data to an external format, see
opendmi-export. - import
-
Import the data from an external format, see
opendmi-import. - types
-
List the structure types the utility knows, see
opendmi-types. - modules
-
List the extension modules available, see
opendmi-modules.
Use opendmi command --help for the options of a particular command.
Options
- -v, --version
-
Print version information and exit.
- -?, -h, --help
-
Print help and exit.
- -i path, --file=path
-
Read the data from a binary dump file instead of the platform. Dump files are interchangeable with the ones of
dmidecode --dump-bin. - -d path, --device=path
-
Set the path to the memory device the data is read through,
/dev/memby default. Only used by the backends which read physical memory. - -m module, --module=module
-
Enable the named extension module, so that the structures it describes are decoded instead of being left unknown. The option may be given several times. Modules enabled this way take precedence over the ones enabled for the platform. See
opendmi-modulesfor the modules available. - -M, --no-auto-modules
-
Do not enable the modules of the platform automatically. By default, the modules of the platform the data comes from are enabled as the data is read, e.g. the dell module for a Dell platform, or the hpe module for an HP or HPE server, unless the structures they describe conflict with the ones of the modules enabled with --module.
- -O, --overlay
-
Apply additional information entries (type 40) to the structures they refer to, so that the values they carry are shown as part of those structures.
- -l, --log
-
Enable logging of what the library does while it reads and decodes the data.
- --log-file=path
-
Enable logging to the named file, which is appended to rather than replaced.
- -L level, --log-level=level
-
Set the level logging is limited to:
error,warning,notice,infoordebug. The default isnotice. - -P, --no-pager
-
Disable pager.
Exit status
- 0
-
Command has succeeded.
- 1
-
Command has failed, e.g. the data could not be read, or the checks of
opendmi-linthave found an error. - 2
-
Command line is invalid.
Environment
- PAGER
-
Pager the output of the text commands (
show,list,entry,lint,types,explain,modules) is shown through,lessif it is not set. Set it to an empty value to disable the pager. Output which is not a terminal is never paged. Quitting the pager before the end of the output is not a failure: the rest of the output is discarded and the command exits with status 0. - LESS
-
Options of
less, when it is used as the pager. If it is not set, the utility letslessprint output which fits on one screen directly.
Files
- /dev/mem
-
Memory device the table is read through on FreeBSD and NetBSD, see --device.
- /sys/firmware/dmi/tables
-
Tables exposed by the Linux kernel, which the Linux backend reads.
Examples
Show the data of the local platform:
$ opendmi show
Show the processors only:
$ opendmi show -t processor
Save the table of the local platform and read it back later:
$ opendmi dump -o smbios.bin $ opendmi -i smbios.bin show
Decode the structures of a vendor as well as the standard ones:
$ opendmi -m dell show
Check a dump against the rules of the specification:
$ opendmi -i smbios.bin lint