Skip to content

Commit 612599e

Browse files
author
Nuno Tavares
committed
FIX cpu listing is not differentiated (there is no serial)
Signed-off-by: Nuno Tavares <[email protected]>
1 parent 79be147 commit 612599e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

dmidecode.py

+3
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,12 @@ def _get(i):
130130
l = _get_labels(system, ['Manufacturer','Product Name', 'Serial Number'], ['Not Specified'])
131131
print ('node_dmi_hardware_info{{{}}} 1'.format( ','.join('{}="{}"'.format(k,v) for k,v in l.items()) ))
132132

133+
idx = 0
133134
for cpu in _get('processor'):
134135
l = _get_labels(cpu, ['Manufacturer','Family', 'Max Speed', 'Core Count'], ['Not Specified'])
136+
l['index'] = idx
135137
print ('node_dmi_processor{{{}}} 1'.format( ','.join('{}="{}"'.format(k,v) for k,v in l.items()) ))
138+
idx += 1
136139

137140
for mem in _get('memory device'):
138141
if mem['Size'] == 'No Module Installed':

0 commit comments

Comments
 (0)