Moving from Gb to Mb
This commit is contained in:
parent
6fe1c2da61
commit
76120e1411
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user