summaryrefslogtreecommitdiffstats
path: root/example.py
blob: bbe5359dbc481b774b0ebbe4ab065d01f45de576 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env python2.4
import dmidecode
import sys
from pprint import pprint
print "*** bios ***"; pprint(dmidecode.bios())
print "*** system ***\n", pprint(dmidecode.system())
print "*** baseboard ***\n"; pprint(dmidecode.baseboard())
print "*** chassis ***\n"; pprint(dmidecode.chassis())
print "*** processor ***\n"; pprint(dmidecode.processor())
print "*** memory ***\n"; pprint(dmidecode.memory())
print "*** cache ***\n"; pprint(dmidecode.cache())
print "*** connector ***\n"; pprint(dmidecode.connector())
print "*** slot ***\n"; pprint(dmidecode.slot())

for v in dmidecode.memory().values():
  if type(v) == dict and v['dmi_type'] == 17:
    pprint(v['data']['Size']),

pprint(dmidecode.type('3'))
pprint(dmidecode.type('bios'))