Python-DMIDecode (+XML) Extension Module

Earth provides enough to satisfy every man's need, but not every man's greed[q0]


- Mahatma Gandhi, 1869-1948

Mission Statement

Note

  • Please note that python-dmimdecode is not dmidecode - Consequently the developers and maintainers are different.
  • Having said that, python-dmimdecode shadows dmidecode.
    • We will strive to maintain python-dmidecode as close as possible to the current release of the upstream dmidecode
  • Please do not email the original dmidecode developers about this python extension module, instead use the mailing list detailed below

XML-to-Python Mapping

This is work-in-progress, you can however see where it's at; The type-mappings themselves can be viewed here, and the grouping here.

See the TypeMap Support Matrix.


License

Python-DMIDecode is licensed under the GNU GPL v2.

GNUv2_small.png


Quick Example

#. Compile the python module (shared object)...
make
sudo python -c "import dmidecode; print dmidecode.dmi; print dir(dmidecode)"

...If you get something like this...

SMBIOS 2.3 present
[
  '__doc__', '__file__', '__name__', 
  'baseboard', 'bios', 'cache', 'chassis', 'connector', 'dump',
  'get_dev', 'memory', 'processor', 'set_dev', 'slot', 'system', 'type'
  'dmi', 'version'
]

...you know it's all good.

Here's a sample script...

import dmidecode

myDMIVerStr = dmidecode.dmi
myPyDMIDecodeVerStr = dmidecode.version

myBIOS = dmidecode.bios()
mySystem = dmidecode.system()
myBaseboard = dmidecode.baseboard()
myChassis = dmidecode.chassis()
myProcessor = dmidecode.processor()
myMemory = dmidecode.memory()
myCache = dmidecode.cache()
myConnector = dmidecode.connector()
mySlot = dmidecode.slot()

from pprint import pprint
for i in tuple(range(0,42))+(126, 127):
  print i,
  pprint(dmidecode.type(i))

Get It

Source

Get the  orig.tar.gz, or...

git clone git://git.autonomy.net.au/python-dmidecode
git clone http://git.autonomy.net.au/python-dmidecode.git
git clone https://git.autonomy.net.au/python-dmidecode.git

...which includes the debian/ folder, and the spec file.

Debian Package

To build the  Debian package...

make .dpkg

Red Hat Package

The Red Hat spec file is now included in the source.


Mailing Lists

Join  dmidecode-devel or read through the  dmidecode-devel archives. Remember that you don't need to be a developer to join, testing and user-feedback itself is extremely valuable to the project's overall development.

People who talk code, or interested in seeing what's happening under the covers are encouraged to also join the  dmidecode-commits; this list will inform people of what code is changing as it changes by sending out the commit diff and log, it should never be emailed directly by people however and all discussions on commits should be continued in  dmidecode-devel.


Credit

Authors

  • Nima Talebi <nima at autonomy dot net dot au>
  • David Sommerseth <davids at redhat dot com>

Thanks

  •  Debian
    • Christoph Haas <haas at debian dot org> - for mentoring me, and supporting the project at Debian.
  •  Red Hat
    • Clark Williams <williams at redhat dot com> - for supporting the project at Red Hat (and supplying the Red Hat spec file).
    • Alan Cox - The original author
  • Jean Delvare <khali at linux-fr dot org> (Upstream) - for general advice and help in writing python-dmidecode.

More Thanks

  • Vaughan Whitteron
  • Stephen Darragh
  • Joel Heenan
  • Justin Cook