Skip to content

Multiplatform Python, C & C++ library and command line tool to get data from SMBios

License

Notifications You must be signed in to change notification settings

PerryWerneck/dmiget

Repository files navigation

Linux/Windows tool and library to get DMI data

Platform: Linux/Windows License: GPL v3 CodeQL build result PyPI version

Installation

Pre build packages

You can download installation package for supported linux distributions in Open Build Service

Download from open build service Download from githut Download from pypi

Examples:

Command line

dmiget
dmiget dmi:///bios/vendor

Python

import smbios
value = smbios.Value('chassis','serial')
print(value)
import smbios
value = smbios.Value('dmi:///chassis/serial')
print(value)
import smbios
value = smbios.memsize()
print(value)
print(int(value))
import smbios
for node in smbios.nodes():
	print(node)
	for value in node.values():
		print('	{}: {}'.format(value.description,value))

C++

#include <smbios/node.h>
#include <iostream>

using namespace std;

int main(int argc, char **argv) {
	Node node{"chassis"};
	cout << node.name() << " - " << node << endl;
	cout << node["manufacturer"] << endl;
	return 0;
}