Virtual Machine feature #122

Merged
Solvik merged 13 commits from vm into master 2020-04-19 12:28:49 +02:00
Showing only changes of commit 7bfc0fd8a2 - Show all commits

View file

@ -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()