Louis BECQUEY

Support both Intel and AMD

...@@ -477,8 +477,8 @@ def read_cpu_number(): ...@@ -477,8 +477,8 @@ def read_cpu_number():
477 # do not use os.cpu_count() on LXC containers 477 # do not use os.cpu_count() on LXC containers
478 # it reads info from /sys wich is not the VM resources but the host resources. 478 # it reads info from /sys wich is not the VM resources but the host resources.
479 # Read from /proc/cpuinfo instead. 479 # Read from /proc/cpuinfo instead.
480 - p = subprocess.run(['grep', '-c', 'Intel(', '/proc/cpuinfo'], stdout=subprocess.PIPE) 480 + p = subprocess.run(['grep', '-Ec', '(Intel|AMD)', '/proc/cpuinfo'], stdout=subprocess.PIPE)
481 - return int(p.stdout.decode('utf-8')[:-1]) 481 + return int(p.stdout.decode('utf-8')[:-1])/2
482 482
483 def warn(message, error=False): 483 def warn(message, error=False):
484 if error: 484 if error:
......