fix memory
This commit is contained in:
parent
4ee9325c7e
commit
7bfc0fd8a2
1 changed files with 2 additions and 2 deletions
|
@ -19,8 +19,8 @@ class VirtualMachine(object):
|
|||
|
||||
def get_memory(self):
|
||||
mem_bytes = os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES') # e.g. 4015976448
|
||||
mem_gib = mem_bytes/(1024.**3) # e.g. 3.74
|
||||
return math.ceil(mem_gib)
|
||||
mem_gib = mem_bytes / (1024.**2) # e.g. 3.74
|
||||
return mem_gib
|
||||
|
||||
def get_vcpus(self):
|
||||
return os.cpu_count()
|
||||
|
|
Loading…
Reference in a new issue