Skip to content

Commit

Permalink
Merge pull request #55510 from FerrySchuller/patch-4
Browse files Browse the repository at this point in the history
num_cpus and cpu_model support for IBM/S390
  • Loading branch information
dwoz authored Dec 24, 2019
2 parents bc01113 + dc3fd54 commit 899b63f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions salt/grains/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,13 @@ def _linux_cpudata():
val = comps[1].strip()
if key == 'processor':
grains['num_cpus'] = int(val) + 1
# head -2 /proc/cpuinfo
# vendor_id : IBM/S390
# # processors : 2
elif key == '# processors':
grains['num_cpus'] = int(val)
elif key == 'vendor_id':
grains['cpu_model'] = val
elif key == 'model name':
grains['cpu_model'] = val
elif key == 'flags':
Expand Down

0 comments on commit 899b63f

Please sign in to comment.