Moving from Gb to Mb

This commit is contained in:
Philippe Caseiro 2018-04-12 09:24:54 +02:00
parent 6fe1c2da61
commit 76120e1411

View File

@ -7,7 +7,7 @@ def getMemoryPercentage(percent):
totalMemory = os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES')
memoryToUse = (totalMemory*percent)/100
memoryMb = memoryToUse/(1024.**2)
return "{0}M".format(round(memoryMb,2))
return "{0}M".format(int(memoryMb))
except:
return "Error during memory percentage calculation"